bbenchoff wrote:
Alright, this isn't my first 6502 single board computer. I recently put together
this one, and everything's just grand.
There are a few things I don't like about the design, and the design of most of the SBCs I see. First, there's the issue of having to remove the ROM chip to reprogram it. I know we're just dealing with 27Cxx and 28Cxx chips here, and a programmer is easy enough to bitbang with a microcontroller, but having to remove the ROM from the circuit just doesn't scream elegance with me. Secondly, the use of MAX232* and - gasp - DE-9 ports - just strikes me as antiquated.
With that being said, here's my pitch: has anyone ever looked into using a modern microcontroller to reprogram the ROM and provide a serial interface? There's
this project that can program a 28Cxx ROM with an Arduino and a pair of shift registers, and I've seen a few people looking into using an ATMega32U4 instead of a MAX232 chip.
I'd really like to come up with a minimal 6502 SBC that's just CPU, ROM, RAM, and glue (with the data, address, and CS lines broken out on a header), but with the added features of a USB serial port and ability to reprogram the ROM in circuit. I know this is possible, but it's just one of those things that seems
too obvious and should have been done already.
Just throwing this out there to get some feedback, really.
It looks like a ATMega32u4 is in TQFP 44 pin package. This is a package which is less than a half-inch per side - 10mm x 10mm.
There are 11 pins per side with a pin spacing of 0.8mm. A standard DIP package has a pin spacing of 0.1 inch or 2.54mm.
So the pin spacing is three times denser than a DIP package.
Most of the homebuilt 6502 SBC are either hand-soldered or wire-wrapped. A tiny TQFP package with tight pin spacing is not very hand-soldering friendly.
It is also not socketable, so not very wire-wrap friendly either.
Once you figure out how to mount the ATMega32u4, you still need to give it access to the EEPROM or other device.
It looks like the ATMega32u4 has 20 bits of usable I/O on ports B, C, D, and E.
You need 8 bits for data, 1 for R/W, 1 to request the bus, so this leaves about 10 bits left.
So the ATMega32u4 would only be able to program about 1k of EEPROM.
Assuming you manage to connect the ATMega32u4 into your SBC somehow, you still need to program the ATMega32u4.
It looks like it has a JTAG interface, so you need some sort of JTAG interface to load code into the ATMega32u4 and an AVR debugger.
Now that you can load code into the ATMega32u4, you still need USB code to load into the ATMega32u4.
You reference it as a "USB serial port" which sounds like you are underestimating the complexity of USB.
This is basically the same as saying "Ethernet serial port" which handwaves the complexity of the protocol.
USB is a packetized protocol which requires a protocol stack, much like Ethernet requires a TCP/IP stack for most purposes.
From what I can tell, a minimal USB stack requires about 16k of code.
So this needs to be acquired somehow and ported.
After all this, you're actually ready to load code into the 6502.
Toshi