Shop OBEX P1 Docs P2 Docs Learn Events
2 props 1 FDTI chip — Parallax Forums

2 props 1 FDTI chip

steprogsteprog Posts: 227
edited 2010-07-14 23:23 in Propeller 1
Hi Guys,
I just ran into a relatively interesting problem.· I got two props using one USB chip and when I use FullDuplexSerialPlus.spin. It·jams up.· I have separate and unique commands going to the separate chips.· However·I didn't consider that the tx line would always be "on" for both props.· Does anyone know how to·set the tx line in ·FullDuplexSerialPlus.spin off when not in use?
Thanks,
Greg

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-13 18:50
    Add a 4.7K pullup to the TX line and configure FullDuplexSerial for open-drain output when you start it.

    -Phil
  • steprogsteprog Posts: 227
    edited 2010-07-13 18:54
    Hi Phil,

    Thanks for that.· Unfortunately I already have the board surface mounted and built.· I do have resisters in series.· Is there anyway to just set the tx line as input when not in use?.· I Looked through the code and hadn't figured out how to do that yet.

    Greg
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-13 19:05
    steprog said...
    Is there anyway to just set the tx line as input when not in use?
    Not easily. You'd have to do it in the cog that FullDuplexSerial uses, which would entail modifiying the code.

    Since you already have your board built, just remove one of the "series" resistors and replace it with a diode (cathode end connected to Prop). The remaining resistor should be between 1K and 4.7K. That way, the remaining resistor will act as a pullup for the Prop driving the diode, but it will be able to drive the line both high and low when the diode-driving line is high.

    -Phil
  • steprogsteprog Posts: 227
    edited 2010-07-13 19:15
    Interesting Ideal.

    So convert the prop with the diode to open collector mode and leave the other prop in "normal" mode and allow the "normal" mode prop to pull the diode up or down.· Interesting ideal.· It may have a problem getting over the .7v drop, but I don't think so.

    Thanks Phil,
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-13 19:33
    Both Props can use normal mode. The diode does the conversion to open-drain for the Prop it's connected to. You won't have any problems from the diode's forward voltage drop. If you don't want to use a diode, just replace that resistor with a very low value resistor or a dead short. In that case, the Prop on that side will have to be operated open-drain. The resistor remaining between the two outputs will still protect against bus conflicts.

    -Phil

    Post Edited (Phil Pilgrim (PhiPi)) : 7/13/2010 7:39:01 PM GMT
  • steprogsteprog Posts: 227
    edited 2010-07-13 19:57
    I think I might try the resister.· Having a hard time finding a 603 diode.

    Thanks,

    Greg
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-07-13 20:22
    There are quite a few 0603 diodes on digikey. This one for example. But there are about 20 that they have stock of.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    April, 2008: when I discovered the answers to all my micro-computational-botherations!

    Some of my objects:
    MCP3X0X ADC Driver - Programmable Schmitt inputs, frequency reading, and more!
    Simple Propeller-based Database - Making life easier and more readable for all your EEPROM storage needs.
    String Manipulation Library - Don't allow strings to be the bane of the Propeller, bend them to your will!
    Fast Inter-Propeller Comm - Fast communication between two propellers (1.37MB/s @100MHz)!
  • steprogsteprog Posts: 227
    edited 2010-07-13 20:25
    Hi Bob,
    Diodes diodes everywhere, but not where I sit in the middle of the desert. I need to get this done really soon so I need to use whats on hand.
    Thanks,
    Greg
  • steprogsteprog Posts: 227
    edited 2010-07-14 21:07
    Phil or whomerver

    I put in a 10ohm on one prop with open collector and on the second prop 1500 ohm normal mode.· Acts erratic.· I tried it again replacing the 1500 ohm with 5k same difference.· I wonder if the theory is right here.

    Greg
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-14 21:38
    Are you sure that only one Prop is transmitting at a given time?

    -Phil
  • steprogsteprog Posts: 227
    edited 2010-07-14 21:46
    Hi Phil,

    I just figured out that it's not erratic.· I got four operations 2 coming from each cog.· When I pass variables and commands from either cog by itself it works fine.· When I try to use the other cog it hangs up.· I'm using robot basic to write the interface.· I don't get it unless the tx line lies low after transmission and doesn't pull up the other line.· Not sure let.

    Greg
  • steprogsteprog Posts: 227
    edited 2010-07-14 22:41
    Phil,
    I apparently had a software problem. I basically started banging on the props until they decided to talk to me in software. That seemed to work fine and your hardware solution seems to work great.
    Thanks Bunches,
    Greg
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-14 23:23
    Oh good! I'm glad it worked out.

    -Phil
Sign In or Register to comment.