Shop OBEX P1 Docs P2 Docs Learn Events
In Circuit Programming of BS2 — Parallax Forums

In Circuit Programming of BS2

Greg NortonGreg Norton Posts: 70
edited 2007-07-22 04:02 in BASIC Stamp
I'm working on a project and I would like to be able to reprogram the BS2 while it is still on the PCB. The project itself will run off a 12v car battery. I came across the attached diagram on page 8 of the PDB schematics. It seems to indicate that for programming purposes, all I need to do is create a header on the PCB with the first 4 pins of the BS2 (SIN, SOUT, ATN, VSS) attached to it. So here are the questions:

1. Is this really all I need to do? I have read many posts that seem to indicate that the BS2 cannot directly receive RS232 levels on its input pins. Are these pins somehow special? Don't I need something like a MAX232 between the BS2 and the serial port of the PC? It just seems to be a bit too easy and that always worries me. smile.gif

2. Is there any problem with connecting the ground of the serial port to the negative terminal of the battery? I assume these could be at different potentials and I'm thinking that would be a bad thing.

Your thoughts are appreciated.
Thanks.
Greg

Post Edited (Greg Norton) : 7/22/2007 2:45:46 AM GMT
db9.bmp 11.2K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-22 04:02
    Look at the diagrams in the PBasic manual (downloadable for free if you don't have one). They show how to do it. It helps if you have a couple of capacitors in the ATN to DTR circuit and the manual shows where they go. The programming connections (SIN/SOUT/ATN) are designed to connect directly to a PC serial port and they have some level shifting circuitry for the RS232 levels built-in. The PBasic manual does show how to directly connect (with a current limiting resistor) other I/O pins to most serial ports if you want that.

    The system grounds all have to be connected together. One of the best places to do that is at the negative terminal of the battery. In a car, that may not be convenient. You do the best you can, perhaps connect all your Stamp related grounds together at one point near the Stamp's power regulator and run a single ground wire from there to the battery terminal or a "big" ground near the fusebox or other connector panel.
Sign In or Register to comment.