Shop OBEX P1 Docs P2 Docs Learn Events
Strange difference with/without programming cable — Parallax Forums

Strange difference with/without programming cable

nohabnohab Posts: 96
edited 2009-05-14 12:57 in Propeller 1
A friend and I are building Propeller-powered-switchboards for Model railway. We are useing the same concept: 74HC595 shift-registers to extend the output possibilities, i.e. more LEDs on the switchboard panel.·
We are using different protoboards, he's got the new one with USB-chip onboard and I have the "old" one with separate USB-plug.
I'm helping him with the coding and to get him started I put som testcode together. I tested it on my protoboard and it worked fine, and it alse seemed to work on his, but when the programming cable was removed and the Propeller was switched off/on, I didn't work any longer?!

Symtoms/troubleshooting:
We have switched panels, no difference.
We have tried two protoboards with and two without USB-chip onboard. None of the first, both the latter have the problem.
If the USB-protoboard is switched on without the programmingcable, all LEDs on panel just twinkles shortly about once a second, at the same time as a small red LED just besides the USB-chip twinkles. Waiting a while doesn't solve the problem.· BUT when the programming cable is connected to the board and to an USB-jack on a PC (even if the PC in idle state), it starts working ?!?!, and the programming cable can then be deconnected again, still working...

So, is there anywhere in the documentation, which I can have missed, that say that USB-protoboards must be started with connected programming cable?
Can we have done anything else wrong? or are (both) the USB-protoboards we have faulty??

I don't think the problem is in the code, but I guess someone will ask for it so I attach that as well.

/Niclas

Comments

  • Michael O'BrienMichael O'Brien Posts: 55
    edited 2009-05-13 11:23
    Nohab,
    Hi, I have seen the same behavior with my usb proto boards (serial port read led flickers trying to comm with a pc), I usually keep them connected to the pc though - so I have not worked around this issue. Your boards are working normally. There was a post about 2-3 months back on bridging pins for projects that must be disconnected but retain the usb circuit.
    /michael
  • hover1hover1 Posts: 1,929
    edited 2009-05-13 12:22
    I too have the same problem, but had not looked into it. This posting sparked my interest again, so I did some digging. Solution can be found in the following:

    http://forums.parallax.com/forums/default.aspx?f=25&m=333972

    Thanks for bringing it up!

    Jim
  • RaymanRayman Posts: 14,827
    edited 2009-05-13 12:46
    Very interesting... I'm aware of power from the FTDI USB chip giving power to the Prop, but haven't heard of the Prop powering the FTDI chip! Do I have this right?

    I don't have this problem in my design. Perhaps because I have 1k series resistors on the RX and TX lines...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • hover1hover1 Posts: 1,929
    edited 2009-05-13 13:42
    Rayman said...
    Very interesting... I'm aware of power from the FTDI USB chip giving power to the Prop, but haven't heard of the Prop powering the FTDI chip! Do I have this right?

    I don't have this problem in my design. Perhaps because I have 1k series resistors on the RX and TX lines...

    Ray,

    I think because you have the resistors in the circuit you don't have the problem. The fix was to add a pullup on A30. It seems the problem·occurs when using FullDuplexSerial. I am writing to a Serial LCD using that object.

    Going to try the fix when I get home tonight.

    Jim
  • RaymanRayman Posts: 14,827
    edited 2009-05-13 14:01
    Sounds like an easier fix is to just not enable the serial driver when not debugging with USB cable...

    Maybe this could be done automatically be checking for a HIGH in the Props RX line and only enabling the serial driver is it is HIGH...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-05-13 14:57
    This is a known issue, and there have been numerous threads that address it:

    http://forums.parallax.com/showthread.php?p=651731
    http://forums.parallax.com/showthread.php?p=790298
    http://forums.parallax.com/showthread.php?p=774972

    Reminder to Parallax: This is a fixable problem.

    -Phil
  • hover1hover1 Posts: 1,929
    edited 2009-05-13 23:59
    Reminder to Parallax: This is a fixable problem.

    -Phil
    Or at least in·the sticky.

    @Phil

    I just spent 15 minutes to find the first referal to the problem. I didn't know there where three seperated threads!

    I was going to try the pullup resistor·fix tonight, but my circuit is on a demo board and it's kinda hard to hack A30 on it. Final design is going on a non-USB proto board so it should not be a problem.

    @Ray

    Going to try the software solution also. That beats firing up the iron and putting lead in the air. We must do our part in save the enviroment through software rolleyes.gif

    Thanks guys!

    Jim
  • nohabnohab Posts: 96
    edited 2009-05-14 07:26
    Thanks all for the explanation of why and suggestions for solving the problem !

    I won't tell if I'm environmental-friendly or just lazy....but I decided to try the add-no-extra-component-solution suggested by Rayman.

    I often include the serial_terminal object for debugging, whether or not I have a PC attached, which hasn't been a problem with the regular protoboard, sending the data out in nowhere if no USB-plug is connected. As this has become a problem with the USB-protoboard, and I still like the idea of having the debug code in place for easy debugging, I added just a few lines of code at program start which checks whether pin 30-31 is hi or low, and only if hi starts the serial communication and sets a debug-flag.

    Thanks guys!
    Niclas
  • RaymanRayman Posts: 14,827
    edited 2009-05-14 12:57
    Glad to hear it worked! I think you only need to check one of those pins... But, I guess checking both works too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Prop Info&Apps: ·http://www.rayslogic.com/propeller/propeller.htm
Sign In or Register to comment.