[Coco] 6551 + uC (was: Re: DW and 6551)
RETRO Innovations
go4retro at go4retro.com
Thu Feb 12 23:15:47 EST 2015
So, I decided to go ahead and try to write up some Verilog to stub out a
6551-compatible bus interface, with a backend that could attach to a
microcontroller.
The idea was to create the 4 6551 registers
* an 8 bit register to hold the data to send
* one for the data to read
* one to hold command
* one to hold ctrl
and a set of bits to hold status information
ON the back side
* an 8 bit input port that is tied to the input of the read data
register (so the uC can store a byte in the read reg for the micro
to pick up)
* an 8 bit output port that carries the results of the data register,
command, and control register
* 2 bits of addressing to select which port to read
* a second clock line to help store the status data and the incoming
byte data from the uC
* some interrupt output lines:
o micro stored a byte
o micro read a byte
o micro stored command byte
o micro stored control byte
o a soft reset occurred
* some input interrupt lines
o hey, cpld, I got the output byte, so you can tell the micro to
send another
o
* some input lines to bring in stuff like DCD, DSR, PARITY ERROR, etc.
The main parts were easy (the in, out, command,control registers), but
the rest (IRQ support, the status flags, etc.) got difficult, and I am
now not so sure I have it all correct.
It currently fits in a xc9572xl-64, which I have a few lying around.
The UC needs 8 bytes of data out, 8 of data in, 2 for addressing, 5 for
IRQs, one for clock, 1 for irq out, and some for parity error, framing
error, overrun error, dcd, dsr)
Anyone interested in looking at some Verilog? :-)
More information about the Coco
mailing list