Question: Has anyone ported MC680x assembly to Arduino?
(Note: I have further thoughts / questions in this vein but last time, I was told that I need to ask questions such they can be answered yes/no)
Question: Has anyone ported MC680x assembly to Arduino?
(Note: I have further thoughts / questions in this vein but last time, I was told that I need to ask questions such they can be answered yes/no)
I can't imagine that anyone would seriously consider doing that.
If you understand what the code does, it would be MUCH quicker to just write the equivalent in C/C++.
I finally started digging into the firmware and managed to find the specific lines of code that manipulate three memory addresses to pass data to and from the 8279 IC.
One address is used for a single bit, the 8279's IRQ pin (if it has changed state, it tells the logic there is a pending keypress), which then prompts commands to fetch the key presses and store it in RAM.
A second address is merely used to change the state of the 8279's A00 pin to set it to command or data mode.
The third is the actual data port, sending commands or passing data to (display data) or from (inbound keypresses) the 8279.
Clearly well within the Arduino's capabilities... but the trick is writing the required C code. If I can pull it off, I can replace ten 7-segment displays, six LEDs, and support structure with an Arduino nano and an LCD.
All the information needed to write Arduino C/C++ code for the ancient Intel 8279 keyboard/display controller can be found in the 8279 data sheet.
metermannd:
I finally started digging into the firmware and managed to find the specific lines of code that manipulate three memory addresses to pass data to and from the 8279 IC.One address is used for a single bit, the 8279's IRQ pin (if it has changed state, it tells the logic there is a pending keypress), which then prompts commands to fetch the key presses and store it in RAM.
A second address is merely used to change the state of the 8279's A00 pin to set it to command or data mode.
The third is the actual data port, sending commands or passing data to (display data) or from (inbound keypresses) the 8279.
Clearly well within the Arduino's capabilities... but the trick is writing the required C code. If I can pull it off, I can replace ten 7-segment displays, six LEDs, and support structure with an Arduino nano and an LCD.
As you discovered, the M6800 uses memory-mapped i-o. The Arduino does not. There is more than just writing C code.
Do you have all the documentation on the M6800?
Paul
AVRs have memory-mapped I/O.
By definition, a memory-mapped IO is assigned an address that is equal to the size of the external address bus and is interfaced with host MCU/MPU using address, data and control buses.
To my knowledge, the Arduino MEGA/ATmega2650 can be configured to assert external address, data and read/write control signals.
Does Arduino UNO/ATmega328P (an AVR) has such feature?
The 328 has three address spaces - flash memory (program), registers/RAM/IO, and EEPROM.
The 68xx family has only one space.
(The Z80 has two - memory, and I/O)
@OP
Dou you want to interface an 8279 Display/Keyboard controller with Arduino UNO? Yes! It is possible; where, you have to artificially generate the address, data and control signals for the chip by activating the IO lines of the NANO.
Interfacing of 8279 with 8085 (8-BIt) MPU:
Interfacing of 8279 with Arduino NANO:
8279 NANO
D7 - D0 ------> D7 - D4, D13 - D10
RD/ ----------> D9
WR/ ---------> D8
A0 ---------> D3
CLK ---------> use TC1
IRQ ---------> D2 (polling or interrupt)
CS/ ---------> A5 or GND
GolamMostafa: This is useful, thank you.
The ~CS line is derived from a 74LS00 gate driven from a 74LS138 demultiplexer (outputs 6, 7).
I could probably move that gate into the Arduino as a logic equation?
A00 is driven directly from the same 74LS138, output 6.
~RD and ~WR are derived from the system R/W line (multiplexed with the 1MHz master clock).
CLK, as mentioned, is 1MHz, but is internally divided by 10 to derive the 8279's internal 100kHz clock).
Would appreciate to see you connection diagram among NANO, the Decoder, the Gate, and 8279.
Paul: The CPU in this unit I'm tinkering with is a SC44125 - a customized 6800 with hard-wired A / D buses (as opposed to being configurable in software) and the 6801 set.
GolamMostafa: I need to meld three separate board schematics (display, logic, I/O) to show the bus layout and address selection logic before I post.
I was going through the pins as suggested, and I realized a single Nano doesn't have enough pins for display AND keyboard in one.
Do I need to step up to a bigger Arduino?
Or, is it possible to run two Nanos in tandem, using the board's 1MHz master clock to keep everything in sync?
That is, one Nano takes care of the 4x20 LCD (I2C interface), and the other takes care of the 4x4 matrix keyboard...?
Please, state below the names of the devices you wish to interface with NANO.
1. I2C LCD : needs 2 lines for I2C Bus (A4, A5)
2. Next
3. Next
......................
We may probably give you a solution using only one NANO.
TheMemberFormerlyKnownAsAWOL:
AVRs have memory-mapped I/O.
...but only for internal registers. In this context, you need external address and bus control lines which the AVR doesn't have. The 2560 can be configured to present a 6800-like bus interface on some ports, so it would work.
Golam: The idea is to directly replace the 8279 with an Arduino.
The 8279 is configured to drive a 4x4 matrix keyboard, and the display circuitry through port B.
We omit the rest (Shift, Ctl/Stb, RL4-RL7, and port A).
aarg:
...but only for internal registers. In this context, you need external address and bus control lines which the AVR doesn't have. The 2560 can be configured to present a 6800-like bus interface on some ports, so it would work.
You need eight data bits, a single address bit, and a few control lines.
That could be done on a Uno.
The data pins don't even need to be on the same port.
metermannd:
Golam: The idea is to directly replace the 8279 with an Arduino.The 8279 is configured to drive a 4x4 matrix keyboard, and the display circuitry through port B.
We omit the rest (Shift, Ctl/Stb, RL4-RL7, and port A).
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.