View previous topic :: View next topic |
Author |
Message |
technomation
Joined: 27 Oct 2012 Posts: 8 Location: united kingdom
|
SPI setup of ADS1118 on a pic in PICC |
Posted: Tue Apr 23, 2013 10:15 am |
|
|
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
|
|
Posted: Tue Apr 23, 2013 10:43 am |
|
|
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
|
|
Posted: Fri Apr 26, 2013 3:52 pm |
|
|
thanks for the response i will give it a try and post an update |
|
|
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
|
|
Posted: Sat Apr 27, 2013 12:11 pm |
|
|
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 |
|
|
|