|
Subject: Re: [stella] compact send-only serial subroutine From: "Fred Quimby" <c9r@xxxxxxxxxxx> Date: Sat, 13 Aug 2005 03:27:25 -0400 |
>Could you explain why you invert the start and stop
>bits with a TTL converter? I'm assuming that this
>reverses how the serial port interprets marks and
>spaces in relation to the voltages, right?
yes... UART specs say that -3 to -25v as a logic 1, and +3 to +25 is a 0.
So sending 0v as 0 and 5v as 1 is actually like sending an inverted signal,
so we invert everything first.
>I'm all for saving money, but what would happen if you
>connected the receive line also and tried to read on
>the 2600 without a TTL converter? I'm thinking that
>would be worse because you'd be feeding a -12v and
>+12v signal to a port that is designed for 0 and +5v.
I think that's a little sketchy. I mean, outputing TTL from the 2600 to a
serial port, you won't damage anything, but going the other way, you might.
If you want to save money and mitigate the risk of damage, a simple
resistive divider could being that +/- 12v (perhaps +/- 9v if you're using a
laptop) down to something more reasonable, and reduce the current as well.
Say you use joystick down, or pin 2:
3k
2600 Pin 2 ----/\/\/\/\------ TxD (pin 3 on PC)
|
\
/
\ 1k
/
|
GND
But even if this does work (I'm not sure it will) we're not out of the woods
yet - transferring from PC->2600 is more troublesome. With the simple send
circuit, you could, in theory, still have a display on the screen, since at
1200 baud we use about 130 scanlines to send each char, and the rest could
be used for a display. But with a receive circuit, you will need to poll
TxD in a tight loop or you might lose characters, and this would probably
require blanking the screen.
That is, unless you want to use hardware flow control. But this increases
the complexity of the serial driver and requires two more connections.
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://stella.biglist.com
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [stella] compact send-only seri, Glenn Saunders | Thread | Re: [stella] compact send-only seri, Fred Quimby |
| Re: [stella] compact send-only seri, Glenn Saunders | Date | Re: [stella] compact send-only seri, Fred Quimby |
| Month |