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

18F45K22 SPI SDCARD Read Speed Problem
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
eaydin



Joined: 25 May 2022
Posts: 10

View user's profile Send private message

PostPosted: Sun May 29, 2022 11:38 pm     Reply with quote

VCC 3.7V lion battery. I use 0.1uF capacitor on power stage. I try more capacitor in space assembly on circuit breadboard.
Ttelmah



Joined: 11 Mar 2010
Posts: 19568

View user's profile Send private message

PostPosted: Tue May 31, 2022 12:19 am     Reply with quote

A nominal 3.7v Li-ion battery can be up to 4.2v when freshly charged.
Even at 3.7, it is above the rated maximum for an SD card. The SD card
spec has a rated voltage range of 2.7 to 3.6v (SD2 cards down to 1.8v).
asmallri



Joined: 12 Aug 2004
Posts: 1636
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue May 31, 2022 10:48 pm     Reply with quote

Drop your SPI speed down to 5 MHz and retest. If that works successfully try increasing it to 10 MHz. It is rare to find a PIC implementation of an SD card using the SPI bus with an SPI speed above 10 MHz. At these speeds PCB layout becomes critical as is RF noise generation.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
eaydin



Joined: 25 May 2022
Posts: 10

View user's profile Send private message

PostPosted: Wed Jun 01, 2022 12:24 am     Reply with quote

Ttelmah wrote:
A nominal 3.7v Li-ion battery can be up to 4.2v when freshly charged.
Even at 3.7, it is above the rated maximum for an SD card. The SD card
spec has a rated voltage range of 2.7 to 3.6v (SD2 cards down to 1.8v).


Li-On bat has mid charge. Has a 3.5V


asmallri wrote:
Drop your SPI speed down to 5MHz and restest. If that works successfully try increeasing it to 10MHz. It is rare to find a PIC implementation of an SD card using the SPI bus with an SPI speed above 10MHz. At these speeds PCB layout becomes critical as is RF noise generation.


How to run 5MHZ ? Thats what i know PIC run 4MHZ, 8MHZ, and PLL
Ttelmah



Joined: 11 Mar 2010
Posts: 19568

View user's profile Send private message

PostPosted: Wed Jun 01, 2022 12:27 am     Reply with quote

10M, is 'pushing it'. If you look at the timing diagrams, and add up the
minimum specified high time, low time, and the two rise and fall times,
you get 105nSec legal minimum. So 9.5MHz max. I like to use 8MHz
as the maximum that is generally reliable.
asmallri



Joined: 12 Aug 2004
Posts: 1636
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Jun 01, 2022 5:10 am     Reply with quote

Ttelmah wrote:
10M, is 'pushing it'.... I like to use 8MHz as the maximum that is generally reliable.


As do I :-)
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
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
Page 2 of 2

 
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