Does this project spark your interest?

Become a member to follow this project and don't miss any updates

6502sbc Robot

65C02-based SBC with a discreet-part servo controller and ADC intended as a intermediate-skill learning tool.

Similar projects worth following

This project was created on 08/01/2014 and last updated 6 months ago.

In short, a chance conversation in a bar and my own frustrations with perceived deficiencies with current educational hardware and software systems led to this project.
This ecosystem is intended as a learning tool, a step up from the Arduino, Raspberry Pi, and equivalent platforms. It is well documented, uses mostly generic parts, and is designed to be easy to assemble and use. It lays out what would normally be encapsulated in a black plastic or ceramic chip the size of ones thumbnail in order to provide the opportunity for investigation and experimentation.
It is my hope that this system will give users a much better understanding of what goes on inside modern microcontrollers, and thus make them better engineers.

It is comprised of a simple single board computer built around a 65C02, a two channel hobby-class servo controller board made entirely out of discreet 74HCxxx ICs, and an ADC board for use with a reflectance sensor bar for line following.

65C02 Single Board Computer (6502sbc):

  • Designed around the Rockwell 65C02 microprocessor and equivalents
  • 32k x 8 bit SRAM
  • 32k x 8 bit flash non-volatile storage ("ROM")
  • 16C550 UART (FTDI and standard modem interface)
  • Power On Reset (POR) monitor circuit
  • Complex Programmable Logic Device (CPLD) ("glue logic")
  • Twenty pin expansion header (XPAN) supports up to four external devices
  • On-board 5V power supply
  • Parallax BoE-bot chassis-compatible PCB footprint

Dual Channel Servo Control Board

  • Drives two hobby-class servos
  • Provides 256 discreet steps per servo
  • Built entirely from discreet 74HCxxx logic ICs
  • Uses standard 6502sbc XPAN expansion header
  • User controlled status LED

Eight Channel ADC Board

  • Provide eight 8-bit analog-to-digital conversion channels
  • Built around Texas Instruments ADC0808-N ADC
  • Uses interrupt to signal 'data ready' condition
  • Multipurpose but designed for use with Pololu QTR-8A Reflectance Sensor Array

Also has a 2.5AHr lithium-polymer battery pack. Currently unconnected as I'm taking the whole project apart on a regular basis to test things.

Simplified block diagram:

Project logs
  • For further updates...

    6 months ago • 2 comments

    For further updates follow along at my website,

    I'll probably still answer questions and comments here but all the action will be over there from now on.

    Thanks for watching!

  • More progress!

    7 months ago • 0 comments

    Still not the spacecraft.

    Fixed the servo board! Turns out it was user error: I had the Read/#Write line plugged into #IRQ pin on the XPAN connector - they're right next to each other. (I need a test rig for my test rig?) I guess the crosstalk was clean enough at power up to trigger the register twice.

    Speaking of test rigs:

    PanaVise FTW.

    That's an Adafruit Boarduino from, like, forever ago. That and an (Adafruit) USBTinyISP programmer have been my standby prototype equipment for a long time now.

  • Weird bug on the servo board

    8 months ago • 0 comments

    Still working on the servo board.

    I've run into an interesting bug. The data inputs from the bus are doubled buffered so the controller doesn't swap out the compare value part way through a cycle and cause glitches in the output waveform. The buffers are two eight bit registers, one clocked on the data from the expansion bus and the other clocked on the counter reset conditions.

    The first register, the one that holds data from the expansion bus, clocks in data exactly twice and then refuses to clock in new data (or at least refuses to show it on the outputs) for at least the next few minutes (that's as long as I've tested it).

    I've verified with a logic analyser that the clock and data input signals appear as expected, and the problem exists with both channels on the board (so I don't think it's a bad part). It's repeatable as well; I power cycle the board and the same thing happens every time.

    I'm stumped; anybody have any ideas or things to try?

View all 6 project logs


david.cramer wrote 6 months ago point
To bad you didn't use the WDC 65C02.... Those are available online at Mouser and Jameco.

Are you sure? [yes] / [no]

Carbon wrote 6 months ago point
Actually, I had the WDC 65C02 in mind when I designed this project! I think WDC added a few extra opcodes for special functions but otherwise it's identical to other 65C02 chips; should be a drop in replacement, no modification needed.
I used non-WDC processor for the prototype because I had a tube of chips in my parts box that were going unused.

Are you sure? [yes] / [no]

dajgoro.labinac wrote 8 months ago point
Will this robot be using a C compiler like cc65?

Are you sure? [yes] / [no]

Carbon wrote 8 months ago point
Probably not. I'm currently writing code with a hex editor and a 65C02 reference manual. That said I don't see why cc65 couldn't be used; the processor board doesn't care what compiler was used so long as the flash memory contains valid instructions.

Are you sure? [yes] / [no]

Don wrote 8 months ago point
Nice project! Many years ago, I learned that sockets are a high failure rate component. Have you considered soldering the ICs directly to the board?

Are you sure? [yes] / [no]

Carbon wrote 8 months ago point
I have! I'm using sockets because it's easier to make changes (and repairs!) to the board if I don't have to desolder parts.

Are you sure? [yes] / [no]

David Cook wrote 8 months ago point
Nice macro photo of the bent pin! I grew up on 6502 microprocessors, so your project makes me nostalgic. Good luck!


Are you sure? [yes] / [no]

Carbon wrote 8 months ago point
Thanks! :D

Are you sure? [yes] / [no]

Similar projects