Close

ECHO! (Echo.) (echo)

A project log for One-instruction TTL Computer

A breadboard-able computer which uses only a single instruction - MOVE

justin-davisJustin Davis 05/11/2017 at 12:550 Comments

Got my second program up and running. It echos what is received over the UART. It looks for the transmitter to be ready, then waits for new data in the receive buffer, then transfers the byte in and out. First step toward a bigger interface. The bigger plan is to have a simple terminal interface where I can write bytes to specific locations in memory. And then be able to load the program counter. This will let me load a program into memory and then execute it. I figure I can copy/paste programs from my laptop. I could have my program jump back to the bootloader after it is done so I can peek/poke memory locations to check its results. And maybe put in breakpoints or something.

I would also like to get my project into Github which I've never used before. For 1) to share and 2) configuration management. It's in a good state for someone else to download and either simulate or program their own dev board. It's not the cleanest code right now, but I'd like other people to be able to take a look if they'd like. And I'd like it stored somewhere I don't think I'll destroy it. One more tool to learn, but I guess that's part of the point of the project - to learn!

        0 => x"84",        1 => PCTEMP,       -- move new memory page value located at 04 -> PC High Temp
        2 => x"85",        3 => PCLO,         -- move new memory page value located at 05 -> PC Low
        
        4 => x"02",        5 => x"00",        -- constants for new PC

        --UART echo
        512 => UARTTX,      513 => PTRADR,        -- mov UART TX status -> pointer addr reg
        514 => TRASH,       515 => PTRDAT,        -- jump back to 512 if busy 
        516 => UARTRX,      517 => PTRADR,        -- mov UART RX status -> pointer addr reg
        518 => x"0C",       519 => LOAD,          -- load forward jump address
        520 => LOAD,        521 => PTRDAT,        -- jump forward if data is ready
        522 => TRASH,       523 => PCLO,          -- jump backward if data is not ready
        524 => UARTDAT,     525 => ALUA,          -- move UART data to holding register
        526 => ALUA,        527 => UARTDAT,       -- move holding register back to UART data
        528 => TRASH,       529 => PCLO,          -- jump back and repeat loop

Discussions