Re: AVR as UART/ACIA IC
Posted: Wed Sep 23, 2015 9:12 pm
I've been thinking about the UART problem recently, and was pleasantly surprised by this thread. I apologize in advance for the length of this post -- I'm using it to collect my thoughts and summarize what has already been said (as I understand it).
As I see it, there are three practical approaches to serial communications with 6502-class microprocessors:
I just skimmed over this entire thread and see that a number of approaches have been tabled for using an MCU:
Another user mentioned MCUs with parallel ports. I haven't kept up with Atmel's latest offerings lately, but I am relatively current on Microchips parts. They do offer several 16-bit parts with PMP (parallel master ports) on them. Parts such as the PIC24FJ32GA002 come in a 28-pin DIP and cost around $3.00 in single-unit quantities. The PMP can be run in an addressable (2 separate address lines) slave mode with a full bidirectional 8-bit bus. They are designed for asynchronous bus transfers, so there is no need for the MCU to share a clock with the 6502 and there should be no need to pull the RDY line low when they are clocked faster than the 6502. Additionally, this part will run at 5 volts, so there is no need for level converters, either.
Microchip has a specification sheet here for the above PIC: http://ww1.microchip.com/downloads/en/D ... 39881e.pdf
Using this MCU (or another of the several offerings Microchip has with this peripheral feature set) it should be possible to implement a UART device in an MCU without any of the performance limitations inherent in some of the other approaches mentioned in this thread:
As I see it, there are three practical approaches to serial communications with 6502-class microprocessors:
- Use dedicated hardware like the 65C61, 68B50, 26C90, etc.
- Use an MCU like an AVR or PIC
- Implement a UART in programmable logic
I just skimmed over this entire thread and see that a number of approaches have been tabled for using an MCU:
- Let the MCU control PHI2
- Let the MCU deassert RDY until it can complete the bus transfer
- Augment the MCU with external logic in order to mitigate some of the performance limitations that come with the above
Another user mentioned MCUs with parallel ports. I haven't kept up with Atmel's latest offerings lately, but I am relatively current on Microchips parts. They do offer several 16-bit parts with PMP (parallel master ports) on them. Parts such as the PIC24FJ32GA002 come in a 28-pin DIP and cost around $3.00 in single-unit quantities. The PMP can be run in an addressable (2 separate address lines) slave mode with a full bidirectional 8-bit bus. They are designed for asynchronous bus transfers, so there is no need for the MCU to share a clock with the 6502 and there should be no need to pull the RDY line low when they are clocked faster than the 6502. Additionally, this part will run at 5 volts, so there is no need for level converters, either.
Microchip has a specification sheet here for the above PIC: http://ww1.microchip.com/downloads/en/D ... 39881e.pdf
Using this MCU (or another of the several offerings Microchip has with this peripheral feature set) it should be possible to implement a UART device in an MCU without any of the performance limitations inherent in some of the other approaches mentioned in this thread:
- No need to share clocks or have the 6502 clock controlled by the MCU
- No need to ground RDY while waiting for the MCU to complete a bus transfer
- No need for hardware other than the MCU itself
- Cheaper than any UART offering comparable performance
- Widely available