Motorola developed the MC6850 chip in the 1980s. It is a peripheral for 8-bit microprocessors. It provides the data formatting and control to interface serial asynchronous data communications to a microprocessor data bus.
The MC6850 is used in many retro designs, particularly the Grant Searle projects and the RC2014 computers.
It is not currently manufactured, but it is still available as "new old stock parts". This should mean never-used parts found in old inventories. Unfortunately, some people will sell parts extracted from old boards, or even change the markings on unrelated chips and sell them as MC6850s.
This creates the need for some way to test these chips.
HardwareThe main idea is to connect as many pins of the MC6850 to a microcontroller so we can control and read them. The microcontroller I chose is the RP2040; the project uses a Raspberry Pi Pico board.
The MC6850 is normally used at 5V. The RP2040 has recently been certified 5V-tolerant, but there is a caveat: the RP2040 I/O system must be fully powered before 5V is applied to any pin.
My solution is to have the RP2040 control the 5V that powers the MC6850. This also makes it safe to remove and insert an MC6850 when the tester is idle. To control the 5V, I used an NPN transistor plus a MOSFET; it is obviously over-engineered.
For the user interface, I used a 128x64 OLED display and a single button. I also connected a reset button to the Pico and an LED to indicate that the 5V is ON.
Once the I/Os for 5V control, OLED, and button are accounted for, we are left with enough GPIOs to connect all MC6850 pins, except for CTS and DCD (these are tied directly to ground).
FimwareThe firmware was developed using the Raspberry Pi Pico SDK to provide maximum control over the pins. Most of the code is just pulling pins high or low at the right time.
An interesting part is generating the clock for the MC6850. The MC6850 generates the baud rate by dividing this clock by 1, 16, or 64. In the Grant Searle projects, this clock is 64 * 115200 (7.3728 MHz), which requires the MC68B50. To generate the clock, I used the PWM peripheral in the RP2040. Running the Pico at 200MHz, I got 7.372 MHz. The firmware can also be compiled to generate 1.8432 MHz (16 * 115200); the actual value I got was 1.845 MHz. The reason I got values this close is that the RP2040's PWM uses a 12-bit fractional divider (8 bits for the integer part and 4 for the fractional part).
The display "driver" is very simple. It writes directly into the display controller memory and does not keep a copy of the screen in the Pico's memory. An 8x8 font is used to simulate an 8-line by 16-column alphanumeric display.
The tests done are:
- Check the status and RTS/IRQ signals after a reset.
- Check the status and RTS/IRQ signals after disabling RTS and IRQ.
- Test the various combinations of the chip select lines (the MC6850 has three select pins, one active low).
- Test that data sent by the MC6850 can be received by the RP2040.
- Test that data sent by the RP2040 can be received by the MC6850.
This project attends a very specific need, but is a good exercise on some RP2040 programming techniques.









_3u05Tpwasz.png?auto=compress%2Cformat&w=40&h=40&fit=fillmax&bg=fff&dpr=2)
Comments