Propeller Serial Programming Adapter - Testing
Mike Cook
Posts: 829
I built the Propeller Serial Programming Adapter as shown here:
http://forums.parallax.com/attachment.php?attachmentid=41153
I tested it with the Basic Stamp Debug Window as follows; and am curious to find out if this is a valid test since I don't have the Propeller Tool or Chip yet to test this adapter.
Test Procedure:
1. Connected the Propeller Serial Programming Adapter to Com3.
2. Opened a new debug window for com3 and configured to 19200 baud.
3. Checked the DTR box in the debug window, observed a very short negative pulse on the RST line of the Propeller Serial Programming Adapter.
4. Unchecked the DTR box in the debug window, no pulse observed.
5. Connected a SX chip that outputs serial data at "T19200" to pin RX(P30) on the Propeller Serial Programming Adapter.
6. Reset the SX chip (it outputs serial data on power up) and observed expected serial data in the Stamp Debug Window.
7. Typed a few keys in the Basic Stamp Debug Window, observed toggling data on TX(P31) on the Propeller Serial Programming Adapter.
I attempted testing this with a standard terminal program (HyperTerm & ProComm) and both of these terminal program assert DTR when the com port is open. With DTR asserted I don't get any serial data from the Propeller Serial Programming Adapter RS-232 PIN 2.
Is this the expected behavior of this circuit?
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
http://forums.parallax.com/attachment.php?attachmentid=41153
I tested it with the Basic Stamp Debug Window as follows; and am curious to find out if this is a valid test since I don't have the Propeller Tool or Chip yet to test this adapter.
Test Procedure:
1. Connected the Propeller Serial Programming Adapter to Com3.
2. Opened a new debug window for com3 and configured to 19200 baud.
3. Checked the DTR box in the debug window, observed a very short negative pulse on the RST line of the Propeller Serial Programming Adapter.
4. Unchecked the DTR box in the debug window, no pulse observed.
5. Connected a SX chip that outputs serial data at "T19200" to pin RX(P30) on the Propeller Serial Programming Adapter.
6. Reset the SX chip (it outputs serial data on power up) and observed expected serial data in the Stamp Debug Window.
7. Typed a few keys in the Basic Stamp Debug Window, observed toggling data on TX(P31) on the Propeller Serial Programming Adapter.
I attempted testing this with a standard terminal program (HyperTerm & ProComm) and both of these terminal program assert DTR when the com port is open. With DTR asserted I don't get any serial data from the Propeller Serial Programming Adapter RS-232 PIN 2.
Is this the expected behavior of this circuit?
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Using a terminal program such as RealTerm or the Basic Stamp debug window, where you can control DTR, with DTR asserted I get a short negative pulse out RST. While DTR is asserted no serial data arrives to PIN 2 of the RS-232 connector. De-asserting DTR allows serial traffic to pass from RX(P30) to PIN 2 on the RS-232 connector.
Am I correct in assuming that the Propeller Tool momentarily asserts DTR to just reset the Propeller Chip?
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Try moving the 10K (Currently between RX and DTR) so that it is between RX and TX.
As is, the 10K acts as a pull-down, using the DTR as it's -V source. When you assert DTR,
the 10K acts as a pull-up, and the data does not flow because it remains at +V.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/10/2006 11:33:11 PM GMT
I built this as per this diagram:
http://forums.parallax.com/attachment.php?attachmentid=41153
If the circuit is built as per the above diagram will it work to program the Propeller?
Was trying to perform some tests with the board I built to verify it was built as per the diagram. I've been over the board and all looks ok. Even bread boarded a second copy of it and the bread board version has the same behavior.
I also attached a screen shot of the pulse when DTR is asserted.
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
I built the circuit on a breadboard, and it worked but caused problems.
I then built the circuit on a vero-board, and it works perfectly.
I used the same circuit diagram you have.
Cheers,
Chris
I'm a little confused. In the attached circuit diagram the 10K is between RX (PIN 2 on the RS-232 connector) and DTR (PIN 4 on the RS-232 connector). Was there just a typo in your response of: (Currently between TX and DTR)? Or am I still not getting it?
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
I guess I'll just have to wait for the chip to get here to know for sure. I have a USB2SER but wanted a serial version of the programmer too.
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Yes. The above circuit works, however if you want to send data from the Propeller
back to the PC, the DTR line must be kept at -V as you have discovered.
Yes, a typo, that should be between RX and DTR I will change it.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Eagerly awaiting the Propeller tool and the Chip!
Thanks again!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
So just to clarify the attached Propeller_Programmer_ONLY.JPG as copied from:
http://forums.parallax.com/forums/attach.aspx?a=6685
Would be a Propeller programmer ONLY.
And the attached Propeller_Programmer_And_Serial_Tool.JPG, modified as per this thread, can be used as a Propeller Programmer AND a serial TTL to RS-232 tool for something like "FullDuplex.spin"?
Sorry to be so anal but I work in an industry where we have to have debugging procedures for something as simple as a cable!
Thanks Again,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Post Edited (Mike Cook) : 4/11/2006 4:19:46 PM GMT
It's great that you are so far ahead in testing before we receive our
propeller, Can you post a pic of your serial programming adapter?
Rob7
I've discovered during my own Propeller programming that it's actually handier to use a separate serial port for debugging. The reason is that you can then leave your debugging port open all the time in your terminal program (PBASIC Debug window highly recommended), rather than having to close it every time you upload a program. But you really don't need any additional circuitry -- just a female DB9 connector with pin 5 connected to ground and pin 2 connected to a Propeller port pin. You see, most PCs' RS232 ports work fine with 0 to 3.3V signal levels. The trick is to use a Propeller serial driver that works with inverted logic, so you don't need the hardware inverters.
Cheers!
Phil
Rob
Attached is a photo of the board so far. The board marked PSPA is the Propeller Serial Programming Adapter. There is also a spot on the main board for the USB2SER. Wanted to have both type of adapters to test with. more info on my board can be found here:
http://forums.parallax.com/showthread.php?p=579595
Phil
I understand what your saying, I've used the Inverted technique with SX's, AVR's, PIC's and other Stamp Models. However when I'm starting out with a new chip I prefer to work with traditional RS-232 circuits to avoid anything that might be the least little bit flaky at Inverted TTL logic levels. Once I see it work then I'll back slide to the Inverted TTL logic levels for short distance serial debugging.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
I wanted to test the revised schematic before I replied, and it does NOT work.
The original COM2Propeller schematic that I created, is the one you want to use when programming or communicating to the Propeller.
I have attached a few screenshots of the bare minimum SBB (Solderless Bread Board) components required to program a Propeller.
Note: If you don't have or can't find a 3.3V regulator, you can use a 220 Ohm and a 330 Ohm resistor combination on an adjustable regulator(LM317) to get about 3.2V
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Thanks for going to all the trouble to test the modified diagram. I'll edit my original post to remove the reference to:
Propeller_Programmer_And_Serial_Tool.JPG
Thanks Again,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Mike
Not to nit-pick, but in your "original COM2Propeller schematic", you have p30 labeled as RX and p31 labeled as TX, I'm assuming this is a typo, but I want to make sure, as I am etching a circuit board, and I don't want to end up with a square green coffee cup coaster.
Thanks again,
Brian
p31 receives from the host
p30 transmits to the host
Both signals are TRUE (start bit = low) 3.3V logic.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
The schematic is correct. The pins are referenced as if the COM2Propeller was a PropellerClip.
Reference the image below:
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/15/2006 4:00:25 AM GMT
Would you care to confirm exactly what schematic is correct??? Both have conflicting Rx and Tx lines. I am now trying to connect, but not seeing anything. I want to confirm this first. I have triple checked my wiring otherwise, and things seem to check out.
Do you think I would have an issue if I were using a USB/Serial adaptor (Keyspan)? That is what I have right now (my woman has my laptop with a REAL serial connection I will try tomorrow night).
My B-E-A-U-T-I-F-U-L DEMO board is in the attached pic. Don't ask to see the other side, it's not so nice.
Thanks in advance,
-Parsko
·
First, pretend for a moment that the "COM2Propeller" schematic·IS a "Propeller Clip" depicted in the Propeller Manual.
·
RX from the "Propeller Clip" or "COM2Propeller" goes to the TX(A30) on the Propeller
TX from the "Propeller Clip" or "COM2Propeller" goes to the RX(A31) on the Propeller
·
With the exception of the name difference·of VSS and GND, the "COM2Propeller" is pin for pin compatible with the "Propeller Clip"
·
·
·
I'm not sure about your USB/Serial adaptor from Keyspan, but with the Parallax USB2SER adapter, the "COM2Propeller" is not necessary.
Just connect the RES,TX,RX, and VSS lines of the USB2SER accordingly. (<-- Read ... as if it were a "Propeller Clip" depicted in the Propeller Manual.)
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
To test the board, I jumpered pins 39 and 40 of the (empty) Propeller socket with a piece of wire, then sent characters from my PC serial port to the Propeller board to see if they would echo back. No luck. (I used a serial port exerciser program that lets me manually set or clear DTR, and had manually DTR set low.)
So as a test, I breadboarded 2 2N3904 transistors - both emitters to gnd, both collectors thru 2.2K to +5V, RS232 TX thru 10K to the base of one, its collector thru 10K to the base of the second, collector of the second to RS232 RX. Characters echoed fine thru this circuit.
But if I supplied the second transistor, the RS232 RX driver, with 3.3V, it would not drive my PC's serial port. Garbage characters did arrive, showing that 3.3V is just at the threshold of working.
So apparantly my PC (IBM NetVista with built-in RS232) does not work properly with only 3.3V driving its RS232 RX input, but 5V is OK, and it does not require a negative voltage in order to work properly, ground is OK. Maybe this is the reason several others are reporting that they can't get this circuit to work.
Am I correct in expecting to be able to echo characters by jumping pins 39 and 40?
Does anyone see any problem with the substitution of the above-described NPN in place of the PNP, wired as above, 5V thru maybe 2.2K to its collector, Propeller RX(P30) thru 10K to its base, and its collector driving the RS232 RX? I'd leave the DTR driving the RESET pulse circuit just as is, and leave the TX circuit as is.
David
It's difficult to test a circuit on all platforms with all conditions. That said, I came up with the 3-transistor circuit as a derivative of what is
built onto the BS2 modules. The difference is that the BS2 modules are capable of supplying 5V where the 3-transistor circuit from the
Propeller·(that seems to work in most situations) can only supply 3.3V.
The culprit is the RX line going to the PC or Laptop, this is a "up level shifter" ( through the PNP) which steals it's LOW signal from the DTR.
Perhaps I should re-think this part of the circuit, so that a HIGH signal is "stolen" from the serial connector, and a signal from the Propeller
brings it LOW. This would also address the problem of communication depending on what state the DTR pin is in.
The other signals (TX and DTR ... PC side) are "down level shifters" ( through the NPN's) and do just fine... no need for any change here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I guess I can't wire the PNP emitter to +5, either, because then the Propeller wouldn't be able to completely shut it off.
So in my case, it looks like I have to go for an NPN to drive the RS232.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Definetly a E3 (Electronics Engineer Extrodinare!)
"I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
dan
ps i never tried to just go back to the term program, somewhere, i think it was in this thread, parallax said that would not work.
however i have programmed my prop that i had soldered up according to the "homemade" print that is floating around here
Post Edited (Sawmiller) : 8/10/2006 9:14:25 PM GMT
1) I say try the 3 transistor idea, if that fails, move to a MAX3232 (3V ver), or just get a programmer from parallax. Like Mr. Schwabe stated, all computers are NOT equal, and the transistor dsign won't work on all PC's/Laptop's!
2) A MiniATX power supply is well powered and filtered for ANY project you can think of. PERIOD. Most new ones come with more voltage taps than you know what to do with! I'm using a 400W CompUSA p/s, i believe their 250W/300W p/s is like $20!
3) I'd like to thank all who added to this thread with what worked for them, and Phil for pointing me in the right direction.
If anyone is unsure about their interface, simply jumper TX/RX @ the DB9 on your board (which can also be done on the BOE version by physically holdin a wire on the board), with a DEBUG winow already open and Echo unchecked, you should see any character typed echoed in the lower window, now move to the Propeller's TX/RX pins and jumper them with a 1k resistor, you should still get an echo. (don't worry you won't hurt the Propeller), if not check the jumper, the cable IS connected fully, and that you don't have a NULL MODEM cable. With your serial interface working, you should see "Propeller ver 1 on Com n", n being the port number. When yo see that, your in buisiness!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Definetly a E3 (Electronics Engineer Extrodinare!)
"I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
Post Edited (RinksCustoms) : 8/10/2006 10:55:43 PM GMT