Serial ports and the Stamp
Archiver
Posts: 46,084
Hello from Gregg C Levine
Here's a question: Does the stamp actually mind which RS232 pin I
connect its pins to, when using the device to send or receive data,
with regards to that standard? I need to control a device which uses
the RI pin for setting some data ready functions, in addition to the
usual series of flow control pins.
Gregg C Levine hansolofalcon@w...
"The Force will be with you...Always." Obi-Wan Kenobi
"Use the Force, Luke."· Obi-Wan Kenobi
Here's a question: Does the stamp actually mind which RS232 pin I
connect its pins to, when using the device to send or receive data,
with regards to that standard? I need to control a device which uses
the RI pin for setting some data ready functions, in addition to the
usual series of flow control pins.
Gregg C Levine hansolofalcon@w...
"The Force will be with you...Always." Obi-Wan Kenobi
"Use the Force, Luke."· Obi-Wan Kenobi
Comments
If I understand your question: The Stamp doesn't care where you use your
serial port as long as the level is right. Port 16 (the programming port)
has a built-in level converter to handle the +/-12V stuff, but it is
actually stealing power from the port. That means that the port is always
half duplex, always echoes what you send to it, and can't act as a
transmitter only. It also may have problems with "odd" serial ports.
Any other pin can send or receive RS232 data BUT you have to worry about the
level conversion. One way to do that is with a MAX232 chip (for example,
http://www.awce.com/rs1.htm). However, if you don't mind living dangerously,
you can also connect RS232 inputs through a 22K resistor and depend on the
Stamp's static protection diodes to sink the extra current. This works fine
but it isn't to the RS232 spec.
On transmit the problem is that you can only output a 0 or a 5V signal. The
RS232 spec doesn't allow you to output 0V, but in fact, most line receivers
(in particular, the MAX232) will accept a 0 even though it is out of spec.
So you can often drive "real" RS232 gear directly from the Stamp. On the
other hand, it isn't RS232 and you probably won't get long cable runs, etc.
Plus there is always a chance you will find a piece of equipment that won't
like it for some reason.
You might be interested in our ASP-III development board
(http://www.awce.com/asp3.htm) which is based on our GPMPU40 core board.
This board will accept a 28 or 40 pin Stamp and has a MAX232 among other
things onboard. What's nice is that the MAX's inputs and outputs are all
uncommitted, so by adding a wire jumper, you can connect, say, RI (as you
suggest) to the MAX232 and then jumper the logic-level output to any pin you
like on the Stamp. The downside is that the MAX232 only has 2 inputs and 2
outputs. So RX and RI would eat all your inputs and leave you nothing for
handshaking. However, I've done this for remote data access by assuming the
remote never needs to stop the Stamp from sending and using the spare
receiver for carrier detect. Set the modem to autoanswer and when the Stamp
sees DCD assert, it knows someone has connected on the modem.
Of course, the ASP-III has an area for more Ics if you don't use a 40 pin
Stamp, but not enough for another MAX232. However, with the big board edge,
you could hook up an RS-I or your own circuit if you needed more RS232. We
normally hook these up to a breadboard, but you can easily solder it to a
universal-type PCB for extra real estate.
Regards,
Al Williams
AWC
Original Message
From: Gregg C Levine [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Dsj790pUNucCOJTTyhNpdituUUsLmcLvT9cj3rB3MFGNtFntEYHHR4sK-FjxPuAwhMjXGcb9D_-2wOzroQXYe7HnHjo]hansolofalcon@w...[/url
Sent: Friday, July 16, 2004 12:44 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial ports and the Stamp
Hello from Gregg C Levine
Here's a question: Does the stamp actually mind which RS232 pin I connect
its pins to, when using the device to send or receive data, with regards to
that standard? I need to control a device which uses the RI pin for setting
some data ready functions, in addition to the usual series of flow control
pins.
Gregg C Levine hansolofalcon@w...
"The Force will be with you...Always." Obi-Wan Kenobi
"Use the Force, Luke."· Obi-Wan Kenobi
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Yahoo! Groups Links
Yes, you do Al, thank you! About your offers, I might decide to order
either one, or all of the referenced kits. But the one I've got my
eyes on happens to be for the PLD units, mine are all Atmel. Thinking
about those FPGAs as well, do they work for the Atmel types?
Gregg C Levine hansolofalcon@w...
"The Force will be with you...Always." Obi-Wan Kenobi
"Use the Force, Luke." Obi-Wan Kenobi
--- In basicstamps@yahoogroups.com, "Al Williams" <alw@a...> wrote:
> Hi Gregg,
>
> If I understand your question: The Stamp doesn't care where you use
your
> serial port as long as the level is right. Port 16 (the programming
port)
> has a built-in level converter to handle the +/-12V stuff, but it is
> actually stealing power from the port. That means that the port is
always
> half duplex, always echoes what you send to it, and can't act as a
> transmitter only. It also may have problems with "odd" serial ports.
>
> Any other pin can send or receive RS232 data BUT you have to worry
about the
> level conversion. One way to do that is with a MAX232 chip (for
example,
> http://www.awce.com/rs1.htm). However, if you don't mind living
dangerously,
> you can also connect RS232 inputs through a 22K resistor and depend
on the
> Stamp's static protection diodes to sink the extra current. This
works fine
> but it isn't to the RS232 spec.
>
> On transmit the problem is that you can only output a 0 or a 5V
signal. The
> RS232 spec doesn't allow you to output 0V, but in fact, most line
receivers
> (in particular, the MAX232) will accept a 0 even though it is out
of spec.
> So you can often drive "real" RS232 gear directly from the Stamp.
On the
> other hand, it isn't RS232 and you probably won't get long cable
runs, etc.
> Plus there is always a chance you will find a piece of equipment
that won't
> like it for some reason.
>
> You might be interested in our ASP-III development board
> (http://www.awce.com/asp3.htm) which is based on our GPMPU40 core
board.
> This board will accept a 28 or 40 pin Stamp and has a MAX232 among
other
> things onboard. What's nice is that the MAX's inputs and outputs
are all
> uncommitted, so by adding a wire jumper, you can connect, say, RI
(as you
> suggest) to the MAX232 and then jumper the logic-level output to
any pin you
> like on the Stamp. The downside is that the MAX232 only has 2
inputs and 2
> outputs. So RX and RI would eat all your inputs and leave you
nothing for
> handshaking. However, I've done this for remote data access by
assuming the
> remote never needs to stop the Stamp from sending and using the
spare
> receiver for carrier detect. Set the modem to autoanswer and when
the Stamp
> sees DCD assert, it knows someone has connected on the modem.
>
> Of course, the ASP-III has an area for more Ics if you don't use a
40 pin
> Stamp, but not enough for another MAX232. However, with the big
board edge,
> you could hook up an RS-I or your own circuit if you needed more
RS232. We
> normally hook these up to a breadboard, but you can easily solder
it to a
> universal-type PCB for extra real estate.
>
> Regards,
>
> Al Williams
> AWC
>
>
>
>
>
Original Message
> From: Gregg C Levine [noparse][[/noparse]mailto:hansolofalcon@w...]
> Sent: Friday, July 16, 2004 12:44 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Serial ports and the Stamp
>
>
> Hello from Gregg C Levine
> Here's a question: Does the stamp actually mind which RS232 pin I
connect
> its pins to, when using the device to send or receive data, with
regards to
> that standard? I need to control a device which uses the RI pin for
setting
> some data ready functions, in addition to the usual series of flow
control
> pins.
>
> Gregg C Levine hansolofalcon@w...
>
> "The Force will be with you...Always." Obi-Wan Kenobi
> "Use the Force, Luke."· Obi-Wan Kenobi
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject and
> Body of the message will be ignored.
>
> Yahoo! Groups Links
all Atmel. Thinking about those FPGAs as well, do they work for the Atmel
types?
Hi Gregg,
We should probably move PLD discussions off list. However, some of the Atmel
PLDs are Altera compatible and thus will work with the ABX84 (see
http://www.al-williams.com/atf15.htm). If you need more info, just contact
me directly at alw@a... since I don't know how many folks on the
list are interested in PLDs.
Just to make this somewhat Stamp related, it is possible to take on the PLD
boards and merge it with a ASP3 (Basic Stamp board) and use the PLD as a
super Stamp peripheral. http://tutor.al-williams.com/pldx-13.htm shows how
to use the Stamp with a Xilinx chip for I/O. You can do lots of "magic"
things with the PLD like plenty of high-speed PWM, UARTs, etc. Great fun.
Al Williams
AWC