CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

SD CARD CCS C
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
temtronic



Joined: 01 Jul 2010
Posts: 9524
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Tue Jul 08, 2025 5:41 am     Reply with quote

the 245 is a 3 volt device. While it can ACCEPT a 5 volt input, it CANNOT output 5 volts.

I have no idea why the 245 are on the PCB.

please post what module you have, and I'll try to find a real schematic of it.
Ttelmah



Joined: 11 Mar 2010
Posts: 19895

View user's profile Send private message

PostPosted: Tue Jul 08, 2025 7:17 am     Reply with quote

Yes. These are part of the LCD circuitry. _not_ level shifting for the SD,

If you look a the picture you posted of the module right at the start of the
thread, and enlarge this, you can see that the data connection to the SD
run directly across the board to the pin connector at the right of the board
they go nowhere near the 245 buffers.

As designed, the unit will work with something like a Arduino, since this
accepts +2.4v as high for SPI. However even on this it could well damage
the SD card, since the inputs to the SD will be overdriven. However it
cannot work on a 5v PIC using hardware SPI.

ilker07 wrote:
Ttelmah wrote:
The board has a 3.3v regulator to run the SD, but does not have level
shifting to the SD card. I looked at the image and you can see the tracks
go directly to the connector without level shifting.
The PIC is one of the few processors that insist on proper SPI signal
levels. This board will not work without added shifters.



There are 2 74LVC245A IC on the shield.Arent they level-shifter 3.3 to 5 v??
ilker07



Joined: 03 Jun 2022
Posts: 59

View user's profile Send private message

PostPosted: Wed Jul 16, 2025 4:45 am     Reply with quote

I used txs0108e level shifter but it doesn't still work.

signed int8 i;

FILE myfile;
delay_ms(2000);


i = fat_init();
fprintf(SCREEN,"init:%d\n",i);



if(fatopen((char *)"/TEST.TXT", (char *)"r", &myfile) != 0) fprintf(SCREEN,"file err\n");


else {

signed int ch_int;
unsigned char ch;
fprintf(SCREEN,"file ok\n");

fatseek(&myfile, 0, SEEK_SET); // Dosya başına git
for(i = 0; i <2; i++) {


ch_int=fatgetc(&myfile);
if (ch_int != EOF) { ch=(char)ch_int; fprintf(SCREEN,"%c",ch); }

}

fatclose(&myfile);

fprintf(SCREEN,"\n");

}

it gives me i=-1 and it says file ok but it doesn't print any character..
ilker07



Joined: 03 Jun 2022
Posts: 59

View user's profile Send private message

PostPosted: Wed Jul 16, 2025 4:59 am     Reply with quote

by the way; even if I write "TST.TXT" it still gives me file ok???
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group