mackrackit,
I probably found a way to speed up the process of writing to the TFT display. If you write bytes to the SD card with values from 0 to 255, which is what I need
Code:
' Write to file
FOR I = 0 TO 255
FAT_src[0] = I
FAT_count = 1
Gosub FSfwrite
Serout2 PORTC.6, 84, [ "Write ", Dec FAT_error, $d, $a]
If (FAT_error != 0) Then Stop
NEXT I
The program will sucessfully write 256 bytes to the txt file (a bunch of weird characters
). Now, when you try to read them back, it will always give you wrong values between the byte 210th and the byte 250th. However, by using only 7 bits in every byte (from 0 to 127) I can make my display work pretty fast. Have you seen this happen to you? Any comments?
Now, for some strange reason my SD card is only working the first time after I reprogram the 18F4550 chip. The second time that I restart the chip I get the following errors for the FSinit
Code:
FAT_error = 6
SDC_status = 2
SDC_response = 63
I know what the FAT_error = 6 is (Init error), but the others I'm not sure what they are. Have you encounter these kind of errors before? Remember, it always works right after I reprogram the MCU. Any ideas?
Thank you for all your help
Robert
Bookmarks