SPI interface how to
science_geek
Posts: 247
i am getting into adc conversion with an mcp3002 and/or the adc0384 i have tried the code from obex for the adc0834 and the sample schematic, i didnt get it to work, i got looking at the code and dont really get how it works, i was wondering if anyone here could give me a quick and dirty example of how SPI works and a sample program that would simulate it
Comments
The attached driver is very simple for the TLV0834 / ADC0834. If you cannot get it to work then you are doing something wrong, I would recommend using the 3.3V part (TLV0834) but the ADC0834 will work too if you put a 1K or 2K resistor in series with the devices Dout (DO) line to the propeller. Note that the pin names in the driver file are with respect to the names of the pins on the TLV0834. Thus 'pin_DI' is the propeller pin that is connected to the DI pin on the TLV0834 / ADC0834.
If you use an ADC0834 it must be run off of 5V. DO NOT mix up the 5V and 3.3V lines !!! and remember to put a 1k or 2k resistor between the prop and the adc0834 on the adc0834's DO line.
Good luck,
tellurian (allen)