Need HELP with Serial Port
carodc
Posts: 3
Hi let me start by saying: yes i'm a newbie.
This is my problem:
i have a BS2p and a Parallax Professional Development Board (item code 28138).
I need to send and receive data using a serial port (RS232) with this conection spesification:
bit per second = 19200
data bits = 8
parity = none
stop bits = 1
flow control = none
if i use hyperterminal and send the command to start the device im working with, it send me back a serial number.
i've been trying to do tha using the BS2p but nothing seems to work.
i don't know wich serial port of the development board is the one for comunicating with the device, and i think a cannot use the sameone im using to configure it.
any ideas of how i can do this, code or suggestions or both ?
This is my problem:
i have a BS2p and a Parallax Professional Development Board (item code 28138).
I need to send and receive data using a serial port (RS232) with this conection spesification:
bit per second = 19200
data bits = 8
parity = none
stop bits = 1
flow control = none
if i use hyperterminal and send the command to start the device im working with, it send me back a serial number.
i've been trying to do tha using the BS2p but nothing seems to work.
i don't know wich serial port of the development board is the one for comunicating with the device, and i think a cannot use the sameone im using to configure it.
any ideas of how i can do this, code or suggestions or both ?
Comments
You can use the programming port ("pin 16") for this, but the Baud is fixed at 9600 for this "pin". You can use any other pins (0 to 15) and you will need to use a protective series resistor on the receive side (see the description in the Manual). This is not "correct" RS232 voltage levels, but probably will work with most devices. If you need a "proper" RS232 port, you would need to use something like a MAX232 to do the voltage translation for you.
And yes, a "SEROUT 16, 16468, [noparse][[/noparse]"Hi!", CR] " should appear on Hyperterminal. That's assuming you're using a BOE, or some other board with the two decoupling capacitors on the ATN line. Otherwise, Hyperterminal will hold your BS2 in 'reset' all the time.
I can comunicate using the same serial port that is use to configure it with serout or serin 16.
alanlane5 said i could yous a RS232 with a max232, i hava that to in the profesional development board.
The thing is a don't know how to make the conection, so that it would work with my I/O pins instead of the normal serial pins that come with the BS2p.
Im putting the diagram of the Max232 RS232 port in this page: http://anouk130.googlepages.com/homepage
Maybe you could tell me how to make the conection and if i need any special code to make it work.