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