Shop OBEX P1 Docs P2 Docs Learn Events
Adding a DB9 programming jack to my project.. Problems... — Parallax Forums

Adding a DB9 programming jack to my project.. Problems...

Chicago MikeChicago Mike Posts: 88
edited 2006-01-11 16:40 in BASIC Stamp
HI all.

This seems really simple, but somehow I'm having a problem. I'm trying to add a DB-9 serial connector to my project for future programming changes to make it easy. The BS2 works great in the BOE, so I know the stamp works, but when I transfer it to my breadboard the Identify option will not find the stamp, so I'm not talking. This is how I've wired it.

DB9Pin 2 - to Serial Out on the Stamp (Pin1)
DB9Pin 3 - to Serial IN on the Stamp (Pin2)
DB9PIN·4 - to ATN on Stamp (Pin3)

On the ATN pin I am using the 2 .1uf caps as drawn on the http://www.parallax.com/dl/docs/prod/boards/BS2CarrierBdSchem.pdf

I also tried it the old way without the caps, and I've tried swapping the TX/RX... All without resolution.

I'm using a very stable 5V regulator for power in, which is wired to Vcc and (-) to Vss.

Is there something I'm missing here? I'm stopping for now. I've been fiddling too long today.·I'm going to break it. <grin>

Mike.

·

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-09 01:55
    Do you have pin 6 and 7 on the DB9 tied together for loopback?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-01-09 03:14
    And pin 5 connected to Vss.· I've attached a schematic.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
    772 x 583 - 8K
  • Chicago MikeChicago Mike Posts: 88
    edited 2006-01-10 02:29
    Loopback was tied, but the Ground was it! The drawing I was working off of didn't reference the tie to ground from the serial line.
    Thanks!!!!!
  • GerhardGerhard Posts: 17
    edited 2006-01-10 17:00
    Hi everyone!

    I've got the same Problem, the stamp just woldn't talk to me. Although I have connected all pins like in the schematics exept for the capacitors. ATN and Pin 4 goes right through to the DB9 and there is nothing between ATN and VSS. For what are the capacitors anyway? This is actually really against expectations smhair.gif

    Please can you help me? I'm out of ideas.

    Cheers,
    Gerhard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-10 17:05
    On some computers the COM Port will set the DTR line high when the port is idle.· When that happens the BASIC Stamp can be held in a reset state.· The capacitors block DC and ensure that the line has a clean pulse, even if the DTR line doesn't go back low.· What you can do is test your ATN line to see what the voltage is in reference to Vss.· It should be around 0 volts, but should not be higher.· The reset line should read 5 volts.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GerhardGerhard Posts: 17
    edited 2006-01-10 17:25
    Hi Chris!

    Thank's for the incedible fast Response! I've checked out the reset line. Reads +5V against ground. ATN reads 0 V towards Vss. Next step should be adding the cappacitors right? I suppose they are not polarized on the shematics. Since I have no such cap here right now, could I also use polarized ones and if so how should the polarization go. Another question would be does the Vss needs to be connected to Ground or ist this done internally?

    Best greetings from Germany,
    Gerhard
  • GerhardGerhard Posts: 17
    edited 2006-01-10 17:43
    Hi again!

    Obviously I have some kind of a connection now. In the Debug Window I get an echo when I type something in and power is supplied to my application board. If I remove power no echo comes back. When I try to download a porogram I get "No Stamp Found" and that is it. Also I am running XP on a VMWare machine. Within that I have set up the Parallax Development environment. As Host I am using Red Hat Linux 9. Is there a way to attempt sending a program from Linux directly. I am thinking about possible timing issues because of the VMWare System.

    Cheers,
    Gerhard
  • joe from NYjoe from NY Posts: 22
    edited 2006-01-10 17:56
    For the Linux stuff, just search on Linux. There are a few posts floating about it.

    Also check out http://www.parallax.com/html_pages/downloads/software/software_basic_stamp.asp

    and check out the linux info
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-11 05:18
    .1uF capacitors are non-polarized.· They aren't necessarily needed on a given configuration, but I guess if you're having trouble it couldn't hurt to add them.· On the other hand, from the sounds of your system configuration, you may be experiencing computer compatibility issues if your running one OS within another.· I am not clear on what you are actually running.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • GerhardGerhard Posts: 17
    edited 2006-01-11 06:18
    Hi Chris!

    Thank's for the reply. I am running Linux Red Hat 9 as a host OS for Windows XP within a VMWare Virtual Machine. That recognizes the loopback but can not communicate. I've checked all wiring (I know me...) and it turned out to be Ok. My next step was to get the Linux stuff and I was able to at least get some kind of conmmunication. It identified surprisingly as a BS2e although I ordered a BS2P module which is also printed on top of the BS2 PCB. Downloading of programs where possible but i get NACK response on the commandline tool.

    ----snip----
    [noparse][[/noparse]gerhard@ws01 gerhard]$ stampbc -j -v
    trying to identify the stamp
    -- opened /dev/ttyS0 as 3
    -- sending break condition
    -- try BS2
    -- sending identification sequence
    ** could not identify stamp as a BS2
    -- closed 3
    -- opened /dev/ttyS0 as 3
    -- sending break condition
    -- try BS2e
    -- sending identification sequence
    -- stamp is a BS2e, firmware
    [noparse][[/noparse]gerhard@ws01 gerhard]$
    ----snap----

    So, either that points towards further comm. problems or I really have gotten a foul BS2. If I look on the PCB there is also written 20.0M on the (what looks for me) christal for the oscilator. Do you have any idea to get further clarity about that. I measured the current draw of the entire application board and found out it is using just above 60 mA. There are also a LED and a few other CMOS Chips on it so that I believe that the consumption of the BS2 is around 40-50 mA. By the way, I also plugged the RS232 cable in my laptop that runs XP. There is no communication at al (With a RS232 Tester I made sure that rx and tx etc. is set right).

    Thank's for any help.

    Cheers,
    Gerhard
  • GerhardGerhard Posts: 17
    edited 2006-01-11 09:24
    Hi everyone!

    I just exchanged the RS232 Cable from the PC to the Stamp. Now I'm able to communicate and download programs. Shamefully I have to admit that I've been using a nullmodem cable and inserted an additional nullmodem to compensate for that (darn somewhere I read that this would not work...). Now the communication is running without the capacitors in the line. As it looks do I have to insert the cap's in order to make sure to get reliable comm or can I live with that for the time being? I am looking forward now to start working on my project.

    Sometimes it is better to talk about itwink.gif

    Thanks to all.

    Regards,
    Gerhard
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-11 15:28
    No, you don't necessarily need the caps.· The problem they address is machine dependant.· Specification-wise no computer should hold the DTR line high when the port is idle, but there's a few out there that have to be different.· So for full compatibility, we include them.· If it works without them on your system, then you don't need them.· But be aware if you ever change computers you run the risk of having that problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Beau SchwabeBeau Schwabe Posts: 6,557
    edited 2006-01-11 16:40
    The status of the DTR line can also be software dependent...Some terminal programs that you may use to communicate with the Stamp could hold the DTR line high which
    in turn will cause the Stamp to perpetually reset. By using the capacitors, you can prevent this scenario.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
Sign In or Register to comment.