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

Concatenating arrays
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
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Tue May 25, 2010 6:14 am     Reply with quote

I have the simplified Physical Layer Spec but there is no timing information for the SPI bus/data. I am also having problems due to the lack of this information with regards to my own code.

I have now got SPI DMA on the 18F46J50 to work but I am having to force the SDO2 line high by sending an spi_write2(0xFF) before sending a command because the SDO2 line is remaining low after a previous commands response which causes the card to not work correctly.
rigomm



Joined: 17 Mar 2010
Posts: 13

View user's profile Send private message

PostPosted: Thu May 27, 2010 6:11 am     Reply with quote

Hi Wayne_
Yes, I´m using Hardware SPI routines. The code I posted above is not the code I´m writing now that I want to save the data in raw mode. As you well appointed, I´m saving the data as a 16 bit number together with a sequential number to ensure the storage is done correctly.

I tried to implement your pseudocode but it didn´t work, I had troubles with interruptions. I want to use interruptions to take the samples as accurately as possible. It does not mean your pseudocode is wrong, I think my implementation was not so good. Now I´m trying again but saving data after the array is full. Decreasing the sampling rate. For now decrease the sampling rate is ok for me, I need to have working this as soon as possible, so may be it will be not as I imagined but at least I want it saving data correctly. :-)

Thank you for the pseudo-code and thanks to ckielstra for his valuable comments.
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