ts-7000
[Top] [All Lists]

[ts-7000] 50% functional MCP3208

To:
Subject: [ts-7000] 50% functional MCP3208
From: "Razvan Ionut Stoian" <>
Date: Sun, 10 Feb 2008 16:10:57 -0000
Hi!

 I tried to interface a 12 bit ADC with the SPI port on my TS7200.
However, whenever I try to read all 8 channels, four of them send the
value of the voltage present on pin 1 (ADC0) and the other 4 (5
through 8) send the value on pin 5 (ADC4).
In order to access a particular channel I used the following algorithm
adapted from 2 sources:

spi_init();

bring CS up

for(i ...){

bring CS down;
write ((i>3)?0x07:0x06) //start,diff/single, D2
(http://www.swisstech.ca/Projects/Home%20Automation/ADC_Functions.h)
delay; 
write (i*0x40) //D1,D0
(http://www.swisstech.ca/Projects/Home%20Automation/ADC_Functions.h)
delay;
value [i] = read_data_spi; //upper part of the result

write (0x55);
delay;
value [i] = value [i] +read_data_spi; //add the lower part of the result

bring CS up;

Could you tell me what I did wrong? Has someone in this group used
this particular ADC? The datasheet of MCP3208 is located here:
http://ww1.microchip.com/downloads/en/DeviceDoc/21298D.pdf

Thank you in advance,
Razvan



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ts-7000/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ts-7000/join
    (Yahoo! ID required)

<*> To change settings via email:
     
    

<*> To unsubscribe from this group, send an email to:
    

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU