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

Serial Port Help

nikanika Posts: 11
edited 2006-09-16 03:40 in BASIC Stamp
Hello, I am currently using a Basic Stamp II with the Board of Education (USB). I would like to interface my stamp to my computers serial port (running Debian). I would like to be able to send and recieve commands with the serin/serout functions. Does anyone have a schematic that will help me figure out where to connect pin 1 and ground on the serial port? Would it be easier to just buy a board for serial programing? Is there a basic stamp programmer for unix? Thanks, nik

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-15 01:57
    With "SERIN 16, 16468, [noparse][[/noparse]DEC MyData] " -- you can send data to the 'programming port' from the PC.
    "SEROUT 16, 16468, [noparse][[/noparse]"hi", 13] " -- You can have the BS2 send data back to the PC.
  • nikanika Posts: 11
    edited 2006-09-15 02:50
    Cool, thanks. How do I connect pin 16 to the serial port? thanks, nik
  • Tom W.M.Tom W.M. Posts: 1
    edited 2006-09-15 02:54
    Pin 16 is already connected to the serial port on your Board of Education. If you have a USB model, I think that it is implemented as a USB to serial adapter underneath the hood (can someone confirm). You shouldn't need to do any wiring.
  • nikanika Posts: 11
    edited 2006-09-15 03:02
    Thanks for the help but with my current setup im gona be programing it with windows via usb and connecting it to a linux machine with serial. Im sure the solution is incredibly simple, thanks for the help, nik
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-09-15 03:32
    Here's the adapter from Parallax: www.parallax.com/detail.asp?product_id=28030

    You can download the Linux drivers for the USB chip on the adapters from FTDI: www.ftdichip.com
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-15 18:33
    Well, the first thing you have to realize is that there IS no "pin 16" really. There's Pins 0 (zero) through 15.

    The '16' is a pseudo-pin, to indicate to the SERIN/SEROUT command that it should use the built-in programming port. So if you can program it, you already have all the hardware necessary to use SERIN/SEROUT to the "port 16".
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-15 18:38
    Oh, dear. So you want to program your USB-based BOE-Bot from Windows, THEN communicate with a Linux system's serial port?

    Well, if you HAD the serial version of the BOE-Bot, along with a USB adapter for the PC, then this would be trivially easy using SERIN/SEROUT to "port 16". If you DON'T have the serial version of the BOE-Bot, then you'll probably need an RS-232 "App-Mod", which allows you to bring out a TX pin and an RX pin to a DB-9 connector.

    The issue here is that the 0 to 5 volt "TTL" signal the BOE-Bot uses on it's pins needs to be 'level shifted' with something like a MAX232 chip to meet the RS-232 +- 10 volt spec that the Linux system will be using. The App-Mod does this, AND gives you the properly wired DB-9 connector.
  • nikanika Posts: 11
    edited 2006-09-15 22:59
    Thanks allan, I guess the easiest way is to buy a serial development board and program it via linux. How are the linux tools, you guys have any recomendations? Wheres a cheap place to pick up a serial board of education? Thanks for all your help, everything is very clear, nik
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-09-16 03:40
    If you can find one of those "BOE-BOT" packages selling for $80 or so, that has a serial BOE-BOT in it. With a good USB to Serial adapter, you can program it with your PC, then move it to the Linux side once it's programmed.
Sign In or Register to comment.