Computer won't read Prop
DavidZemon
Posts: 2,973
Hello,
I recently bought my first Prop chip and tried to connect it to my computer via the RS232-USB cable I had laying around. I followed the schematic for the Alternative Serial Port Connection at the bottom of page 5 in the datasheet and checked over the schematic multiple times with a friend.
We also used said friend's oscilloscope to get a bunch of readings as the Prop Tool tries to find the chip. I've uploaded all the screenshots to my server.
If anyone has any clues as to why the computer is not seeing the chip, I'm open to ideas.
Thanks,
David
I recently bought my first Prop chip and tried to connect it to my computer via the RS232-USB cable I had laying around. I followed the schematic for the Alternative Serial Port Connection at the bottom of page 5 in the datasheet and checked over the schematic multiple times with a friend.
We also used said friend's oscilloscope to get a bunch of readings as the Prop Tool tries to find the chip. I've uploaded all the screenshots to my server.
If anyone has any clues as to why the computer is not seeing the chip, I'm open to ideas.
Thanks,
David
Comments
In the past, I have experienced the PC not finding the prop due to windows install problems.
At least one time was something with .Net 1.1, I think. Another time was due to an old version of one driver, and new version of another driver. In these cases, a clean install of windows took significantly less time than troubleshooting the root cause, since there's nothing we to be done about windows
I've looked at your scope tracings. It looks like the Propeller is getting a good reset pulse. The RS232 adapter schematic is correct and it does work with a known good USB to RS232 adapter. The Prop really doesn't need anything to work other than a 3.3V power source and a 3.3V logic Tx, Rx, and Reset signal from a PC running the Propeller Tool (or BST). Not having a crystal or an EEPROM limits what you can do, but you can do a lot of programming without them.
Do you think it's worth sending back to Digikey for a replacement? I'd hate to do such a thing, but no one around here has even heard of the chip, let alone has a proto board that I could test this on.
I'll tear apart the bread board and rebuild it - maybe there's just something wrong with the serial schematic that I keep missing. I'll do my best to place the wires in such a fashion that a picture would be useful. If anyone has other ideas, let me know.
I can replicate your problem. My USB adaptor does not reset the propeller. I can also confirm that it works perfectly for data as I have done a loopback test into my real serial port using a terminal program.
I can even test things further because I have a program already on the propeller which displays data coming in the serial port, so when you do a F7 on the prop tool to find any propeller chips connected, my USB cable does *not* reset the propeller because the programming running on the propeller does not stop. The data flow works as it sends some bytes which I can see on the screen attached to my propeller chip.
And for comparison, going back to the real serial cable, it does reset the propeller as soon as you hit F7.
I know the Picaxe community have had a lot of similar problems and in the end the only solution is to buy one particular cable that is know to work from the company.
There is another solution, and that is to use the on-board USB to serial chip, because these are known to work.
So after doing these experiments I think it is looking like Mike Green describes in post #3 - the DTR line is not doing a reset properly. Maybe it is not implemented in the software driver, maybe it doesn't have enough of a kick to reset the prop, maybe the pulse is too short?
I suspect it is the software driver, because I have just done some testing with vb.net toggling the reset line and this does not work with the USB to Serial adaptor but it does work on a real serial port.
The "official" answer is probably to get one of these http://www.parallax.com/Store/Microcontrollers/PropellerTools/tabid/143/CategoryID/19/List/0/SortField/0/Level/a/ProductID/398/Default.aspx
I have tried some other USB to TTL boards from eBay (~$4 posted) and together with the reset circuit (transistor, resistor and capacitor) connected to the DTR pin of the chip (often they are not brought out to the header) they worked.
The PropTool works by setting DTR active, then inactive and it remains inactive while it runs. This is the opposite to the way DTR normally works. It is the TTL active (0V) to inactive (3V) which causes the transistor to fire a 0V pulse to the propeller chip to reset it.
Here is a link to this discussion http://forums.parallax.com/showthread.php?133362-Why-do-we-need-the-transistor-reset-circuit-for-the-USB-devices-(FT232RL-CP2102)&highlight=propplug+cheap+usb
IIRC the problem with some USB to RS232 cables is that not enough power is provided by the RS232 drivers to make the transistor level shifting circuits work.
On your scope trace, the DTR only goes active (+V) at time 0 and returns at +0.15 (scale looks like .15ms = 150us). I do not see a pulse on the reset at 0 time, only prior to it.
If you use this cable for your 8051, what circuitry do you have to interface the cable to the 8051? Perhaps you can tap the TX and RX and DTR TTL lines from this???
That link is not how I constructed it at all. Right away, I notice there are three transistors and 10k resistors. I used the diagram in the prop datasheet - a screenshot of which is attached.
1) rebuilt the circuit in the datasheet in such a way that a picture will come out clear and easy to follow
2) test it and, assuming it doesn't work again, take a picture to post
3) buy the parts necessary for and assemble the adapter linked by Mike Green
4) post results
That would save you a lot of grief. The QuickStart is just $25...
I've seen a lot of people have a lot of trouble with regular RS232 connections. USB is a LOT easier...
I guess you're working from a breadboard then.
A lot of people forget to connect all the GND and Vdd pins of the Prop. Also, sometimes they don't put any capacitors on Vdd, near the Prop.
These can cause problems. Make sure you don't have RX and TX reversed.
BTW: If a programmer was available for $10, would you get it then?
Also, that circuit always looked a little wierd to me... I don't see why RX is connected to DTR with that resistor...
The PropPlug brings DTR through a capacitor (pulled down with a 10k resistor) to a NPN transistor base with the emitter grounded
and the collector to RES. You might try it that way. I'm not sure if the polarity of DTR is the same in your setup though...
I understand your budget. Lets get it going first.
Yes, tonight I'm going to rebuild the circuit with the intent of taking a picture. The reason I haven't taken a picture yet is because it's a complete mess and it's nearly impossible for anyone to debug it in person, let alone through a picture.
Rayman: I would certainly consider buying it for $10 (including shipping). Of course, part of it is, I enjoy this =D, so that makes plug-n-play worth a lot less to me.
You might get lucky and find that when you clean it up so its presentable that it starts working.
I also think its more fun to work through it, keep at it. When it works, we'll want to hear what your project is going to be.
I was really hoping I'd be able to post "Derp!!! It works now!" Not the case though.
A high-res image of the breadboard is here. The mess of wiring at the bottom of the picture is to connect both voltage regulators and the power-on LEDs. all of the wiring for the serial connection is above the chip.
Further I would connect the resistor between Serial RX and DTR not to DTR but to Ground. Otherwise you can only programm the Prop but not communicate to most Terminal applications. Most serial to USB converters have a threshold voltage greater than 0V, so this should work.
Do you have the right Transistor at the Serial RX line (a PNP)?
Hope it works then...
Andy
-Phil
What error message do you get from the PropellerTool?
Andy
Windoze thinks COM26 is my adapter.
Thanks all for the help!
Glad you got it working, can't wait to hear what you do with it.
Consider the possibility?
This philosophy only matters if the 4 hours wasted were 4 hours that could have been spent on something that would have paid me. They weren't.
But, none-the-less, the prop plug is ordered and will be here soon anyway. I have a thread going for the long-term project here