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 support@ccsinfo.com

SPI setup of ADS1118 on a pic in PICC

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
technomation



Joined: 27 Oct 2012
Posts: 8
Location: united kingdom

View user's profile Send private message

SPI setup of ADS1118 on a pic in PICC
PostPosted: Tue Apr 23, 2013 10:15 am     Reply with quote

hi all

Anyone any experience in setting up TI ADS1118 on a pic in PICC? As I'm having a nightmare just don't seem to be able to get the thing to communicate.

In fairness I've never used SPI before so a bit clutching at straws.

The data sheets not the most helpful and a trail of the net didn't really yield any results.

The issue will be the #use SPI command just can't work it out, tried most different combinations i reckon.

Pretty sure it's mode1 but if someone has used one before could help me out that would be great. Just as a side note I'm using the same SPI interface with a 24lc1024 which i know the mode and details will be different on. Will the compiler let me change this in code or is it a once set, can't change thing (i can afford not to use this if push comes to shove so can take it out if it's not going to work).

and as always the question gets asked V4.141
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Tue Apr 23, 2013 10:43 am     Reply with quote

i have used many ADC chips of this general family,
with this or similar protocol
BUT
due to the shared Dout function ( conversion complete flag, and datout) i have found bit banging to be easier then manipulating the SPI hardware of the pic.

here is a link to a similar one that shows how to do the read back , while honoring the data ready aspect
http://www.ccsinfo.com/forum/viewtopic.php?t=42754&highlight=ads%2A
technomation



Joined: 27 Oct 2012
Posts: 8
Location: united kingdom

View user's profile Send private message

PostPosted: Fri Apr 26, 2013 3:52 pm     Reply with quote

thanks for the response i will give it a try and post an update
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Sat Apr 27, 2013 12:11 pm     Reply with quote

study Figure 1, 43-46 and pay close attention to the
HiZ Dout condition ( why i use a weak pull up resistor on the Dout line )

re: the clock line Hi/LOW state when not clocking
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
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