پاسخ : چگونه می توان جدول گلایف تابلو روان را روی MMC ذخیره کرد؟
این برنانه ای است که من دارم روش کار میکنم تا MMC رو یاد بگیرم .
البته عملی هم جواب گرفتم و فایل تکست توی رم ایجا میشه .
ولی وقتی من فایل تکستمو با PC تو MMC کپی میکنم ، تو مرحله 40 در صد گیر میکنه و در نهایت هم MMC Error میده یعنی تو قسمت B = Initfilesystem(1) گیر میکنه که اگه رمو فرمت کنم مشکل حل میشه در غیر این صورت رمو نمی شناسه.
این برنانه ای است که من دارم روش کار میکنم تا MMC رو یاد بگیرم .
البته عملی هم جواب گرفتم و فایل تکست توی رم ایجا میشه .
ولی وقتی من فایل تکستمو با PC تو MMC کپی میکنم ، تو مرحله 40 در صد گیر میکنه و در نهایت هم MMC Error میده یعنی تو قسمت B = Initfilesystem(1) گیر میکنه که اگه رمو فرمت کنم مشکل حل میشه در غیر این صورت رمو نمی شناسه.
کد:
'******************* ' LCD Configoration $regfile = "m32def.dat" $crystal = 8000000 '******************* Config Lcd = 16 * 2 Config Lcdpin = Pin , Db4 = Porta.0 , Db5 = Porta.1 , Db6 = Porta.4 , Db7 = Porta.5 , E = Porta.3 , Rs = Porta.2 Cls '******************* ' Dimantion set '******************* Dim Mmc_error As Byte Dim Mmc_try As Byte Dim B As Byte Dim L As Byte Dim Ff As Byte Dim S As String * 30 Dim Diskf As Long Dim Disks As Long Dim N As Byte Dim Nn As Byte '******************* ' Main Program '******************* Gosub Mmc_initialize Cls If Mmc_error = 0 Then Locate 1 , 1 : Lcd "start" For N = 1 To 10 Open "mohsen.txt" For Append As #ff Print #ff , "line :" ; N Close #ff Next N Locate 1 , 1 : Lcd "end " Else Locate 1 , 1 : Lcd "MMC ERROR" End If End '******************* ' SUB '******************* Mmc_initialize: Locate 1 , 1 : Lcd "0%" Mmc_error = 0 Mmc_try = Mmc_try + 1 $include "Config_AVR-DOS.BAS" $include "Config_MMC.bas" 'include mmc Ff = Drivereset() Locate 1 , 1 : Lcd "10%" Ff = Driveinit() Locate 1 , 1 : Lcd "20%" $external Waitms Locate 1 , 1 : Lcd "30%" If Gbdriveerror <> 0 Then Locate 2 , 1 : Lcd "ERROR" ; Gbdriveerror If Mmc_try < 5 Then Goto Mmc_initialize Else Cls Locate 2 , 1 : Lcd " MMC ERROR" Mmc_error = 1 Goto End_of_mmc End If End If Locate 1 , 1 : Lcd "40%" B = Initfilesystem(1) 'init file system If B <> 0 Then Locate 2 , 1 : Lcd "Error MMC" If Mmc_try < 5 Then Goto Mmc_initialize Else Mmc_error = 1 Cls Locate 2 , 1 : Lcd " MMC ERROR" Goto End_of_mmc End If End If Diskf = Diskfree() Locate 2 , 1 : Lcd "Free=" ; Diskf Locate 1 , 1 : Lcd "50%" Disks = Disksize() Locate 2 , 1 : Lcd "Size=" ; Disks Locate 1 , 1 : Lcd "60%" Ff = Freefile() Locate 1 , 1 : Lcd "70%" Open "mohsen.txt" For Append As #ff 'create file in MMC Locate 1 , 1 : Lcd "80%" S = Str(diskf) '1111111111111111111111111111111111111 Print "line 9-1" Print #ff , S ; " Byte Disk Free Space" '22222222222222222222222222222222222222222 Locate 1 , 1 : Lcd "90%" S = Str(disks) 'Print #ff , S ; " Byte Disk Size" Locate 1 , 1 : Lcd "100%" End_of_mmc: Wait 2 Return
دیدگاه