Shop OBEX P1 Docs P2 Docs Learn Events
setting up serial port without a dev. board — Parallax Forums

setting up serial port without a dev. board

justinmburrousjustinmburrous Posts: 16
edited 2010-07-08 01:39 in BASIC Stamp
Hey, I am new to micro controllers. I have little experience, the most "challenging" stuff I have done was make a pulse counter with a 4bit adder, so please try to keep any responses is English. Anyway, I just bought the BS2sx Microcontroller. I bought just the controller thinking that I could plug it into my bread board and wire a serial cable into the bread board. Here is my setup. I have a 4AA battery power supply powering the microcontroller (6 volts right?) I then have a Radio Shack gigawire USB to Serial converter. I installed the radio shack driver and when I plugged in the USB cable, Windows 7 also installed a driver. I also have the ISO image of the parallax CD. From there I installed the USB driver as well.

Wiring arrangement to the serial is exactly as shown in the PDF below. (NOTE: I am using 50volt capacitor instead.). http://www.parallax.com/Portals/0/Downloads/docs/prod/schem/BS2sxrevFSchematic.pdf

When I try to identify the Stamp in the basic stamp editor it does not find the controller. Please let me know what you think is wrong.

Thanks
«1

Comments

  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-15 23:33
    Update: Forgot to mention. I am using a macbook pro, but as I said earlier it is running windows 7.
  • hover1hover1 Posts: 1,929
    edited 2010-06-15 23:43
    You can't use the Parallax USB driver with the Gigawire. The Parallax USB driver is for the FTDI based USB product used by Parallax, and the native Windows 7 driver will not work. Many people have tried third party devices with some success, but not without headaches.
    Why not get the official converter for $15.00:
    ·http://www.parallax.com/Store/Accessories/CablesConverters/tabid/166/CategoryID/40/List/0/SortField/0/Level/a/ProductID/378/Default.aspx
    and then you will know i will work forever and ever.

    Jim
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-16 00:00
    Ah okay, thanks.
    Also, based on the schematic I provided, will that wiring work?

    I just stuck the wires into the female serial adapter and then into the breadboard...
  • hover1hover1 Posts: 1,929
    edited 2010-06-16 00:14
    Your·schematic looks like it is based on the drawing on page 32 of the Basic Stamp Manual, so it should work.

    Jim




    justinmburrous said...
    Ah okay, thanks.
    Also, based on the schematic I provided, will that wiring work?

    I just stuck the wires into the female serial adapter and then into the breadboard...
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-06-16 14:12
    You did put your red-wire for power to pin 24, and your black-wire for power to pin 23, right? If you put your red-wire to pin 21, that's no good.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-16 17:25
    No I just had 24 powered in, and serial plugged in.
    And I am hearing that I need to power both 24 and 23 with my 6 volt power supply?
    Anything else aside from the serial connections?
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-06-16 18:39
    Well, like connecting a light-bulb, you need TWO wires from your battery. One is the +6 volt line, connected to pin 24. The other is the GROUND line, connected to pin 23. Without both wires, the BS2 is not "powered", because electricity only flows in a "circuit", a "loop" from the +side of your battery through your circuitry and BACK INTO the -side (aka GROUND side) of your battery.

    If you plug the +6 volt Red wire into both 24 AND 23, you've either shorted out the GROUND line, or you're still leaving the GROUND line off, so again you won't have a "circuit". So don't do that.

    P.S. I don't want to hear any arguments about what direction "current flows" vs. "electron flows" at this point, it'll just confuse the issue.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-16 19:12
    ahh, I thought that it was grounded through the serial. I was wondering about that, some other source said that it was, apparently they were wrong. Now why is ground not labeled GND like it is in chips like the 4bit counter 74ls192 and the driver 74ls47? Why is it called something else?
  • hover1hover1 Posts: 1,929
    edited 2010-06-16 20:21
    http://en.wikipedia.org/wiki/IC_power_supply_pin

    VSS=Ground=GND·· VDD=V+

    Without a ground going from your 6 volt supply, the BS2 is not powered. You must also tie both grounds, (6 volt GND and Serial GND), together.

    Jim

    justinmburrous said...
    ahh, I thought that it was grounded through the serial. I was wondering about that, some other source said that it was, apparently they were wrong. Now why is ground not labeled GND like it is in chips like the 4bit counter 74ls192 and the driver 74ls47? Why is it called something else?
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-06-16 22:25
    That the BS2 uses VSS for Ground, and VDD for V+, is because the PIC the BS2 is based on is a CMOS device which uses these terms -- a CMOS devices uses MOS transistors (Metal-Oxide Semiconductor). The classic 74LS47 is a "TTL" device, meaning it uses "Transistor-Transistor Logic", meaning it uses classic Transistors with Collector, Base, and Emitter.

    So, on a 74LS47, you'll see "Vcc" as the source voltage -- because that becomes the "Collector" voltage. On a BS2, that becomes VDD -- named for some part of the MOS transistor I haven't looked up recently. I'm not sure why the 74LS series labels ground "GND" -- you'd think it'd be named "Vee" because it's the Emitter voltage, but whatever.

    Now, the BS2 has an on-module voltage regulator, which takes Vin (from 6 volts to 20 or so) and drops it down to the +5 volt VDD. So you can power the BS2 from a 5-volt source on the VDD to VSS pins, or a 6 volt and up DC source between the Vin and VSS pins. But DO NOT put 6 volts on the VDD pin, that'll kill the BS2.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 01:14
    Update:
    I got the adapter from parallax and wired it the exact same way as before. Power is to +6VDC to pin 24 and Pin 23 to Ground. The serial is set up to the schematic. Pin 1 is set up directly and pin 2 is set directly. pin 3 and 4 are connected together via capacitor. pin 4 is also connected to the serial, and pin 3 is attached via another capacitor.

    Hover 1, you said connect pin 23 and pin 4 should be connected together (gnd and gnd). They are, but its not doing anything different.

    The only thing I can think of now is a software issue. I have installed the serial driver, and then windows 7 did its little driver install fro plug and play stuff. It said it was ready to go. When I identify the chip in Basic Stamp Software though, it says that the chip does not exist. I have gone into the preferences and switched the port to automatic, and still I am getting the same error.

    Any new ideas?
  • ForrestForrest Posts: 1,341
    edited 2010-06-20 12:15
    Make sure you have your circuit configured as shown on the BS2 Carrier board www.parallax.com/Store/Microcontrollers/BASICStampDevelopmentBoards/tabid/137/CategoryID/12/List/0/SortField/0/Level/a/ProductID/121/Default.aspx

    Note pins 6 and 7 on the DB9 connector are connected.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 13:02
    ah, I should have looked for schematics on the boards a long time ago. Thanks a lot. I am not sure if this works yet, but when I get access to the chip I will try that.
  • ForrestForrest Posts: 1,341
    edited 2010-06-20 13:13
    FYI there's no reason to run Windows to use your Basic Stamp - just download/install the FTDI drivers for OSX and get MacBS2
    www.muratnkonar.com/otherstuff/macbs2/
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 13:28
    okay, I will try that as well
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 14:02
    http://s756.photobucket.com/albums/xx201/justinmburrous/?action=view&current=DSC_0002.jpg

    That is the way I have it configured. The led for pin 21 is just to check it the chip was powered, and the LED to the input pin was the one I was going to try to flash when I got it programming. Note: The wire going into the serial is folded over and I had to force it into the holed, which I am guessing is a good enough connection.

    Its still not working.
  • ForrestForrest Posts: 1,341
    edited 2010-06-20 16:14
    I don't see the two 0.1 uF capacitors shown in all the Parallax schematics. These caps are required for reliable Stamp programming.

    You shouldn't have an LED or resistor connected to pins 1, 2 or 3 on the stamp - this might interfere with programming.

    When you're in the Stamp Editor or MacBS2, can you successfully identify the stamp?

    Post Edited (Forrest) : 6/20/2010 4:20:14 PM GMT
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 18:39
    Yes, I had two other 50 Volt capacitors .1uf that I had hooked. I forgot to upload the correct pic of it. Here are two pics of the same circuit to get a better view.

    http://www.ftdichip.com/Drivers/VCP.htm
    http://www.ftdichip.com/Drivers/VCP.htm

    The led is plugged into pin 21 not 1, 2, or 3. I took it out for this picture though, still the same result.

    Also I tried MacBS2. I got the driver from the OSX section of http://www.ftdichip.com/Drivers/VCP.htm. No such luck after I selected the driver to use in the software (usbserial-A800enni). For the record I tried windows again with the capacitors, and got the same erros that I was getting before.
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2010-06-20 21:31
    One issue that you might face on Windows 7 is that the Stamp Editor may need to be run as Administrator to gain access to the serial port.

    Try right-clicking the Stamp Editor shortcut and choosing "Run as Administrator". If this fixes the problem, you can set it to always run as Administrator through the compatibility settings.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-20 23:03
    No such luck, I did not even think of that though, good idea.
  • ForrestForrest Posts: 1,341
    edited 2010-06-21 00:05
    Looks like you have everything hooked up correctly. If you have a multimeter, please confirm you're reading 5.0V between Stamp pins 21 and 23 and between pins 21 and 4.

    If it still doesn't work, I think it's some type of software issue with the FTDI drivers - especially since you weren't able to get MacBS2 to identify your stamp.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-06-21 15:34
    Yes I have 5 volts where it should be.
    I am guessing software, but what could be wring. I did install the correct driver didnt I?
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-07-01 09:41
    You probably assumed that the gender changer you used routes
    the wires straight from left to right.

    Doesn't the serial gender changer mirror the pins ?
    So you need to swap the wires from left to right to right to left.

    Do you have an Ohm meter to check that ?

    Say you would have a DVI gender changer .. then the separate 4 pin connector would
    be mirrored "on the other side".
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-07-02 02:06
    I am using the following schematic.

    http://www.parallax.com/Portals/0/Downloads/docs/prod/schem/BS2sxrevFSchematic.pdf.
    I dont really know quite what you are saying. Do you mean just flip all the wires???

    Also, I contacted Customer Support. They had me check some things on the chip with the volt meter, after they asked me to ship it back for testing. I am on vacation so I have not gotten around to it yet, but I will soon.
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-07-02 02:06
    I am using the following schematic.

    http://www.parallax.com/Portals/0/Downloads/docs/prod/schem/BS2sxrevFSchematic.pdf.
    I dont really know quite what you are saying. Do you mean just flip all the wires???

    Also, I contacted Customer Support. They had me check some things on the chip with the volt meter, after they asked me to ship it back for testing. I am on vacation so I have not gotten around to it yet, but I will soon.
  • APSpijkermanAPSpijkerman Posts: 32
    edited 2010-07-02 10:38
    Well .. i took a look at your photos and you are using a USB-serial converter.
    Because the converter has a male connector (with pins) you stuck on a device
    with 2 female connectors. A serial "gender changer". So now you can
    stick wires in the female connector and the breadboard.

    According to the photos you assumed that the pins in the "gender changer" are
    wired straight through. But they are not. Pin 1 is connected to Pin 1, Pin2 is connected to Pin 2 etc.
    So if you would look at the gender changer from the top and have one female connector on the left
    side and one on the right side. Then pin 1 of the left connector would be at the bottom, and pin1 of the
    right connector would be at the top. So the wiring inside is mirrored.

    Just google a picture for a DVI gender changer.
    If you look from the top and have a DVI connector left and a DVI connector right.
    Then the 4 separate pins from the left connector would be at the bottom of the picture,
    but for the right connector would be on the top. So the wiring inside the gender changer
    is "crossed" or mirrored so to speak.

    So when you stick wires in the 9 pin female connector you have to look at the tiny numbers
    next to the holes. They are mirrored compared to a male connector.

    With a male connector the numbering (pin1) starts at the left, with a female connector the numbering (pin 1)
    starts at the right.
    So according to your photos you connected the wires in the 9pin female connector "mirrored".
    You stuck the wire for pin5 in hole1 and the wire for pin4 in hole2 etc.
    So you might want to try to mirror the wires .. swap them from the left to the right.
    Or just check the connections inside the gender changer with an ohm meter
    to check if they are what you expected them to be.
  • edited 2010-07-06 08:04
    You can't use the Parallax USB driver with the Gigawire. The Parallax USB driver is for the FTDI based USB product used by Parallax, and the native Windows 7 driver will not work. Many people have tried third party devices with some success, but not without headaches.

    ____________________________________________________________________

    Ben 10 Games
  • justinmburrousjustinmburrous Posts: 16
    edited 2010-07-06 20:29
    Ah. firstly to proximitynfotech3 I am no longer using Gigawire, but thanks.

    And to APSpijkerman, I see what you are saying now. I just sent off the controller, however I will have to check out the serial gender converter.

    Thanks for now though.
  • hover1hover1 Posts: 1,929
    edited 2010-07-06 21:44
    That post today was spam! It quoted what I said before and included a small link at the bottom.
    justinmburrous said...
    Ah. firstly to proximitynfotech3 I am no longer using Gigawire, but thanks.

    And to APSpijkerman, I see what you are saying now. I just sent off the controller, however I will have to check out the serial gender converter.

    Thanks for now though.
  • hover1hover1 Posts: 1,929
    edited 2010-07-06 23:59
    SPAM
    proximityinfotech3 said...
    You can't use the Parallax USB driver with the Gigawire. The Parallax USB driver is for the FTDI based USB product used by Parallax, and the native Windows 7 driver will not work. Many people have tried third party devices with some success, but not without headaches.

    ____________________________________________________________________

    Ben 10 Games
Sign In or Register to comment.