How do I detect a propeller plug?
LarsE
Posts: 4
I am working on an instrument project with a propeller chip and a propeller plug in it.
My part in this to get the reports out of the instruments via the plug and USB-cable to a Visual Basic app in the PC.
I have noticed that Propeller Tool reports different COM-ports upon almost every reconnection of the USB-cable.
How does the Propeller Tool identify the plug?
Is there some reference material on the plug interface?
My part in this to get the reports out of the instruments via the plug and USB-cable to a Visual Basic app in the PC.
I have noticed that Propeller Tool reports different COM-ports upon almost every reconnection of the USB-cable.
How does the Propeller Tool identify the plug?
Is there some reference material on the plug interface?
Comments
As Spork Frog notes, and you've observed, the Propeller Tool scans all ports it can find looking for a Propeller Chip to answer back when it sends out a reset and an "are you there ?" message.
( See other forum posts regarding comments about how this scanning can cause problems with some Bluetooth devices and how that behaviour is undesirable for some users )
Only after that can the Prop anwser intelligently.
This protocol is described here somewhere, and it is used in many "download helpers"...
Post Edited (deSilva) : 10/18/2007 12:36:34 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?
Without it I still would have been fumbling in the dark.
Using the propellers built in protocol just to detect the instrument suddenly seemed like a bad idea.
Came up with a possible solution however:
We have come to the conclusion that its best to leave the interface "as is" and make use of the fact that connecting the USB cable triggers a reset.
When booting/resetting a splash screen shows on the instrument which will stay until a button is pressed. While showing the splash screen
the instrument is beaconing its presence to the PC which can set up itself to use the correct COM-port.
If one wants the PC connection leave the button be until a connection is established otherwise press button and start using it standalone.
In my application I monitor the Rx line, and when a 'break' is seen it sends a message back to the PC. A VB program runs through the serial ports it can open, asserts the 'break' and waits to see if it gets the message it's looking for. When it does you've found your Propeller COM Port, otherwise timeout, close the port and try the next one. Similar to how the PropTool works but without using reset.
my experiences...
Here's the solution we finally came up with.
We abandoned thought of using virtual COM-ports, used the native FTDI API set instead and finally we cut the reset line, leaving a couple of soldering pads to enable programming by simply jumpering them temporarily.
Using the FTDI API set made everything way more powerful and stable than any comm port app I ever wrote before.