From: AgentFriday on
If I were to believe most af what I've seen and
heard about RS-232 on the c64, 300 baud
(perhaps even 1200) can be used reliably with
nothing but the kernal code, an rs232 driver,
and an ignorant piece of software.

As far as I'm concerned, I have disproven that.
In fact, even as low as 50 baud, I still see
occasional errors. Yet when I bypass the
kernal by using some code published back in
the '80s, 2400 is rock solid. No errors.

I'd like to find someone who has first-hand
experience getting any kind of success
using the kernal's rs-232 support?

Or if someone has some insights...
From: Jim Brain on
On 3/22/2010 1:52 AM, AgentFriday wrote:
> I'd like to find someone who has first-hand
> experience getting any kind of success
> using the kernal's rs-232 support?
I've used the stock routines without errors, but I don't think what
you're seeing is wrong. The stock routines are known to be off relative
to RS232 timing, and so are therefore already at some RS232 transceivers
max percentage error allowance. Thus, depending on what you connect to,
you could see issues.

As well, it somewhat depends on your hardware. If you are using a 7404
inverter-type interface, or something that does not present true RS232
voltages, the rise slope of the RS232 signal, coupled with the error of
the stock routines, could push the normally marginal (but workable)
RS232 signal past the allowances of the receiving system.

If you can use the George Hug routines (or some other published RS232
routines), you should. No one will cheer for the stock routines. The
custom routines will center the signal in the middle of the RS232
target, and thus marginal hardware interfaces will affect it less (if
that's the issue).

Jim

From: George on
Jim Brain says...

> I've used the stock routines without errors, but I don't
> think what you're seeing is wrong. The stock routines
> are known to be off relative to RS232 timing, and so are
> therefore already at some RS232 transceivers max
> percentage error allowance. Thus, depending on what you
> connect to, you could see issues.

There's another possibility. When working on this I
discovered that there appears to be a flaw in some 6526 CIA
chips. On an unpredictable basis, the chip generates an
interrupt, but doesn't set the appropriate flag. I found a
way to quickly test for this, and then everything worked ok.

> If you can use the George Hug routines (or some other
> published RS232 routines), you should. No one will
> cheer for the stock routines. The custom routines will
> center the signal in the middle of the RS232 target, and
> thus marginal hardware interfaces will affect it less
> (if that's the issue).

Yes. As I remember, I generated a square wave, which is
continuous transmission of #$55 in 8N1, then found the range
of receiver timings that would receive that transmission
stream error-free, then just used the center point of that
range for the final routines. I think it's all in the
Transactor article.

But for all the shortcomings of the kernal routines in the C64,
it's worse in the Plus4. Even though the +4 has a real 6551 ACIA
chip, it will not properly receive a null byte because two
instructions are out of order. Apparentlly RS232 on the +4 was
never tested by CBM.

George

From: Groepaz on
George wrote:

> There's another possibility. When working on this I
> discovered that there appears to be a flaw in some 6526 CIA
> chips. On an unpredictable basis, the chip generates an
> interrupt, but doesn't set the appropriate flag. I found a
> way to quickly test for this, and then everything worked ok.

can you elaborate on that? i've written quite some CIA related code, but
never had a problem with this.

--

http://www.hitmen-console.org http://magicdisk.untergrund.net
http://www.pokefinder.org http://ftp.pokefinder.org

A fanatic is a man who does what he thinks the Lord would do if He knew the
facts of the case.
<Finley Peter Dunne>


From: AgentFriday on
Jim Brain wrote ...

> ... depending on what you connect to, you could
> see issues.

We eventually connected 2 Commodores together at
5V levels and still got frequent errors even at the
lowest supported rate (_50_Baud_). The patterns
and frequency of errors were indistinguishable from
what we encountered when connected to RS-232 devices.

> As well, it somewhat depends on your hardware ...

We made 2 separate circuits, one using a MAX-232e
and another with a MAX-3235e (same as 232 but with
all charge pump caps built in.


> If you can use the George Hug routines (or some
> other published RS232 routines), you should. ...

Yup. Them are the very ones we are relying on. My
friend spent _days_ of research trying to find good
replacement routines and finally stumbled on the
article "Toward 2400 Baud" by George Hug in Vol 9,
Issue 3 of Transactor magazine. (Someone should
index or OCR that title. Great stuff in there.)

The reason I'm searching further is that if we
couldn't get squat to function with our existing
max circuits (while supposedly it can be done), then
when I try to hit 38.4 or 57.6 kbaud using the same
design, whatever margins were protecting me will be
gone.

Thanks,