Basic Stamps and ADC's

I'm trying to use a 10bit ADC with a BS2 in a project, and have had some trouble getting usefuly information. It's a TLC1549CP, and
here's the code for it: ----------------------------------------------------- 'PINOUTS CS CON 2         'Chip Set DATALINE    CON    3    'DO CLOCKPIN    CON 1     'Clock
temp2    VAR    WORD
temp2=0
NEW: low CS pause 10 shiftout DATALINE,CLOCKPIN,msbfirst,[temp2\10] high CS debug dec temp2,CR pause 100 goto NEW -----------------------------------------------------
I have a Ref+ and Vcc both going to +5, GND and Ref- going to, well, ground. DATALINE and CLOCKPIN are directly connected to their respective pins, and a 2.2kOhm resistor between the CS pin and the I/O pin.
All I'm doing is putting a 2.2KOhm resistor from 0V to analog in, and another 2.2KOhm res between that and +5. I've trying taking one or the other out to get high or low readings, but I always get 0 as a return.
Anyone have any experience that might be able to help me out?
Thanks in advance! Dave
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
David -
If possible, please use an o'scope to be sure your pulse timing is correct. I never used this device before, but the data sheet says - I only skimmed it - that chip select pin must be high on power up. If this condition isn't met, I don't know what will happen - you may need to pull it up high when you turn on the circuit. Also the data sheet shows a bunch of different modes based on timing.
Bill

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Perhaps the "shiftin" command would be more suitable here??
GtG
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
LOL
yeah, that might do it. And it may require a shift out to set it up/initiate a conversion and transfer.
There have been some serial a/d's I have simply given up on ...
Mike

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.