Bus control logic and bootstrap program injector

A project log for Self-hosting 8051-based retro computer system

The system is based around an 8051 microcontroller with 128K of external RAM and 4Mb serial flash memory. It has a 256 by 256 pixel display.

will.stevenswill.stevens 08/29/2016 at 15:240 Comments

This schematic shows how the 8031 is booted using a PIC to inject a short bootstrap program (up to 256 bytes) into the RAM. The PIC holds the 8031 in reset and controls the bus. It takes A8-A15 low. To write each byte into RAM it then uses the demultiplexing 373 to set the address to program, puts data onto the bus, and lowers the /WR pin.

Also shown in this schematic is the logic that maps the 128K RAM to the 8031 address spaces. Program memory read accesses using /PSEN always fetch from the lower 64K of the RAM. When P1.1 on the 8031 is low, data memory accesses using the MOVX instructions also use the lower 64K. When P1.1 is high, data memory accesses use the upper 64K.

I've added a link to GitHub from this project - I'll add all of the source code there in due course. At the moment it only contains the 8051 and PIC assembly language programs used for booting. Currently the boot program that the PIC injects into the RAM checks the state of pin P1.0 on the 8031, and depending on whether that pin is high or low (set using a jumper), it either loads a program from the first few sectors in the external serial flash (not shown in the schematic above) into program memory and executes it, or it downloads a program via the UART and executes that.