Serial comms to and from PC to Propeller via USB
Toby Seckshund
Posts: 2,027
Hi all,
I know that this will probably draw a collective sigh from you all, but here I am with another "cannot find Prop ..." question.
I have made up (yet) another simple copy(ish) of a DemoBoard but just because I have so many I decided to try an AVR as the USB->serial (http://www.recursion.jp/avrcdc/cdc-232.html#schematic) usung the mega8 one as it has the DTR bits. Eventually I would have tried the 8 pin tiny45 version.
As half expected the Prop Tool doesn't spot the Prop on the Virtual Port 3 that the AVR sets up although I have tried a loop back with just the AVR on the board and that worked, I even tried reversing the RX and TX leads just in case.
The port reports that it is trying to do 9600,8,n,1 and no flow control, at this point I realized that as I have always used Comm1 via transistor or Max 232 interfaces I have never paid any attention to what the signalling rates or protocols are.
Anybody have any suggestions? (Prop related :-)
Both chips are at 3.3Volts reg from the USB Port
I know that this will probably draw a collective sigh from you all, but here I am with another "cannot find Prop ..." question.
I have made up (yet) another simple copy(ish) of a DemoBoard but just because I have so many I decided to try an AVR as the USB->serial (http://www.recursion.jp/avrcdc/cdc-232.html#schematic) usung the mega8 one as it has the DTR bits. Eventually I would have tried the 8 pin tiny45 version.
As half expected the Prop Tool doesn't spot the Prop on the Virtual Port 3 that the AVR sets up although I have tried a loop back with just the AVR on the board and that worked, I even tried reversing the RX and TX leads just in case.
The port reports that it is trying to do 9600,8,n,1 and no flow control, at this point I realized that as I have always used Comm1 via transistor or Max 232 interfaces I have never paid any attention to what the signalling rates or protocols are.
Anybody have any suggestions? (Prop related :-)
Both chips are at 3.3Volts reg from the USB Port
Comments
My main question is does the "packaging" of 8,n,1 ... get in the way and how flexible are the speed settings, I have just pushed real serial (Comm 1) back and forth up until now and every thing worked, fortunately. Presumably what I am trying to do is much the same as a USB -> Serial and then serial to Prop. I have a FT232 type chip here somewhere but the pin pitch puts me off.
Thanks for the reply
Alan
I see that when I put another Prop onto a real serial port the DTR is -VE going +VE but is a lot longer (20 mS?) and there is some extra activity after that, probably the acknowledgements going on when it does spot that board (my old "lunchbox")
I have swapped over the Props between boards to make sure that it wasn't a dead chip, any way it had a nice pinout label on the other one.
coming 2mS later than expected. An inverter between the AVR DTR and the capacitor would correct that. It could also be the rise time of the AVR signal so a larger (100n) capacitor might do the trick.
AFAIK the prop boot firmware automatically adjusts for the download speed of the connected computer, and the 8,n,1 is the standard setting of the comm port when the propeller software is installed on the PC.
First check if I were troubleshooting this issue would be to go to a larger capacitor on the DTR, and if that did not work then use an npn transistor to invert the DTR signal.
The DTR from COMM 1 is -ve and goes briefly to +ve (at rs232 levels) so my inital thoughs of it being the wrong way around might be false. The "improvements" to the Atmega45 version of the software made a thing about it but as I haven't got around to sticking the AVR software on the computer yet I thought that I would go for the mega8 one which had the RTS, CTS and DTR signals implimented even if it was 4 time bigger, I have a few of those kicking about and there was space in the box.
I'll have another go at it later on.
Alan
I tried removing the 10/100nF cap to the reset transistor and putting in a resistor instead. I even stopped trying to cheat by using the same Xtal as the AVR (12MHz) and gave it its own 5MHz rock to play with (not that that should affect the boot). Still no Prop detected :-(
http://forums.parallax.com/showthread.php?140901-Why-can-t-you-use-a-cheap-USB-dongle-to-program-the-Propeller-You-can-but...
-from about 6 months ago. I may be treading the same ground, I will have to try other IDEs and see if that changes anything. The delay changer 60-500 mS doesn't help in the present Prop Tool and the oldest "old" version I have a copy of is 1.2.6.
EDIT
Great, BST gives me a BSOD if I point it at the Comm 3 Virtual port that the AVR appears as. I am so glad that the local river is heavily flooded, I won't have so far to walk, and chuck it in!
Can you capture the relative timing of RST and Serial ?
If your scope is too simple, there are sound card scopes that should do 9600 bd ?
I noticed the Tiny45 was only spec'd to 1200 - 4800bps, 8N1 ?
USB in HW is also pushing down in price, I see a ATmega8, is actually more expensive than a ATXMEGA16A4U.
( Pity those Xmegas do not come in smaller packages yet.)
One thing that I did notice whilst comparing the working three transistor interface and the USB attempt was that the level on the Prop's RX pin went higher than the 3.3 V level. It went up about a protection diodes worth, so something must be bleeding through from the RS232 interface levels. It has been working OK for over 3 years so it can not be too bad.
Happy new year to all those over near Australia.
Alan
The Modules are getting quite cheap, and UM232H is ~ $20 (DIP) and physical variant UM232H-B (2mm) is ~$16, and those have the large buffers, and very fine baud granularity and Xtal precision of the 232H series. (even if you never use the high speed )
I see EXAR also have a ~$20 module, with RS485 options, and some interesting handshake and 9 bit support.
I've not tried one yet, but it looks to have a good embedded slant.
Perhaps another day/month ...
It didn't want any extra driver software (which supprized me) and spotted the Prop on Com4 without any fuss. I F11'd in Graphics Demo which went through all of the wanted verifications. Should have done that in the first place, I suppose!
With that blue transfer plastic and the usual ironing of the toner, 0.65mm pitch was quite easy (I have managed a QFP100 0.5mm before).
Right stick it in a case and pretend that it was all planned that way ...