- Motorola (NXP Freescale semiconductor) MC68SEC000-20 (Static low-powered m68k arch.)
- ATMEL AVR ATMega-328PB
- Co-processor for 7segLEDs, LEDs, switches and serial interface.
- Can program Arduino-like with MiniCore project
- It can also be used in "ATMega-328P".
- LATTICE MachXO2 LCMXO2-640
- Bus controller, captured all signals from the CPU.
- SRAM 1MB (512kbit * 2), no-wait.
- Flash PROM 1MB (512kbit * 2, PLCC), no-wait.
- We can use the gcc toolchain. In other words, we can write code in C language.
Will fix these errata in next version (Pixy-68000-1).
- The
MC68SEC000-20
has very tight soldering due to the narrow pads on the board. - Will fail writing Arduino (MiniCore) bootloader at first time.
Please make this connection in your hand instead of J2
AVR_ISP
connector. Then write to use Arduino MiniCore firmware writer. Once the firmware is written, this quick-hack wiring is not required thereafter. - The
SPISS
signal is missing. Cut the line and additional wiring should be added as follows. - Did not avoid data bus confliction before reset complete.
Add resister 2.2k ohm between
VCC
and/OE
.
- Solder the all parts/components, taking care to avoid errata.
- Write bitstream to Lattice MachXO2 FPGA.
- You need Lattice Diamond Software to build and write FPGA bitstreams. Since this project is in the scope of small-scale development, it is free to use. Please download, install, and activate the free license.
- Connect the Lattice Programming Cable to the JTAG port. The confirmed adapter is HW-USBN-2B, but if it is recognized by Lattice Diamond, other adapters can also be used for writing. The Pixy-68000-0 has Errata, so do not connect anything to pin 11 of the JTAG port, connect to the VCC pin instead. The other pins should be connected as they are: You can use cheaper JTAG adapter FT2232HL/FT4232HL:
- Open
Fpga.ldf
in ../Fpga/ directory on Lattice Diamond and build it. Since it is difficult to understand how to operate, please refer to the following figure. After clickingProcess
tab, checkJEDEC File
and double clickExport Files
, will be built FPGA bitstream: - Referring to the figure, open the
Programmer
tab and add a new target device row: - In the
Device Family
column, set the target device toMachXO2
: - In the
Device
column, set the model number toLCMXO2-640HC
: - Double-click this line to open the
Device Properties
dialog. Configure as follows. TheFpga_Core.jed
file is the bitstream file you just built. It is generated in thePixy-68000-0/Fpga/Core
directory. - Clicking on the program writes a bitstream to the FPGA:
- Write CoProcessor firmware on PlatformIO/Arduino based.
- Write MegaCore firmware by Arduino at first time, this will make Arduinable ATMega328P.
- Now we can use PlatformIO for programming. Open Co-processor firmware project via PlatformIO (Visual Studio Code).
- Build and download the co-processor firmware.
Run gcc toolchain builder, you can use the script ../Firmware/setup.sh. This script builds the near-latest version of gcc for the m68k architecture. Just run it to download the necessary files from the respective distribution sites.
TODO:
- Install the Flash PROM in the following location. Refer to the figure and note the position and direction. For some reason, my ROM writer (GQ-4x4) wrote Even and Odd swapped. Notice the word sequence of the image loaded into the ROM writer.
This looper test code executes an infinite loop immediately at the entry point. This is useful if you want to check the address bus or data bus of the 68000 with a logic analyzer, for example. In other words, if the Pixy-68000-0 does not work immediately after assembly, this code is intended to be used for troubleshooting.
- Build and write this blinker firmware into Flash PROMs. Blinker firmware
- Power on.
This code does not provide any visible output at all. However, you will be able to observe the address bus and data bus of the 7-segment LEDs,
You can observe the bus activity using the address bus, data bus, and step execution functions of the 7-segment LEDs. Or, you can also hook a logic analyzer probe to the header pins on the top of the device to observe the signals in detail:
- Build and write this blinker firmware into Flash PROMs. Blinker firmware
- Power on.
- Blinks LEDs from LED0 to LED3 repeatedly.
- Build and write this checker firmware into Flash PROMs. SRAM checker firmware
- Power on.
- See status LEDs. The test takes about 20 minutes to complete when the CPU clock is 20 MHz.
The UART on the Pixy-68000-0 is an ATMega328P connected to a CH340N (USB). It is recognized as a serial device by the PC. It is transferred from ATMega328P to MachXO2 via SPI and can send/receive data to/from the 68000 CPU.
- Build and write this test firmware into Flash PROMs. UART tester firmware
- Power on.
- Connect the serial device to your PC OS and set serial baudrate to 38400.
- Press
SW0
toSW3
switch, Then will receive the messageHello Pixy 0
toHello Pixy 3
. - Pixy make the echo your sending characters.