terça-feira, 31 de janeiro de 2012

I'm Alive

So, there I was with the CPU in my hand and the first thing it came to my mind was "maybe this thing is broken! maybe that's why the boards were thrown away..."
Well, fortunately for me this CPU has what is called "freerun" mode. In a few worlds, this CPU can work with no memory and no peripherals just by forcing the pins to vcc or gnd... perfect!

Having a clock source, the control signals all tied to the proper level and all data bus grounded I powered up the board and there it was, this greed led connected to one of the upper address lines, blinking, like if it was telling me "I'm alive!".

Technically all 0's in the data bus matches the opcode 'ORI.B #0,D0' this means that the CPU is reading and Immediate Byte value '#0' and making a boolean OR with the contents of the internal register D0. After that, another equal instruction follows in the address bus, making it sweep all the 16Mb addresses making it a beautiful... counter!


Having the proof that it was (apparently) working, I decided to gather some sram from those same boards (I needed at least two of them for the 16-bit data bus). Too bad the biggest sram's on that board was only of 2Kbytes (and there were a lot of them!).
Back in that time huge sram chips didn't exist an the ones that did exist were very expensive.


2x UM6116K-2 - 2KByte SRAM from the original boards.


With everything connected, all I was missing was a way to get some code in that ram. At first I thought in burning some roms since I had a lot of uveprom's from the boards. But when I really though about it, developing code would be painful... I needed a way to develop code and test it fast...

After some time thinking about it I had this idea of using the parallel port to program the srams, and it worked like a charm! Using shift registers, latches and buffers I was able to program the full 4KBytes with the parallel port. The address was loaded into the serial registers, then I could read or write data in the data bus. I wrote a small program that could write or read the sram (in turbo pascal at that time).

Now I had a fast way to test and debug code, and there I started making little assembly programs that the only thing they did was to manipulate bytes in the sram (that I could read with the parallel port interface). I do remember that the first piece of assembly code I've tested was as simple as loading two registers with some numbers and them saving the multiplication result in some memory location that after reading with the parallel port I could check that, after spending some days (or even months) under the sun and in the rain, this guy could still do some real math!

Later I've put my hands on a USART (a M82C51A) and finally had a door to the world! I then started the development of a serial bootloader that when finished would go into 2 ROMs and allow me to remove all the parallel port to sram circuitry.


My version of the famous Willem programmer used to burn... well, everything!



Some time passed and these new things called programmable logic devices appeared.
I've build a GAL (Generic Array Logic) programmed and programmed some GAL's which replace many of the original glue logic. I guess these devices have died meanwhile (or better, evolved into CPLDs).
Meanwhile I've made a few more improvements. The most significant were the upgrade of the available RAM to 128Kb (4x 32Kb SRAMs from an old PC motherboard, used as cache memory) and the migration from uvprom to flash memory (two brand new W29C020).


My GAL programmer. Made from a single side pcb version from this source.



And that it was, my single (bread)board computer! With 512Kb flash memory and 128Kb RAM.

And when I thought everything going good I was wrong... In one minute I had million ideas and in the next minute I had zero ideas to do with the board... the year was around 2001 and for some time the only thing that was developed in that board were layers and layers of dust...



But then it came a day when...
(in next post I'll talk about two major projects I used this board for)

Sem comentários:

Enviar um comentário