Posts

Showing posts from April, 2021

8-bit CPU: Test module and Python-assembly code

Image
I have ALU block and Memory block, as a next step I wanted to connect both of them to my Arduino test device. It worked, but was very clumsy (3 devices, held together just by wires). I decided to re-build the Test module differently - on breadboard, so I can connect modules together. It is an Arduino Nano , driving a pair of 74HC595 shift registers. To expand further, 3 pins from each shift register drives 74HC138 demultiplexers. Control lines from demultiplexers are for Out and Load lines (7 for each type), the rest are for general purpose (for example - ALU's Subtract). I played around with more tests, implemented ld and st "instructions" (load a register from memory location and store register value in memory) in my Python-assembly. Then I started to think: there are 2 registers, ALU, Flags, memory. I even have some sort of assembly language. What if I try to implement something more interesting, utilizing resources I have?  The "classic" program for BE-SAP...

8-bit CPU: Memory

Image
Time for another important part of the computer - memory. Here I think I have to come up with my own design. Ben's version has only 16 bytes, uses nowadays-exotic 74189 memory chips and there are DIP switches for programming. For the memory I plan to use 62256 SRAM chip. It can store 32 KiB of data, I initially plan to use just 256 bytes, so I'll connect remaining address pins to GND. I'm also not in a mood for any DIP switch based programming, so I'll add an EEPROM instead. There are several ways how computer can utilize such setup: split the address space into program and data memory. This is how Ben's 6502 breadboard computer works. Some additional logic gates are used for chip selection, the main issue however is that it is not very flexible. use Harvard architecture , where program and data memories are completely separate. Reading and fetching instruction are two different operations: former accesses RAM, latter - ROM. This is how AVR microcontrollers (heart ...