In SX Microcontrollers, SX/B Compiler and SX-Key Tool, RS_Jim wrote: Micky, I don't see you using a pin for chip select, I believe that is pin 4. You must take CS low before you can address the chip. Next Jonny mac gave me a clue in programing for an ADC and that was use a command of clock = 0 before you start getting information to and from the ADC the following is the func code that works for me. ' ------------------------------------------------------------------------- ' Read the Analog/digital converter ADC_CS PIN OUTPUT ADC_CLK PIN OUTPUT ADC_DIO PIN INPUT PLP Func READ_ADC low ADC_CS ADC_CLK = 0 NOP SHIFTIN ADC_DIO,ADC_CLK,MSBPOST,tmpB1\9,4 high ADC_CS tmpW1_msb = 0 tmpW1_lsb = tmpB1 Return tmpW1 ENDFUNC I had no luck with it until I put the clock = 0 after the Chip select low. maybe this will help! RS_Jim ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=284611#m284622 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2008 (http://www.dotNetBB.com)