Uart

UART: Double Trouble

The DUART TL16c2752 is supposed to be a rather big upgrade to the Steckschwein “core”. Now two serial interfaces, with 64 byte FIFOs each, instead of only one interface with 16 byte FIFOs. Oh, the possibilities. Using one line to explore UART interrupt handling while still having another one to upload code. Cool!

With the 16C2752 being a part of the 16C550 family, we did expect it to be a simple drop in replacement for the latter one. As we all know, happiness is reality minus expectation, and oh boy did things get dreadful!

Prototype with ATF1508 on Breadboard [UPDATE II]

We are going back to breadboarding for designing what will be the base for the new Steckschwein computer core. By “core” we mean CPU, RAM, ROM and the glue logic which will be accommodated in the ATF1508 CPLD. In order to communicate with the outside word, we also count the 16C550 UART as part of the core.

Design goals

Our main design goals are:

  • Integrate SPI into the CPLD -> DONE
    Using a hardware based SPI implementation similiar to Daryl Rictor’s SPI65, but tightly integrated into the CPLD will be an efficient use of the CPLD resources and will provide a much more performant SPI bus as opposed to the current semi-bit-banged solution. This way, it will be much more performant to add more SPI based components such as USB host or networking (see below).
    Update: Done! We decided to use Andre Fachat’s SPI implementation from his MicroPET. The main advantage over rolling our own is - it’s already there. Another main advantage over other existing Implementation is that the MicroPET one is pretty small, which is important when CPLD resources are at a premium.
  • Implement a priorising vectorising interrupt controller
    This will improve interrupt handling by assigning a dedicated ISR routine per interrupt source instead of one system ISR.
    Update: We are already scratching the limit of the ATF1508. The PLCC84 version we use in our prototype can not handle more pins, so we are unable to add the inputs needed for all the interrupt sources we need. While this is unfortunate, we have not scrapped the idea of an interrupt controller. We might move to the TQFP-100 version at some point, which obviously has more pins.
  • DUART instead of UART
    Replacing our trusty 16C550 with a 16C2752 DUART will provide two serial interfaces without increasing the chip count.
    With two serial ports, we will be able to upload programs on one serial port, while observing the output on the other one. Also, a separate upload interface will allow us to explore UART interrupts on the other.

Other changes/optimizations

Other things that will be optimized are:

ACIA muss wieder raus

Die 65x51 ACIA erschien uns als die am tiefsten hängende Frucht, um eine RS232 Schnittstelle zu implementieren, nachdem wir Bit Banging nach C64 Vorbild ziemlich schnell verworfen hatten.
Auch programmiertechnisch mach die ACIA einen simplen Eindruck, ganze drei Register wollen beherrscht werden.
Die rs232-Schnittstelle ermöglicht uns, Code auf den Steckbrettrechner zu laden, ohne jedesmal das EEPROM neu brennen zu müssen. Eine gewaltige Erleichterung.

Aber - wir haben es bereits erwähnt - die ACIA hat keine Zukunft bei uns. Die uns vorliegenden Chips können mit bis zu 2 MHz getaktet werden. Wir aber wollen hoch hinaus. Mit den aktuellen 65cXX-Chips von WDC sind schließlich bis zu 14MHz möglich.
Darüberhinaus sind mit der ACIA ohne Hacks nur 19200 baud möglich, und selbst hochgezüchtet sind mehr als 38400 baud nicht drin. Dazu kommt, dass es keinen Puffer gibt und für jedes empfangene Byte ein Interrupt ausgelöst werden müßte.