problem with serial to propeller
dr hydra
Posts: 212
I cannot get the propeller to program·with the "serial to propeller" diagram listed on the web page (3 transistors to serial port).· I have checked over the schematic five times and it still does not work.· I have an USB2SER that I can use for programming that works great, but when I try the "serial to propeller" the IDE does not identify the propeller when I hit F7.· What am I missing?· Does the computer serial port have to be configured a certain way (bits per second, COM port, ect.....)·anything?· When I hit F7·with the propeller running, using a tv driver, the tv goes blank for a second, like it is resetting, then the IDE say a error·about not identfing the propeller.
··
··
Comments
www.parallax.com/dl/docs/prod/prop/PropStick-v1.2.pdf
- are you using a real com port or a usb to serial adapter on the pc ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
The "serial to propeller" circuitry is dependent on the specifics of your serial port and, although it works with most serial ports, it may not work on some. In particular, it requires that DTR be active and that DTR is pulsed at the beginning of the download sequence. Some USB to serial adapters don't provide this or the timing is delayed. Some very simple PC serial ports might not implement this properly. The USB2SER and PropClip/Plug and the FTDI driver for them is known to work properly.
I've been able to use the "serial to propeller" circuitry with a Keyspan USB-serial adapter with no problems. The PropStick circuit is more forgiving of sloppy serial ports
I do not think the FTDI drivers are causing your problems as I have had both attached to the PC and just switch on the one I want to program...
Quattro
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 3/17/2007 11:18:54 AM GMT
It may be that you'll have to use the MAX3232 type chip. Your computer just may have a "wimpy" serial port that isn't strictly RS232 (in terms of signalling voltages uses).
By the way, if you don't use any USB to serial adapters or USB to RS232 adapters, you don't need the FTDI drivers.
Quattro ..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
I think Mike has nailed all of the known issues and requirements centered on the DTR pin that I would have mentioned. This circuit was originally chosen, because it has already survived the test of time in one form or another. If you study it closely compared to the front end of the BS2 modules, you will see that it is nearly identical. I originally put it together for use on the Propeller after a trip out to California and realizing I misplaced/lost my USB2SER plug·after·returning home. At that time it was suggested that we make it available to our customers as an alternative method to program the Propeller. As Mike has pointed out, not all Serial ports are created equal, and while the 3-transistor circuit may work on most machines, there will still be·some machines that are not compatible.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 3/16/2007 8:06:13 PM GMT
The fact that its two machines now point to the circuit - Or the serial cable you are using - tx/rx incorrect by any chance - what cable are you running to the p.c ?
Is pin 5 of the serial port (DB9) [noparse][[/noparse]or PIN7 if its a DB25] ·also tied to gnd of the circuit ?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
www.lammertbies.nl/comm/cable/RS-232.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.
Mike, is the schematic drawn correctly for the 10K resistor from DB9.2 to DB9.4? The RS232 DTR is at a positive voltage when the port is connected and it is when the port goes from disconnect to connect status that the reset transistor T3 is turned on momentarily (in this circuit). Notice that the exact same reset circuit is used with USB or MAX232 chips but there the DTR signal is inverted going from 3.3V (disconnect) to 0V(connected).
But from this circuit this means DB9.2 can never go negative and so the PC will never see any data (actually it sees a break). Shouldn't this 10K go from DB9.2 to ground at least? Of course a negative voltage would be better but a swing of 3.3V to ground will work. There is also the issue with the DTR reset signal but you may find that it works anyway as the reset is momentary and generated on a DTR transition and the disconnect to connect cycle is very short.
*Peter*
Since the logic signals for RS232 are opposite than what you would normally think, a signal that is 'set' or '1' would show up as a negative voltage.· A signal that is 'clear' or '0' would show up as a positive voltage.
(Right now, with DTR 'set', I'm measuring -11V with respect to ground.)
The DTR signal is active High, meaning that when it is 'set' it is ready for operation.· When it is 'clear' this indicates that the serial port is busy and not ready for Data.· So normally in the clear mode (DTR = +V),· RX or TX communication is supposed to be suspended but many programs don't abide by this Data throttling method.
When the DTR line rises to +V, the Propeller is held in reset for approximately 300uS due to the 10nF capacitor.· The output of T3 goes LOW (0V) during this period, and then back HIGH (3.3V) after about·300uS.· When the DTR line returns to -V or the 'set' condition, the output of T3 remains HIGH due to an internal pull-up resistor in the Propeller.
While the DTR line is in the 'set' mode (-V), R1 acts as a pull-down resistor to the PC serial port RX line (pin2).· During Transmission from the Propeller, a LOW signal on the TX from the Propeller pin (p30) causes T2 to turn 'ON', thus forcing the RX line (pin2) on the PC serial port to go from -V to 3.3V.· A HIGH signal on the Propeller TX pin (p30) turns T2 'OFF'.· This action allows R1 to pull-down the voltage on the PC serial port RX line (pin2) to -V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 3/17/2007 6:41:43 AM GMT
The Propeller tool does not keep the coms port open when it is not programming so the DTR signal is sitting at -V (not connected) so don't use this as a guide.
Also note the comment I had made about the DTR circuit being the same regardless of whether it is operated from the RS-232 line or via an RS-232 receiver inverter. Note however that this is inconsequential to the operation of the circuit anyway as it is edge triggered.
*Peter*
I got this from Spark's Fun's History Museum page where they show all their mistakes - www.sparkfun.com/commerce/present.php?p=Prototyping-1 - just search the page for 3904 and you'll find the relavant story.
What this means is that the published 3 transistor circuit will work and should work for programming but when you try to run a program that uses serial communications to a terminal program then the DTR will be asserted (+V on RS-232 side of DTR) and this circuit will never be able to transmit data back to the PC. This is because the PNP that drives the TX line can pull it up to +3V3 and relies on the resistor to pull it down to ground or less (negative). But the pull-down resistor is tied to the RS-232 level DTR which sits at +V when the port is open. A continually break will be detected in this case. When the port is closed the DTR will once again go to -V and if you scope it while the Propeller is transmitting something it will look normal, but too late, the port is closed.
If this circuit is derived from the BS2 then it looks like it's not the same as the BS2 seems to be operating half-duplex (bitbashed?) as it has a 4K7 (vs 10K) from the collector of the PNP through to the receive line (normally sitting at -V if PC is not transmitting). So on the BS2 this will work but as long as the PC is not trying to transmit while the BS2 is transmitting.
Summary:
Propeller 3-transistor RS-232 circuit will work for Propeller tool by not with terminal programs (such as Hyperterminal).
Solution:
Take 10K resistor from PNP collector to ground instead (will work).
BTW, Dr Hydra, the Propeller tool cannot tolerate a slow PC or other programs hogging most of the CPU time as the Propeller seems to timeout if the PC doesn't respond fast enough (tested this). This problem is exacerbated with the transistor circuit because the DTR circuit is inverted from that used with the USBSER or MAX232 circuits and that extra delay coupled with a slow PC can be enough for it to timeout.
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
'Necessity is the mother of invention'
Post Edited (QuattroRS4) : 3/19/2007 2:20:28 PM GMT