Re: 6551 driver questions

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-08-24 12:28:43

Hi!

On Sun, Aug 24, 2003 at 11:35:58AM +0200, Andre Fachat wrote:
> Assuming your knowledge I would say you write a driver for an existing
> deivce, rihgt? Otherwise I would like to be the badass and say, why not
> use something decent instead of the 6551...... (like 16550)
> At least I would for any new design.

The next major cc65 version will have loadable serial drivers (using drivers
in form of o65 modules as it is now the case with joystick and graphics
drivers). I'm currently rewriting the existing Swiftlink driver, and this will
be something like a reference design (several other Commodore machines do also
have an 6551, and the driver will get reused with minor changes). So I think
it's worth the trouble to think about additional features like interrupt
driven sends. But as you can see, the hardware is given:-) 

I agree with you that the 6551 is crap. I've written more than one 16550
driver for different hardware and it's a far better chip. For anyone thinking
about getting a serial cartridge I would suggest the RR with a SilverSurfer
addon instead of a Swiftlink/Turbo-232 (provided that there are drivers for
your application of course).

> IIRC I never used the ACIA with the NMI, only with the IRQ.
> But even then I had- with my GeckOS - latency problems when
> receiving bytes, i.e. due to the missing buffer the CPU was not
> quick enough draining the received bytes, so they were lost.

This depends on the baudrate. The B machines have a maximum baud rate of
19200, so at least the ones running at 2MHz should be fast enough. On the
other side, 38400 is definitely too fast for a 1MHz machine like the C64 when
using the IRQ. The question would be if 19200 runs reliable on a 1MHz machine
with a VIC, like the C64. Having interrupt driven transmit routines will
remove a lot of busy waiting, and the standard disk routines can be used if
the 6551 is connected to the IRQ line. Depending on the application, 19200
baud may not feel a lot slower than 38400.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.