ts-7000
[Top] [All Lists]

Re: [ts-7000] 50% functional MCP3208

To:
Subject: Re: [ts-7000] 50% functional MCP3208
From: Kevin Cozens <>
Date: Mon, 18 Feb 2008 16:06:55 -0500
Razvan Ionut Stoian wrote:
> 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:
[snip]
> Could you tell me what I did wrong?

I haven't tried talking with that particular part. I did recently have to set 
up routines to control some relays via the MCP23S08 chip. If you are 
interested, I can show you the code I used.

The one thing you don't show in your code snipped is how you initialized the 
SPI interface. Check the state of the SPH, SPO, and FRF bits in the SSP1CR0 
control register. Make sure the output line is idling in the right state, the 
phase of the clock in relation to the data, and that the SSP system is set for 
SPI.

-- 
Cheers!

Kevin.

http://www.ve3syb.ca/           |"What are we going to do today, Borg?"
Owner of Elecraft K2 #2172      |"Same thing we always do, Pinkutus:
                                 |  Try to assimilate the world!"
#include <disclaimer/favourite> |              -Pinkutus & the Borg


 
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