Hi,
I am Angel and this is my very first post, I have been reading this forum since a couple of years and I like to show you my first SBC which I built past year.
In the 80's my father had a Commodore 64, about 15 years ago I made an emulator of that computer, since then I like all the things around 6502 and its variants, so past year and after discover the EhBASIC and some opensource system monitors I tried to build a real hardware computer, until that I had built some robots and many other small electronic simple devices using microcontrollers.
I wanted to keep it simple and as I am more skilled with programming than with electronics I decided to use an ATMega16/32 to act as memory management unit, ROM, UART for I/O and drives Φ0 signal clock.
The computer only have three main IC's: 65C02, RAM (UM61512AK-15) and ATMega16/32
Other things it have:
- Two sockets for 8 pin i2c EEPROM to save data
- Buttons to manually drive IRQ and NMI of 65C02
- Buttons to reset ATMega and 65C02
- Socket for FTDI232 module to use the UART with the PC
- UART and i2c pin headers
- Address and data bus pin headers for future upgrades
- Some other pins populated over PCB for future updates (clock signals, etc).
- Optional external power socket with AMS1117-5.0 regulator
- AVR ISP pin header to program the ATMega
- Power switch
VCC and GND from the FTDI are routed to the VCC and GND buses too so currently I simply plug USB and use it to communicate with the PC and power it.
The memory map it's as follows:
0x0000 - 0xBFFF RAM
0xC000 - 0xFEFF RAM/ROM (selectable bank)
0xFF00 - 0xFFEF Bootstrap loader code
0xFFF0 - 0xFFF9 I/O
0xFFFA - 0xFFFF NMI, RESET and IRQ
One different thing I believe I made is that I don't preload the RAM while keeping the 65C02 in reset or disabling it as I see here in others SBC's, as I use the ATMega as MMU it acts as ROM too, so I have defined one "permanent" ROM and an other selectable ROM memory range.
When the SBC boots the RAM/ROM map is:
0x0000 - 0xBFFF RAM
0xC000 - 0xFEFF ROM
0xFF00 - 0xFFEF ROM (bootstrap loader code)
The reset vector of the 65C02 are pointing to 0xFF00 and there it is a small piece of code I wrote in 6502 assembler which copies the rest of the ROM from 0xC000-0xFEFF to the RAM and then it tells the ATMega to change the RAM bank upper limit to from 0xC000 to 0xFEFF, so all the code are running from RAM and this speed up all, but it is the 65C02 which copies it changing the selectable bank from ROM to RAM between read and write, it only takes a couple of seconds to complete the copy.
After bootstrap loader code completes:
0x0000 - 0xFEFF RAM
0xFF00 - 0xFFEF ROM (bootstrap loader code)
In the ROM I put a small modified version of EhBASIC and Daryl Ryctor SBC-2 system monitor, so I can read/write programs to and from the i2c EEPROM and use my UART, I also ported TaliForth and I have it saved on one EEPROM so I can load and run it from the system monitor.
As you can guess this is not a "fixed clock" computer because the ATMega drives Φ0 and it depends on their tasks in each cycle, but the most common task it have to do is UART I/O and it is fast, the RAM access which is the most common task is almost transparent for ATMega.
For benchmarking it I used the basic mandelbrot you can find in this post:
viewtopic.php?f=5&t=4354Using an ATMega clocked at 16Mhz and a Rockwell 65C02-P4 I achieve an average frenquency of 2.2Mhz, completing the maldelbrot in about 9 minutes and 22 seconds
Using a WDC W65c02S8P-10 and ATMega overclocked with a 18.432Mhz crystal it completes the mandelbrot in 8 minutes and 8 seconds in an average of 2.6Mhz
I developed it in a breadboard and finally I designed and ordered some PCB, I attach some photos including one of an ATMega16 16Mhz with Rockwell 65C02 version and one of an other using ATMega32 with 18.432Mhz crystal and the WDC 65C02, the small 8 pin IC's are i2c EEPROMS.
As the PCB has populated all the "important" buses and clock signals it can be relatively easy to drop out the ATMega and put on top an other PCB with common ACIA 6551, parallel EEPROM and some glue logic to make a more "real" computer, maybe next year
The main problem is... I had a lot of fun doing it but now I can not find any useful thing I can do with it apart from learning and programming in 6502 assembler, do you have the same problem? I see Garth Wilson uses his Bench-1 computer for a lot of things developing other projects, but the main things I do is using microcontrollers and don't see how I can use it for help me, anyway, it was really fun to build it.
I hope you like it and I want to thank all the information I found in this forum and his members websites, and also excuse my english.
Regards