Page 2 of 2

Re: SD Card, PPS and the 18f26K40

Posted: Tue Dec 20, 2022 4:13 pm
by Jerry Messina
Well, I'm not sure what the issue is you're seeing.
I just created a 12000 byte file and read it using SD.ReadByte() in a loop until EOF, and it worked for me.

This with SD_OPTIMIZE = true, 18F27K40, clock=64, MSSP1, SPI clk = spiOscDiv4 (16MHz), and an SD card formatted as FAT32

Re: SD Card, PPS and the 18f26K40

Posted: Sun Jan 01, 2023 11:28 am
by Gunplumber
G'day Guys

My apologies for not getting back to this sooner, ive been extremely busy over the xmas break with other projects.
Jerry i have tracked down my issue with the SD card reading and it was (as i pretty much suspected) my fault. My program includes a timer Interrupt and inside the Int routine was a call to another sub routine. The sub routine was very simple and i did not think to include the required context saving.. It wasn't until i read the help file on interrupts that it became clear how important it is..
I now have that sorted out 100%.. :D

I do have some other questions regarding Interrupts, but i'll start a new thread for that..

Many thanks and Happy New year!

Lee

Re: SD Card, PPS and the 18f26K40

Posted: Sat Mar 04, 2023 2:22 pm
by Jerry Messina
just to follow up... SDFileSystem (SDFS) 4.1.9 is included in the latest SF UPDATE 3_1_2023, so no need to download the 418 zip file

See using SDFileSystem with PPS (18FxxQ71 example) for details.