68HC11 Projects

This page is dedicated ot those projects of mine that use a 68HC11 board. Currently I have a Marvin Green BotBoard 2 using sbasic, MIT Miniboard using ICC11, a Kevin Ross BotBoard+ using sbasic and a New Micros NM0020 HC11 board running Basic11. Yeah, I have attention deficit syndrome... I've made this page to help others deal with all of the silliness that goes with getting this very nice, but sometimes troublesome platform genre to work.

The BotBoard 2

PARTS and Marvin Green supply this board. It is an HC11A1 (usually) with 32K expanded RAM, RS232 interface and connectors and tons of prototyping space. There are 8 data lines and 3 decoded addresses brought out on an expansion connector, $4000,$5000,$6000 and $7000 is decoded separately. I use the $7000 R/W address for a 14 pin output latch that mimics the 14 pin HD44780 LCD interface pinout - I've modified outch11.lib to use this port for the sbasic print commands. It works great. Here are code snippets and what they do.

outch.lib

This file comes with sbasic as outch11.lib and is designed to replace outch.lib to give you LCD character access for the print commands. I've modified mine so that it will work with a 14 pin connector lined out for an LCD cable. To do that I swapped RS and E from Marvin's code because I wanted to make a connector that didn't have all the data lines on it in a seemingly random order.

This is the standard 14 pin pinout for an HD44780 LCD board. Typically we only use it in 4 bit mode. My wiring sets D0-D3 as the 4 bits that are used to control the LCD. I've wired D4-D7 in such a way that I can use the bits for RS and E and still get the 4 bits in a row in case I want to use this port in some other way.

I used a 74HC574 for the latch, it has all of the inputs on the "left" side of the chip and all of the outputs on the "right" side of the chip. The 74HC574 has one drawback, it only has a CLK and an OE line, there is no "clear" pin, you need to clear this latch programatically upon startup.

outchs.lib

This file is yet another replacement for the outch.lib file which is used by sbasic to print. I've changed it to add an inter-character delay that is quite essential for many serial LCD boards out there. You can freely move the various outch files around before compile time, just make sure that you have at least one named outch.lib!

sound.bas

This file uses an output compare register to generate various frequencies to make music, such as it is. Again, this file comes with most sbasic installations, I've just modified it a bit to work more generically and make it more understandable, by me anyway. Hang a speaker off of OC2 (PA5) to hear the sounds. It also uses print statements to display what is being played. The code as it sits now is using the direct LCD outch, not the serial one - the commented out lines are for use with the serial LCD boards.

hello.bas

This file shows how to use an LCD display, either directly connected to $7000 via the outch11.lib (as above) or via a serial LCD board using the appropriate outch.lib file. I have two different serial LCD boards, one is the BG-Micro PIC-N-LCD board (which is very nice) and one that is the Peter Anderson LCD board, also very nice. The control codes for either direct or serial connections are different and you'll have to check your board to see what code is a "clear screen", "home cursor" etc.

sonar.bas

This file demonstrates using a Polaroid SONAR unit. It is written to be used with the SUN 660 board hacked out of a camera as I show HERE on another web page. I show it using the BINH functionality, which I've never gotten to work, but leave that in because it keeps the timing right anyway!

bender.bas

This is a cute little program that uses an A/D line to read the value from a bend sensor that I pulled out of a Nintendo PowerGlove, displays the relative value as a sort of bar graph on an LCD display and moves a servo to match it. I got the idea from a couple of places and put a bunch of the ideas together in this single file. This also shows you how to set up the HC11 to control 4 servos automagically wihout an interrupt handler. However, it uses all 5 OC registers so it will prevent you from using any other OC or IC based interrupts while using this program.

 

More to come later...