Shop OBEX P1 Docs P2 Docs Learn Events
prop to prop communication — Parallax Forums

prop to prop communication

lyons5959lyons5959 Posts: 13
edited 2007-03-14 09:48 in Propeller 1
i'm working on a data display. so far i have one prop set up to output a display to a tv and another interfaced with ADC's and thermocouples. I'm trying to use FullDuplex to interface the two. Do I need pull up resistor on the lines. so far this hasn't work. it works when the data prop is transmitting to the prop plug and the display prop is recieving from the prop plug but it won't work when the two are together. any ideas?

Comments

  • lyons5959lyons5959 Posts: 13
    edited 2007-03-14 03:30
    heres some code

    the data end
    Con
      _clkmode      = xtal1 + pll16x                        ' use crystal x 16
      _xinfreq      = 5_000_000
    
      _data = $7000
    
      tcpin = 4
    
    OBJ
    
      THERMO : "thermocouple"
      ADC : "adc_in"
      RPM : "rpm"
      uart : "fullduplex"
    
    PUB Main | k, cog, ok
      uart.start(3,2,9600)
    
      THERMO.start(tcpin,_data + 20)    'collect thermocouple data)
      ADC.start(_data + 4)
      RPM.start(_data)
    
      repeat
        ok := uart.rx
        if ok == "s"
          uart.tx("s")
          repeat k from 0 to 21
            uart.tx(byte[noparse][[/noparse]_data + k])
    
    




    and on the display end
    Var
      long stack[noparse][[/noparse]30]
    
    Obj
    
      uart : "FullDuplex"
    
    Pub start(passval) : cog
    
      cog := cognew(main(passval), @stack) + 1
    
    Pub main(_data) | k, ok
    
      uart.start(5,2,9600)
    
      waitcnt(cnt + 160_000_000)
    
      repeat
        uart.tx("s")
        ok := uart.rx
        if ok == "s"
          repeat k from 0 to 21
            byte[noparse][[/noparse]_data + k] := uart.rx
    
    
  • T ChapT Chap Posts: 4,223
    edited 2007-03-14 03:32
    You don't have the mode parameter in the Full Dup start. This may or may not solve it, but try (rxpin, txpin, 0, baud). This assumes you are using the Full Duplex Serial Object
  • lyons5959lyons5959 Posts: 13
    edited 2007-03-14 03:34
    the FullDuplex i'm using might be old because it doesn't have a mode parameter. anyways i know that each one works by itself with this exact code, they just don't work with each other. do i need pull-up resistors?
  • T ChapT Chap Posts: 4,223
    edited 2007-03-14 03:44
    Did you already try a 10k pullup on both lines? Sounds like something other than pullups.

    Post Edited (originator) : 3/14/2007 4:04:13 AM GMT
  • simonlsimonl Posts: 866
    edited 2007-03-14 09:48
    OK, I'll ask the dumb question (!): have you crossed the Tx/Rx lines?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon

    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif

    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
Sign In or Register to comment.