اطلاعیه

Collapse
No announcement yet.

wav player با بسکام atmeg32

Collapse
X
 
  • فیلتر
  • زمان
  • Show
Clear All
new posts

    wav player با بسکام atmeg32

    سلام دوستان کسی یک مدار wavplayer که بیسیک باشه و با atmeg32 یا 16 کار کنه سراغ نداره ؟
    لازم دارم ممنون می شم اگه برنامه و نقشه شو قرار بدید......................................
    زیباترین لحظات را کسی به تو هدیه میدهد که بدترین لحظات را از تو بگیرد

    #2
    پاسخ : wav player با بسکام atmeg32

    من انجامش دادم
    اما خریدمش. به نظرت برنامه های پیچیده را بذاریم اینجا اون هم با پولی که براش دادیم خوبه؟ :redface:

    دیدگاه


      #3
      پاسخ : wav player با بسکام atmeg32


      http://h1.ripway.com/electroway/AVR_SOUND_RECORDER.zip

      موفق باشید

      دیدگاه


        #4
        پاسخ : wav player با بسکام atmeg32

        دوست عزیز گاهی یاد دادن و در اختیار قرار دادن اطلاعات برای دیگران شاید ثواب دنیوی نداشته باشه (که البته من معتقدم داره) ولی مطمئن باشین که ثواب اخروی حتما داره در هر صورت ممنون از شما :nerd: :nerd: :nerd: :nerd: :nerd: :nerd:

        دیدگاه


          #5
          پاسخ : wav player با بسکام atmeg32

          سخت افزار رو که دیگه همه از من استاد ترن ولی اگه مبهمه بگین تا بزارم
          پس صاف میریم سر اصل مطلب
          به هم ریختس خودتون ببخشید
          کد:
          '$regfile = "M128def.dat "                  'IT'S POSSIBLE USE DIFFERENT AVR-CHIPS
          '$crystal = 11059200
          
          $regfile = "M64def.dat "                  'IT'S POSSIBLE USE DIFFERENT AVR-CHIPS
          $crystal = 12000000                     'or any
          
          
          $baud = 9600
          $swstack = 64
          $hwstack = 128
          $framesize = 128
          'Config Clock = Soft
          'Config Date = Dmy , Separator = .
          Config Portb = Output
          Config Portc = Output
          Config Portf = Output
          Enable Interrupts
          'Time$ = "20:22:33"
          'Date$ = "16.04.08"
          Dim B As Byte
          Dim L As Byte
          Dim Ff As Byte
          Dim S As String * 20
          Dim Diskf As Long
          Dim Disks As Long
          Dim Acc As Long
          Enable Interrupts
          Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Prescale = 1
          
          Enable Oc1a
          
          'Pwm1a = 255
          'Do : Toggle Portc : Waitms 100 : Loop
          'Set Portb.7
          'Cls
          Set Portf.4
          Print "Initation..."
          
          $include "Config_AVR-DOS.BAS"
          $include "Config_MMC.bas"                  'include mmc
          
          Ff = Drivereset()
          Ff = Driveinit()
          
          $external Waitms
          
          If Gbdriveerror <> 0 Then
          
          Print "Error Config"
          
          Print Gbdriveerror
          End
          End If
          
          'include avr-dos
          
          B = Initfilesystem(1)                    'init file system
          If B <> 0 Then Print "Error MMC"
          '-------------------------------------------------------------------------------
          '------------------------ PROGRAM START ------------------------------
          '-------------------------------------------------------------------------------
          Do
          Set Portf                          'you can type your calling subroutine and another code
          Gosub A
          Wait 2                           'for example
          Gosub Aa
          Wait 2
          Gosub Aaa
          Wait 2
          Gosub Aaaa
          Wait 2
          Gosub Aaaaa
          Wait 2
          Gosub Aaaaaa
          Wait 2
          Gosub Aaaaaaa
          Wait 2
          Gosub Aaaaaaaa
          Wait 2
          Gosub Aaaaaaaaa
          Wait 2
          Gosub B
          Wait 2
          Gosub Bb
          Wait 2
          
          
          
          
          
          Loop
          
          End
          
          
          A:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
              'Pwm1a = L
             Portc = L
             Print L
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Aa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega2.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          
          Aaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega3.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Aaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega4.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Aaaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega5.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Aaaaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega6.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          Aaaaaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega7.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          
          Aaaaaaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega8.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Aaaaaaaaa:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega9.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          B:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega10.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          
          
          
          
          Bb:
          Set Portf.4
          Print "Now starting for play ;)"
          Ff = Freefile()
          Open "omega11.wav" For Binary As #ff
          
          While Eof(#ff) = 0
          
             Get #ff , L
          
          
          
          
             ' Pwm1a = L
             Portc = L
             'print l
             'nop
             'nop
             Waitus 8
          
          
          Wend
          
          Close #ff
          Print "finish"
          
          
          Return
          علم چندانکه بيشتر خواني چون عمل در تو نيست ناداني

          دیدگاه


            #6
            پاسخ : wav player با بسکام atmeg32

            مطمئنید که این برنامه جواب میده؟
            اگر نقشه رو برام بذارید واقعا ممنون می شم.
            زیباترین لحظات را کسی به تو هدیه میدهد که بدترین لحظات را از تو بگیرد

            دیدگاه


              #7
              پاسخ : wav player با بسکام atmeg32

              100 % دوست من
              من اینو ساختم
              تنها فرقش اینه که ریختمش رو پورت به جای pwm
              البته pwm هم جواب گرفتم ولی این pcb مال حالت موازیه.شما می تونی تغییرش بدی
              فایل های پیوست شده
              علم چندانکه بيشتر خواني چون عمل در تو نيست ناداني

              دیدگاه


                #8
                پاسخ : wav player با بسکام atmeg32

                ببخشید شما که رو هردو حالت جواب گرفتین رو کدوم حالت کیفییتش بیشتره؟(PWM یا DAC)
                پروردگارا: به من زيستني عطا کن که در لحظه مرگ بر بي ثمري لحظه اي که براي زيستن گذشته است حسرت نخورم، و مردني عطا کن که بر بيهودگيش سوگوار نباشم. بگذار تا آن را خود انتخاب کنم، اما آنچنان که تو دوست ميداري

                دیدگاه


                  #9
                  پاسخ : wav player با بسکام atmeg32

                  dac بهتره ولی خوب یه پورتت رو اشغال میکنه و 8 تا مقاومت به مدار اضافه میشه و این یعنی وقت ولی در عوض کلاک میکرو کمتر مصرف میشه
                  علم چندانکه بيشتر خواني چون عمل در تو نيست ناداني

                  دیدگاه


                    #10
                    پاسخ : wav player با بسکام atmeg32

                    ممنون از اینکه راهنماییم کردید.
                    زیباترین لحظات را کسی به تو هدیه میدهد که بدترین لحظات را از تو بگیرد

                    دیدگاه


                      #11
                      پاسخ : wav player با بسکام atmeg32

                      شما از DAC مقاومتی استفاده کردین؟
                      این DAC بهتره یا DAC که بصورت آی سی هستن؟
                      پروردگارا: به من زيستني عطا کن که در لحظه مرگ بر بي ثمري لحظه اي که براي زيستن گذشته است حسرت نخورم، و مردني عطا کن که بر بيهودگيش سوگوار نباشم. بگذار تا آن را خود انتخاب کنم، اما آنچنان که تو دوست ميداري

                      دیدگاه


                        #12
                        پاسخ : wav player با بسکام atmeg32

                        جناب کاخکی من این پل مقاومتی رو کار کردم و doc ای سی رو نزاشتم ولی خوب همین هم کولاک بود وقتی بعد از doc دادمش به اسپیکر کامپیوترم لذت بردم تفکیک صداش بینظیر بود(منظورم در حد 16 مگاهرتز و کارایی که تا الان کرده بودم بود) به هر حال به نظر من قابل قبول بود.شما می تونین doc رو امتحان کنین ولی اگه تست کردین لطفا به من هم خبرش رو بدین.متشکرم
                        علم چندانکه بيشتر خواني چون عمل در تو نيست ناداني

                        دیدگاه


                          #13
                          پاسخ : wav player با بسکام atmeg32

                          سلام
                          خسته نبا شییییییییییییییییییییییییییییییییییییییییییییییییی یییییید
                          حالشو ببر

                          $regfile = "M32def.dat " 'IT'S POSSIBLE USE DIFFERENT AVR-CHIPS
                          $crystal = 12000000 'or any
                          '$baud = 9600

                          '$swstack = 64
                          '$hwstack = 128
                          '$framesize = 100
                          '-------------------------------------------------------------------------------
                          Config Clock = Soft
                          Config Date = Dmy , Separator = .
                          Enable Interrupts
                          Time$ = "2000"
                          Date$ = "16.04.08"
                          '-------------------------------------------------------------------------------
                          Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , Rs = Porta.0 , E = Porta.2
                          Config Lcd = 16 * 2
                          '-------------------------------------------------------------------------------


                          Config Debounce = 20

                          Config Timer1 = Pwm , Pwm = 8 , Compare A Pwm = Clear Up , Compare B Pwm = Clear Down , Prescale = 1
                          Pwm1a = 255
                          Pwm1b = 255

                          '------------------------------------------------
                          Config Pinc.0 = Input
                          Pause Alias Pinc.0
                          '-------------------------------
                          Config Pinc.1 = Input
                          Per Alias Pinc.1
                          '--------------------------------
                          Config Pind.7 = Input
                          Nex Alias Pind.7
                          '-------------------------------
                          Dim B As Byte
                          Dim L As Byte
                          Dim Resp As Byte
                          Dim Ff As Byte
                          Dim S As String * 16
                          Dim Ss(10) As String * 16
                          Dim Diskf As Long
                          Dim Disks As Long
                          Dim Acc As Long
                          Dim Accc As Long
                          Dim I As Integer
                          Dim Track As Integer
                          Dim Pl As Bit
                          '-------------------------------------------------------------------------------
                          Cursor Off
                          Cls
                          Home Upper

                          Lcd "saeed"
                          Wait 5
                          Cls



                          Lcd "initation..."
                          $include "Config_AVR-DOS.BAS"
                          $include "Config_MMC.bas" 'include mmc

                          Ff = Drivereset()
                          Ff = Driveinit()

                          $external Waitms

                          If Gbdriveerror <> 0 Then
                          Cls
                          Lcd "Error Config"
                          Locate 2 , 1
                          Lcd Gbdriveerror
                          End
                          End If

                          'include avr-dos

                          B = Initfilesystem(1) 'init file system
                          If B <> 0 Then Lcd "Error MMC"
                          '-------------------------------------------------------------------------------
                          '------------------------ PROGRAM START ------------------------------
                          '-------------------------------------------------------------------------------


                          '------------------------ PROGRAM START ------------------------------
                          '-------------------------------------------------------------------------------
                          Cls

                          Track = 0
                          S = ""
                          S = Dir( "*.wav&quot
                          While Len(s) <> 0
                          Incr Track
                          Lcd S
                          Wait 2
                          Cls
                          Ss(track) = S
                          S = Dir()
                          Wend


                          Cls





                          Do

                          For I = 1 To Track
                          Pl = 0
                          Ff = Freefile()
                          Open Ss(i) For Binary As #ff
                          Locate 1 , 1 : Lcd Ss(i)

                          Do

                          Get #ff , Resp
                          Pwm1a = Resp
                          Pwm1b = Resp
                          Debounce Pause , 0 , Stop_play , Sub
                          Debounce Nex , 0 , Snex , Sub
                          Debounce Per , 0 , Sper , Sub
                          If Pl = 1 Then Exit Do

                          Loop Until Eof(#ff) <> 0

                          Close #ff
                          Cls

                          Next

                          Loop

                          End


                          Stop_play:
                          Do
                          Locate 2 , 1 : Lcd "pause"
                          Debounce Pause , 0 , Play
                          Loop
                          Play:
                          Locate 2 , 1 : Lcd " "
                          Return

                          Snex:
                          If I = Track Then I = 0
                          Pl = 1
                          Cls
                          Locate 2 , 1 : Lcd "next"
                          Wait 1
                          Cls
                          Return


                          Sper:
                          Decr I
                          Decr I
                          If I > 100 Then I = Track
                          Pl = 1
                          Cls
                          Locate 2 , 1 : Lcd "pervius"
                          Wait 1
                          Cls
                          Return



                          اینم تغییرات واسه avr-dos واسه atmega32

                          ' Config File-System for Version 5.5:
                          $nocompile
                          ' === User Settings ================================================== ==========

                          ' Count of file-handles, each file-handle needs 524 Bytes of SRAM
                          Const Cfilehandles = 2 ' [default = 2]

                          ' Handling of FAT-Buffer in SRAM:
                          ' 0 = FAT- and DIR-Buffer is handled in one SRAM buffer with 561 bytes
                          ' 1 = FAT- and DIR-Buffer is handled in separate SRAM buffers with 1078 bytes
                          ' Parameter 1 increased speed of file-handling
                          Const Csepfathandle = 0 ' [default = 1]

                          ' Handling of pending FAT and Directory information of open files
                          ' 0 = FAT and Directory Information is updated every time a data sector of the file is updated
                          ' 1 = FAT and Directory Information is only updated at FLUSH and SAVE command
                          ' Parameter 1 increases writing speed of data significantly
                          Const Cfatdirsaveatend = 0 ' [default = 1]


                          ' Surrounding String with Quotation Marks at the Command WRITE
                          ' 0 = No Surrounding of strings with quotation.marks
                          ' 1 = Surrounding of strings with quotation.marks (f.E. "Text&quot
                          Const Ctextquotationmarks = 0 ' [default = 1]


                          ' Write second FAT. Windows accepts a not updated second FAT
                          ' PC-Command: chkdsk /f corrects the second FAT, it overwrites the
                          ' second FAT with the first FAT
                          ' set this parameter to 0 for high speed continuing saving data
                          ' 0 = Second FAT is not updated
                          ' 1 = Second FAT is updated if exist
                          Const Cfatsecondupdate = 1 ' [default = 1]


                          ' Character to separate ASCII Values in WRITE - statement (and INPUT)
                          ' Normally a comma (,) is used. but it can be changed to other values, f.E.
                          ' to TAB (ASCII-Code 9) if EXCEL Files with Tab separated values should be
                          ' written or read. This parameter works for WRITE and INPUT
                          ' Parameter value is the ASSCII-Code of the separator
                          ' 44 = comma [default]
                          ' 9 = TAB ' [default = 44]
                          Const Cvariableseparator = 44




                          ' === End of User Setting ================================================== ====



                          ' === Variables for AVR-DOS ================================================== ==

                          ' FileSystem Basis Informationen
                          Dim Gldrivesectors As Long
                          Dim Gbdoserror As Byte

                          ' Master Boot Record
                          Dim Gbfilesystem As Byte
                          ' Partition Boot Record
                          Dim Gbfilesystemstatus As Byte
                          Dim Glfatfirstsector As Long
                          Dim Gbnumberoffats As Byte
                          Dim Glsectorsperfat As Long
                          Dim Glrootfirstsector As Long
                          Dim Gwrootentries As Word
                          Dim Gldatafirstsector As Long
                          Dim Gbsectorspercluster As Byte
                          Dim Glmaxclusternumber As Long
                          Dim Gllastsearchedcluster As Long

                          ' Additional info
                          Dim Glfs_temp1 As Long

                          ' Block für Directory Handling

                          Dim Gldirfirstsectornumber As Long

                          Dim Gwfreedirentry As Word
                          Dim Glfreedirsectornumber As Long

                          Dim Gsdir0tempfilename As String * 11
                          Dim Gwdir0entry As Word ' Keep together with next, otherwise change _DIR
                          Dim Gldir0sectornumber As Long

                          Dim Gstempfilename As String * 11
                          Dim Gwdirentry As Word
                          Dim Gldirsectornumber As Long
                          Dim Gbdirbufferstatus As Byte
                          Dim Gbdirbuffer(512) As Byte
                          Const C_filesystemsramsize1 = 594
                          #if Csepfathandle = 1
                          Dim Glfatsectornumber As Long
                          Dim Gbfatbufferstatus As Byte
                          Dim Gbfatbuffer(512) As Byte
                          Const C_filesystemsramsize2 = 517
                          #else
                          Const C_filesystemsramsize2 = 0
                          #endif

                          ' File Handle Block
                          Const Co_filenumber = 0
                          Const Co_filemode = 1
                          Const Co_filedirentry = 2 : Const Co_filedirentry_2 = 3
                          Const Co_filedirsectornumber = 4
                          Const Co_filefirstcluster = 8
                          Const Co_filesize = 12
                          Const Co_fileposition = 16
                          Const Co_filesectornumber = 20
                          Const Co_filebufferstatus = 24
                          Const Co_filebuffer = 25
                          Const C_filehandlesize = Co_filebuffer + 513 ' incl. one Additional Byte for 00 as string terminator
                          ' for direct text reading from File-buffer
                          Const C_filehandlesize_m = 65536 - C_filehandlesize ' for use with add immediate word with subi, sbci
                          ' = minus c_FileHandleSize in Word-Format

                          Const C_filehandlessize = C_filehandlesize * Cfilehandles


                          Dim Abfilehandles(c_filehandlessize) As Byte
                          Const C_filesystemsramsize = C_filesystemsramsize1 + C_filesystemsramsize2 + C_filehandlessize


                          ' End of variables for AVR-DOS ================================================

                          ' Definitions of Constants ================================================== ==

                          ' Bit definiton for FileSystemStatus

                          Dfilesystemstatusfat Alias 0 : Const Dfilesystemstatusfat = 0 ' 0 = FAT16, 1 = FAT32
                          Dfilesystemsubdir Alias 1 : Const Dfilesystemsubdir = 1 ' 0 = Root-Directory, 1 = Sub-Directory
                          Const Dmfilesystemsubdir =(2 ^ Dfilesystemsubdir) ' not used yet
                          Const Dmfilesystemdirincluster =(2 ^ Dfilesystemstatusfat + 2 ^ Dfilesystemsubdir) ' not used yet
                          Dfatsecondupdate Alias 7 : Const Dfatsecondupdate = 7 ' Bit-position for parameter of
                          ' Update second FAT in gbFileSystemStatus


                          ' Bit Definitions for BufferStatus (FAT, DIR, File)

                          Deof Alias 1 : Const Deof = 1 : Const Dmeof =(2 ^ Deof)
                          Deofinsector Alias 2 : Const Deofinsector = 2 : Const Dmeofinsector =(2 ^ Deofinsector)
                          Dwritepending Alias 3 : Const Dwritepending = 3 : Const Dmwritepending =(2 ^ Dwritepending)
                          Dfatsector Alias 4 : Const Dfatsector = 4 : Const Dmfatsector =(2 ^ Dfatsector) ' For Writing Sector back (FATNumber times)
                          Dfileempty Alias 5 : Const Dfileempty = 5 : Const Dmfileempty =(2 ^ Dfileempty)

                          ' New feature for reduce saving
                          Dfatdirwritepending Alias 6 : Const Dfatdirwritepending = 6 : Const Dmfatdirwritepending =(2 ^ Dfatdirwritepending)
                          Dfatdirsaveatend Alias 7 : Const Dfatdirsaveatend = 7 : Const Dmfatdirsaveatend =(2 ^ Dfatdirsaveatend)
                          Dfatdirsaveanyway Alias 0 : Const Dfatdirsaveanyway = 0 : Const Dmfatdirsaveanyway =(2 ^ Dfatdirsaveanyway)




                          Const Dmeofall =(2 ^ Deof + 2 ^ Deofinsector)
                          Const Dmeof_empty =(2 ^ Deof + 2 ^ Deofinsector + 2 ^ Dfileempty)


                          Const Cp_fatbufferinitstatus =(2 ^ Dfatsector)
                          Const Cp_dirbufferinitstatus = 0


                          #if Cfatdirsaveatend = 1
                          Const Cp_filebufferinitstatus =(2 ^ Dfatdirsaveatend)
                          #else
                          Const Cp_filebufferinitstatus = 0
                          #endif



                          #if Cfatsecondupdate = 0
                          Const Cp_fatsecondupdate =(2 ^ Dfatsecondupdate)
                          #else
                          Const Cp_fatsecondupdate = 0
                          #endif


                          ' Bit definitions for FileMode (Similar to DOS File Attribut)
                          Dreadonly Alias 0 : Const Dreadonly = 0
                          'Const cpFileReadOnly = &H21 ' Archiv and read-only Bit set
                          Const Cpfilewrite = &H20 ' Archiv Bit set


                          ' Error Codes

                          ' Group Number is upper nibble of Error-Code
                          ' Group 0 (0-15): No Error or File End Information
                          Const Cpnoerror = 0
                          Const Cpendoffile = 1

                          ' Group 1 (17-31): File System Init
                          Const Cpnombr = 17
                          Const Cpnopbr = 18
                          Const Cpfilesystemnotsupported = 19
                          Const Cpsectorsizenotsupported = 20
                          Const Cpsectorsperclusternotsupported = 21
                          Const Cpcountofclustersnotsupported = 22

                          ' Group 2 (32-47): FAT - Error
                          Const Cpnonextcluster = 33
                          Const Cpnofreecluster = 34
                          Const Cpclustererror = 35
                          ' Group 3 (49-63): Directory Error
                          Const Cpnofreedirentry = 49
                          Const Cpfileexists = 50
                          Const Cpfiledeletenotallowed = 51
                          Const Cpsubdirectorynotempty = 52
                          Const Cpsubdirectoryerror = 53
                          Const Cpnotasubdirectory = 54
                          ' Group 4 (65-79): File Handle
                          Const Cpnofreefilenumber = 65
                          Const Cpfilenotfound = 66
                          Const Cpfilenumbernotfound = 67
                          Const Cpfileopennohandle = 68
                          Const Cpfileopenhandleinuse = 69
                          Const Cpfileopenshareconflict = 70
                          Const Cpfileinuse = 71
                          Const Cpfilereadonly = 72
                          Const Cpfilenowildcardallowed = 73
                          Const Cpfilenumberinvalid = 74 ' Zero is not allowed

                          ' Group 7 (97-127): other errors
                          Const Cpfilepositionerror = 97
                          Const Cpfileaccesserror = 98
                          Const Cpinvalidfileposition = 99
                          Const Cpfilesizetogreat = 100

                          Const Cpdrivererrorstart = &HC0


                          ' Range 224 to 255 is reserved for Driver

                          ' Other Constants
                          ' File Open Mode / stored in File-handle return-value of Fileattr(FN#, [1])
                          Const Cpfileopeninput = 1 ' Read
                          Const Cpfileopenoutput = 2 ' Write sequential
                          'Const cpFileOpenRandom = 4 ' not in use yet
                          Const Cpfileopenappend = 8 ' Write sequential; first set Pointer to end
                          Const Cpfileopenbinary = 32 ' Read and Write; Pointer can be changed by user


                          ' permission Masks for file access routine regarding to the file open mode
                          Const Cfilewrite_mode = &B00101010 ' Binary, Append, Output
                          Const Cfileread_mode = &B00100001 ' Binary, Input
                          Const Cfileseekset_mode = &B00100000 ' Binary
                          Const Cfileinputline = &B00100001 ' Binary, Input
                          Const Cfileput_mode = &B00100000 ' Binary
                          Const Cfileget_mode = &B00100000 ' Binary

                          ' Directory attributs in FAT16/32
                          Const Cpfileopenallowed = &B00100001 ' Read Only and Archiv may be set
                          Const Cpfiledeleteallowed = &B00100000
                          Const Cpfilesearchallowed = &B00111101 ' Do no search hidden Files
                          ' Bit 0 = Read Only
                          ' Bit 1 = Hidden
                          ' Bit 2 = System
                          ' Bit 3 = Volume ID
                          ' Bit 4 = Directory
                          ' Bit 5 = Archiv
                          ' Long File name has Bit 0+1+2+3 set
                          Dim Lastdosmem As Byte


                          $lib "AVR-DOS.Lbx"


                          یه نکته: اگه از mmc 9pin استفاده می کنین ،حتما از نوع rs باشه، تا 1ماه الاففف نشین!!!!!!!!!!!!!!!!1
                          شب بخیر

                          دیدگاه


                            #14
                            پاسخ : wav player با بسکام atmeg32

                            بازم من و بازم سلام
                            یادم رفت در مورد پروژه توضیح بدم ( آخه تا الان بیدار ....)

                            برنامه فایل های با پسوند wav بعد اسکن ، تو یه آرایه ذخیره میکنه. مو قع خوندن wav ،می تونین track بعدی ،قبلی ووووووو
                            همچنین pause بزنین.
                            دیگه چیزی به ذهنم نمیرسه

                            دیدگاه


                              #15
                              پاسخ : wav player با بسکام atmeg32

                              سلام سعید جان
                              من چک کردم شما این فایل avr dos رو که واسه مگا 32 گزاشتین با برنامه خود بسکام هیچ فرقی نداره
                              میشه بگین کجاشو دست کاری کردین؟
                              علم چندانکه بيشتر خواني چون عمل در تو نيست ناداني

                              دیدگاه

                              لطفا صبر کنید...
                              X