Shop OBEX P1 Docs P2 Docs Learn Events
Serial Port connection — Parallax Forums

Serial Port connection

Brandon C.Brandon C. Posts: 106
edited 2009-06-11 21:35 in Propeller 1
How come there are two diagrams for connecting serial port to the propeller? I just received my propeller a little while ago and placed all the components on a breadboard. I am not getting any connection to the Propeller Tool and I have everything connected properly. after connecting everything as shown in the propeller datasheet, I realize there is another diagram in the Propeller Tool for connecting the serial port. Why are they completely different? I am really angry now because I feel like I have gotten the wrong components...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
No purchase necessary. See back panel for more details.

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-06-10 20:17
    Hello Brandon,

    if the forum should help you we need more information.

    What kind of error-message do you get if you try to download a program to the propeller ?

    Did you include a EEPROM ?

    What kind of testprogram did you use ?

    Which one of the diagrams did you use ?

    The Prop-Clip or Prop-plug are NOT simply a direct wiring from a USB-plug to a "breadboard"-plug
    there is a chip on it that translates USB-signals to serial signals

    This chip is from FTDI.
    Did you install the driver for the FTDI-Chip (which converts USB to serial signals ?

    In the datasheet chapter 2.3.2. Alternative Serial Port Connection
    the circuit shows how a REAL serial port with a D-SUB-9-plug (which are only available on older PCs) would be connected to the propeller

    Modern PCs only have USB. For those PCs you need a USB-to-serial-converter
    and have to install the driver for the chip Some of these converters use a prolific-chip, some others use a FTDI-chip

    my personal experience is: converters with a prolific-chips work NOT properly with the propeller
    only FTDI-chip based converters work properly

    Could you make a REALLY HIGH-RESULTION-picture of your breadboard and attach it to a posting

    best regards

    Stefan
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-10 20:26
    Hello Stefan,

    I don't think you understand what I am doing. let me explain this a little better:

    I have my propeller chip connected to Male DB9 connector, using the circuitry from the Propeller datasheet.

    I will provide a high-res picture of the breadboard when I am done re-connecting everything. I want to make sure there wasn't just some error in my sloppy wiring first.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.


    738 x 473 - 29K
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-10 20:47
    I have a quick question,

    Do I need to supply power to VSS and VDD pins on both sides, or it does not matter?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-06-10 21:27
    Hello Brandon,

    it is recommended to connect the VSS and VDD-pins on both sides

    did you test your serial port by connecting rx to tx directly and see if sended characters are echoed correctly ?

    The transistor which is connected to PC serial port pin 2 (Rx) is supplied by 3.3V I would supply it from 5V
    to 3.3V seems very low as the RS232-standard says the voltagelevels should be -12V and +12V

    a MAX2323 will create those voltagelevels from a 3.3V supply

    best regards

    Stefan

    Post Edited (StefanL38) : 6/10/2009 9:33:33 PM GMT
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-10 23:37
    Well I pretty much give up on this. I might just get a Prop Plug instead.

    How come this schematic is different? is it better?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.


    556 x 306 - 28K
  • KyeKye Posts: 2,200
    edited 2009-06-10 23:58
    That's the special schematic used by parallax to program the propeller chip with. However, only the reset line and transmit line work really good. The rx line (prop to pc) is kinda a cheat on the system.

    The circuit will work if everything is just right... But there's a lot of room for error using that circuit and serial cables.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,

    Post Edited (Kye) : 6/11/2009 2:44:10 PM GMT
  • BradCBradC Posts: 2,601
    edited 2009-06-11 00:20
    Brandon C. said...
    Well I pretty much give up on this. I might just get a Prop Plug instead.

    How come this schematic is different? is it better?

    If you look closely you'll see it's almost the same. The extra circuitry is in the reset section and it will generate a nice short, clean reset pulse, while the simpler circuit relies more heavily on the characteristics of your serial port. Either one should work if you have a decent serial port.

    Personally I'd suggest you grab a prop-plug, but both of those circuits should work under most circumstances.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eccles : How do I open the door?
    Bluebottle : You turn the knob on your side
    Eccles : I haven't got a knob on my side!
  • b.p.m.b.p.m. Posts: 59
    edited 2009-06-11 00:24
    hey brandon,
    i've been using the 3 transistor version of the RS232-Prop circuit on my
    Prop breadboard for months with almost no trouble at all (it seem to balk
    at around 115K baud, but 9600 seems to work great).
    the only trouble i had was when i was first setting up the circuit. i mistakenly
    mirrored the DB9 connector. i had it wired up from the MALE perspective
    instead of the FEMALE orientation and so it obviously didn't work. after a
    long couple of hours of frustration (trying the 2 transistor version, various
    resistor values, etc.), i caught my mistake, rewired and it been working since.
    so i say go back over it from step 1 and give it a chance; it's a lot cheaper
    than a PropPlug.

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson
  • BradCBradC Posts: 2,601
    edited 2009-06-11 00:28
    b.p.m. said...
    hey brandon,
    i've been using the 3 transistor version of the RS232-Prop circuit on my
    Prop breadboard for months with almost no trouble at all (it seem to balk
    at around 115K baud, but 9600 seems to work great).

    That's interesting. The Propeller Tool loads the prop at 115k using a back to back data stream that is probably worst case conditions for the port.
    Do you ever get load/detect errors?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eccles : How do I open the door?
    Bluebottle : You turn the knob on your side
    Eccles : I haven't got a knob on my side!
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 00:32
    b.p.m. said...
    hey brandon,
    i've been using the 3 transistor version of the RS232-Prop circuit on my
    Prop breadboard for months with almost no trouble at all (it seem to balk
    at around 115K baud, but 9600 seems to work great).
    the only trouble i had was when i was first setting up the circuit. i mistakenly
    mirrored the DB9 connector. i had it wired up from the MALE perspective
    instead of the FEMALE orientation and so it obviously didn't work. after a
    long couple of hours of frustration (trying the 2 transistor version, various
    resistor values, etc.), i caught my mistake, rewired and it been working since.
    so i say go back over it from step 1 and give it a chance; it's a lot cheaper
    than a PropPlug.

    blake

    Hi Blake,

    Can you post a picture of your wiring of the DB9 connector? that would really save me some time.

    Thank you.

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • b.p.m.b.p.m. Posts: 59
    edited 2009-06-11 00:40
    hey brad,
    i didn't know the Proptool loaded programs at 115K; for some reason i
    thought it 9600 baud (ah well, ignorance is bliss). i've never had problems
    loading programs to my breadboard setup. i have more problems with
    my Demoboard. the only time it didn't seem to work properly is when i
    tried PropForth.
    but then i used a wirekit instead of hookup wires and have
    a fairly tight setup.

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson
  • b.p.m.b.p.m. Posts: 59
    edited 2009-06-11 01:03
    hey brandon,
    i don't think this picture will help you much. i harvested my RS232
    cable setup from an old Microsoft serial mouse. the DB9 end is
    molded rubber. the other end in the picture is the internal header
    and i just cut off some thick leads from old capacitors and inserted
    them in the header which holds them pretty well.

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson
    2576 x 1920 - 273K
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 01:15
    Here are some pics of my setup. I only bought 2 transistors and I don't have any extra 2N3904's lying around.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.


    1000 x 750 - 1M
    1000 x 750 - 1M
  • b.p.m.b.p.m. Posts: 59
    edited 2009-06-11 01:33
    hey brandon,
    looking at your setup i noticed that something was missing;
    there's no eeprom.
    i guess you're used to PICs and such. with the Propeller you
    need an external eeprom to store the program that is down-
    loaded from your PC via the Proptool. get one and then you
    will be in business.
    good luck.

    blake

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "Can't sleep, clown will eat me."
    Bart Simpson
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 01:36
    First of all, I think you can download programs to the RAM.

    Second, EEPROM is "optional" (quoted from Propeller Datasheet).

    Third, why would that have anything to do with getting a connection to the propeller?


    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • BradCBradC Posts: 2,601
    edited 2009-06-11 02:04
    The only thing I can think of (and I've been over your breadboard photo quite a bit as I thought I was going mental).. Do the power rails on your breadboard extend all the way along? I have one here that breaks the rails in the middle and I have to jumper them across.

    It's the only thing I can think of.
    I would recommend connecting the power pins on both sides of the chip and popping a decoupling capacitor right up against the chip, but that should not stop it at least being detected.

    Have you measured voltages around the board to make sure everything is where it is supposed to be and you don't have a dodgy connection in the breadboard (again from bitter experience)?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Eccles : How do I open the door?
    Bluebottle : You turn the knob on your side
    Eccles : I haven't got a knob on my side!
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 03:04
    Actually right before you posted I was moving my multimeter all over the board to make sure there was power everywhere and I did notice that there was no power going to the transistors (about 0.1v). I will have to take another look at this...

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • VaatiVaati Posts: 712
    edited 2009-06-11 03:16
    Ah-- another attempt. smile.gif

    http://forums.parallax.com/forums/default.aspx?f=25&m=346212

    I have done it all already so you don't have to. BUY THE PROP PLUG-- you will NOT regret it. The circuit is a pain, as you can see from my project on it. I still have the circuit and am considering framing it, as it would be the only circiuit I have soldered down that did not work. $25 may be a serious dent in your future plans for purchases, but it is well worth it. There is nothing like a couple of transistors that must not be triggering properly, because according to the schematic, you have it perfect.

    I repeat, I have done all of this and failed. Buy The Prop Plug.

    I hope you take heed from my advice, and my thread.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 03:47
    Brad, I was able to get the voltage to the other side of the power strip. still nothing.

    Vaati, I just read through your whole thread. it seems like the problems just never end!! cry.gif

    I'm only 14 and get paid $5 a week a doing chores...that means I have about 6 weeks before I will be able to use my propeller. I got all excited for nothing. cry.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • StefanL38StefanL38 Posts: 2,292
    edited 2009-06-11 17:57
    Hello Brandon,

    from my long experience as software and hardware-developer I can tell you
    sometimes you find the fault only if you check EVERY DAMMED DETAIL in DETAIL

    This means starting checking by what voltage does the battery have ?
    go on with what voltage cames out of the 3.3V regulator (by the way is it an 3.3V regulator ?)

    using a connection beeper or an Ohm-Meter and beeping through all the wires of the serial connection from the PC-end of the cable right through until the legs of the transistors
    including ground

    measuring ALL supply connections

    checking if you are connected the transistors in the right way as one is a 2N3904 NPN-type and the other is a 2N3906 PNP-type

    there is a very easy way to test if you use the right pins of the dsub-connector

    start any kind of a serial terminal software on your PC.
    If you connect your blue wire = tx with the red wire = rx DIRECTLY together you should receive the characters back that you send by typing them on the PC-keyboard

    if this works the serial port on PC side is OK
    to mention another thing are you using a standard-serial cable or a NULL-Modem-cable ?

    In a NULL-Modem-cable the wires of PIN 2 and PIN 3 are crossed. Then you have to cross them back

    simply check if PIN 2 of one end is connected to PIN 2 on the other end or if it is PIN2-PIN3 PIN3-PIN2

    this is already a quite long list to check but still not everything

    start with these and post us what the results are.
    best regards

    Stefan
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 18:16
    Hello Stefan,

    I am using a 3.3v reg I bought from Parallax. output seems to be 3.29 - 3.3v (which is fine).

    I have done some testing using an LED connected to the ground and to either the Rx or Tx pins on the propeller. when I hit F7 in the Propeller Tool, the LED blinks to I do know that at least the Propeller is receiving the data. I am using a Standard serial cable connected to my computer, with no converters of any kind. I am starting to wonder now if I am having a compatibility issue because I am running Windows 7 with propeller tool. I also checked all the voltages and they seem to be just fine. I am using a standard 9v battery to power everything (through the regulator of course). transistors are connected properly, and the propeller must be receiving data because the LED blinks when I press F7.

    Hope this information helps!

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • VaatiVaati Posts: 712
    edited 2009-06-11 18:33
    Well, your prop might be toast, like my first one was. I did all sorts of tests and such, and was forced to conclude (after getting the prop plug) that it was the prop's fault. I highly doubt that there is another occurence of a busted prop, because they are thoroughly tested....

    The only thing I must say is that the propeller is the master of all μcontrollers. Don't give up on the prop, because if you do, you will surely regret it. smile.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!
  • Brandon C.Brandon C. Posts: 106
    edited 2009-06-11 18:37
    Nah, I know there's nothing wrong with my prop. I just have to wait to get a Prop Plug...

    Brandon C.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    No purchase necessary. See back panel for more details.

  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2009-06-11 20:22
    RS232 can be a right pain when it decides not to play nice. Consider every thing to be the wrong way around, when tracing through, the terms Tx and Rx are chucked about but it depends upon which bit you are talking about. That is why there are a miriad of cable options. I usually use the three transistor version but I have also used a MAX3232 (and max232 equally well) from a cct on one post which was the only one to label P31 and P30 as the "wrong" Tx and Rx, once swaped over all was ok. The problem that you and Varti have had is tha without one working cct it is difficult to knowing what to beleive is right and step on to another possibillity.

    The Elektor cct is the same as the one shown earlier on this tread, just drawn differently.

    The connections of the 9 pins is that the back end of a female is right ( don't go there ! ) ie the pins are 1,2, 3... left to right. this will rely on the cable from the PC being 1- 1, 2 -2... .It must have pins 2,3,4 and 5 connected, the rest do not matter for this cct. Null modem cables will reverse all sorts of things. It also relies on the negative voltages being generated by the PC, two of these cheat intefaces would not talk to each other, hence the MAX series of chips etc.

    Obviously watch out for the transistor types and pinouts. Some so called PNPs I have scrounged from old equipment didn't work in one 232 cct I used on AVRs I never figured out why, I just used something different. If you can solder then scrounge old things an pull them apart, it will give you free bits and your money can be used for better things (more props) The only drawback is that you are never completely sure that any of thse bits are not dud without decent test kit. Never pass over a chance to get some test kit and then change it whenever something better comes along.

    AllDataSheets and datasheetArchive websited have loads of info on components.
  • StefanL38StefanL38 Posts: 2,292
    edited 2009-06-11 21:35
    Hello Brandon,

    sorry oh my god using windows 7 and did not mention it first
    I haven't tested windows 7 not at all. But a OS in the beta state and using it for an old-fashioned thing like rs232 is not a good idea

    This is another parameter which has to be tested. Take any kind of PC with windows xp and test if if the loop-back-test works there
    then do the loop-back-test on windows 7 and test it there

    Anyway I would prefer to go on with the testings with a PC running windows XP as XP is KNOWN to work properly with rs232

    are you using a PC with a REAL COM-port or any kind of USB-to-COM-port converter (another question you have NOT answered so far)

    If you did already this test you HAVE TO inform the forum-members about that. it's really annoying me that you leave out important
    information and let us guess around in the fog that isn't fog for you !

    a blinking LED means only the signal level of the Pin is changing. But you still CAN'T be sure it is the Rx-pin
    it might be the DTR pin which might be toggled by the Propeller-tool

    if you want the things to go superfast (and leave out some tests) the result in most cases is that it goes SUPERSLOW
    (until you made the tests you first wanted to leave out)

    connect BOTH Vss-pins and Vdd-pins and REALLY do ALL the tests !

    go and download br@ys terminal which is a terminal software where you can set/reset the DTR-pin high/low
    and check if your DTR pin is connected right. Even then if you have checked the male/female sight and numbering of the pins a thousand times
    check it by toggling the dtr-line

    check how your propeller-tool is configurated which line does it use as the rest line dtr or rts ?

    Stefan

    Post Edited (StefanL38) : 6/11/2009 9:46:20 PM GMT
Sign In or Register to comment.