vascofazza / 8bit-cpu

Schematics & code for my 74LS-based 8-bit MK1 CPU
https://hackaday.com/2020/12/31/diy-8-bit-computer-knows-all-the-tricks/
MIT License
301 stars 23 forks source link

Programming Interface #10

Closed TnnsBeast closed 1 year ago

TnnsBeast commented 1 year ago

Could you please explain how to program the programming interface? I am a little confused as to what the arduino code start9_programming_interface.ino and the flash_composer are meant to do. Also, how does flash composer communicate with the a pc? Sorry for so many questions, I am just trying to follow the build and need a little assistance. Thank you!

vascofazza commented 1 year ago

The programming interface is used to program the MK1 using the start9_programming_interface board or directly from the computer through an Arduino serial interface.

1) The purpose of the Start9 programming interface is to store programs ad load them without having a computer laying around. On the board, an ATmega chip reads the programs from an EEPROM and loads them onto the CPU RAM. The way this works is the following: first, you upload the start9_programming_interface.ino onto the atmega, then you use the flash_composer to create a single binary file that contains all the programs you want to store onto the programming interface. This is an example:

2) If you want to program the CPU from your computer directly, you only need an Arduino NANO, and this is the code you need to upload https://github.com/vascofazza/8bit-cpu/blob/master/MK1_CPU/code/mk1_computer_uplodader/mk1_computer_uplodader.ino This way, you can upload the code through the serial port - Everything is already implemented in the code folder, you should find the uploader there.

I hope this is making things a little bit clearer :)

TnnsBeast commented 1 year ago

Yes, this definitely makes sense. The main questions I have are how do you upload the start9_programming_interface.ino onto the atmega, and how do you flash the eeproms (the one on the programmer and the ones on control unit)? I have built the EEPROM Programmer, but from what I understand that is only able to write to the EEPROM used for the output display.