Shop OBEX P1 Docs P2 Docs Learn Events
Tlv 2543 help needed. — Parallax Forums

Tlv 2543 help needed.

mosquito56mosquito56 Posts: 387
edited 2009-08-20 06:30 in Propeller 1
· I cannot get the tlv object from the object exchange to work. I am not familiar with asm.

Can anyone· tell me how to setup the pins for the cs,clk, do,di,eoc. The program uses a config.spin which is gibberish to me.

I hooked it up on pins 15-19 as per tlv2543 pub start instructions.

I changed the start to· adc.start(cs,clk,do,di,eoc) with each pin as per instructions.·No luck. Any help apreciated.

I·am using the·8038 for about 6 months so I am familiar· with adc chips but the program has got me lost.

I am using the professional dev board.



Thanx

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·······

······· "What do you mean, it doesn't have any tubes?"
······· "No such thing as a dumb question" unless it's on the internet
········

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2009-08-20 05:25
    TLV2543 connections
    Vcc (pin 20) and Ref+ (pin 14) 3.3V
    Gnd (pin 10) and Ref- (pin 13) 0V
    CS (pin 15) Prop
    IOClock (pin 18) Prop
    Datain (pin 16) Prop
    Dataout (pin 17) Prop
    EOC (pin 19) Prop
    AIN0-10 (pin 1-9,11-12) Analog inputs

    the pin numbers on the left are the pins on the tlv2543, when connecting to prop pins, put the prop pins in the right place in start()
  • mosquito56mosquito56 Posts: 387
    edited 2009-08-20 05:46
    · adc.start(config.GetPin(CONFIG#TLV2543_CS),config.GetPin(CONFIG#TLV2543_CLK),{
    }·· config.GetPin(CONFIG#TLV2543_DO), config.GetPin(CONFIG#TLV2543_DI),config.GetPin(CONFIG#TLV2543_EOC

    This seems to indicate (cs,clk,do,di,eoc). Is this correct? You say put them is right place.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet
    ········
  • Greg LaPollaGreg LaPolla Posts: 323
    edited 2009-08-20 05:54
    here is how I have done it:

    
    CON
    
      EOC    = 1                                                                    ' tlv2543 config  EOC Pin
      CLK    = 2                                                                     ' tlv2543 config  CLK Pin
      SDI    = 3                                                                     ' tlv2543 config  SDI Pin
      SDO    = 4                                                                    ' tlv2543 config  SDO Pin
      CS     = 5                                                                     ' tlv2543 config  CS Pin
    
    OBJ
       adc : "TLV2543"                                                            ' Driver for TLV2543    
    
    PUB Main
    
      adc.start(CS, CLK, SDI, SDO, EOC)                                 ' start TLV2543 driver       
     ...
    
    



    then you can just use somevar := adc.GetData(x) where x is the channel you want.


    Hope that helps


    Greg
  • mosquito56mosquito56 Posts: 387
    edited 2009-08-20 06:30
    con

    cs=15········· 'chip 15
    · do=16········· '···· 16
    · di=17········· '···· 17
    · clk=18········ '···· 18
    · eoc=19········ '···· 19

    adc.start(cs,clk,do,di,eoc)

    I have di· and do reversed. Thanx

    That got it. It's working



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·······

    ······· "What do you mean, it doesn't have any tubes?"
    ······· "No such thing as a dumb question" unless it's on the internet


    Post Edited (mosquito56) : 8/20/2009 6:35:32 AM GMT
Sign In or Register to comment.