Flameman/fingerboard

For more interesting projects done by Flameman, be sure to checkout his project index

EARLY PROOF VERSION

= Motorola MC68HC11 =
 * "La complessità architetturale è una mezza via tra le semplificazioni fin quasi eccessive dei PIC midrange o ATMega, e i più cervellotici 16-bit con gli occhi a mandorla come alcuni design legacy di Renesas (Hitachi + Mitsubishi) o Fujitsu. Tuttavia si tratta di un chip che - pur con tutto il suo enorme fascino, come d'altronde l'80552 Philips o altri colpi di genio dell'epoca - ormai pare risentire dell'età, specialmente per le criticità e le palesi limitazioni nelle aree del clock, dell'ADC, delle seriali sincrone/asincrone" (italian comment)




 * The 68HC11 is a powerful 8-bit data.
 * 16-bit address microcontroller from Motorola (Now Freescale) with an instruction set that is similar to the older 68xx (6801, 6805, 6809) parts.
 * Depending on the variety, the 68HC11 has built-in EEPROM/OTPROM, RAM, digital I/O, timers, A/D converter, PWM generator, and synchronous and asynchronous communications channels (RS232 and SPI).
 * Typical current draw is less than 10mA.
 * Optimized for low power consumption and high-performance operation at bus frequencies up to 4 MHz.
 * The CPU has two 8 bit accumulators (A & B) that can be concatenated to provide a 16 bit double accumulator (D).
 * Two 16 bit index registers are present (X & Y) to provide indexing to anywhere in the memory map.
 * Having the two index registers means the 68HC11 is very good for processing data.
 * Powerful bit-manipulation instructions
 * Six powerful addressing modes (Immediate, Extended, Indexed, Inherent and Relative)
 * Power saving STOP and WAIT modes
 * Memory mapped I/O and special functions

introduction
The 68HC11 is a powerful 8-bit data, 16-bit address microcontroller (µC) family originally from Motorola, now produced by Freescale Semiconductor, descended from the Motorola 6800 microprocessor.

It is a CISC microcontroller similar to the older 68xx (6801, 6805, 6809) parts. Depending on the variety, the 68HC11 has built-in EEPROM/OTPROM, RAM, digital I/O, timers, A/D converter, PWM generator, and synchronous and asynchronous communications channels (RS232 and SPI).

Typical current draw is less than 10mA.

The 68HC11 devices are more powerful and more expensive than the 68HC05 microcontrollers, and are used in barcode readers, hotel card key writers, amateur robotics, and various other embedded systems.

The MC68HC11A8 is available in a 48-pin dual in-line package (DIP), as well as the 52-pin plastic leaded chip carrier (PLCC) as shown above.

Internally, the HC11 instruction set is upward compatible with the 6800, with the addition of a Y index register. (Instructions using the Y register have opcodes prefixed with the byte 0x18). It has two eight-bit accumulators, A and B, two sixteen-bit index registers, X and Y, a condition code register, a 16-bit stack pointer, and a program counter. In addition, some instructions treat the A and B registers as a combined 16-bit D register.

Different versions of the HC11 have different numbers of external ports, labeled alphabetically. The most common version has five ports, A, B, C, D, and E, but some have as few as 3 ports (version D3). Each port is eight-bits wide except for D, which is six bits (in some variations of the chip, D also has eight bits). It can be operated with an internal program and RAM (1 to 768 bytes) or an external memory of up to 64 kilobytes. With external memory, B and C are used as address and data bus. In this mode, port C is multiplexed to carry both the lower byte of the address and data.

A MC68HC24 port replacement unit is available for the HC11. When placed on the external address bus, it replicates the original functions of B and C. Port A has input capture, output compare, pulse accumulator, and other timer functions; port D has serial I/O, and port E has an analog to digital converter (ADC).

The Freescale 68HC12 is an enhanced 16-bit version of the 68HC11.

The Freescale 68HC16 microcontroller is intended as a 16-bit mostly software compatible upgrade of the 68HC11.

Other board example

 * C11evb

architecture
The M68HC11 is optimized for low power consumption and high-performance operation at bus frequencies up to 4 MHz. The CPU has two 8 bit accumulators (A & B) that can be concatenated to provide a 16 bit double accumulator (D). Two 16 bit index registers are present (X & Y) to provide indexing to anywhere in the memory map. Having the two index registers means the 68HC11 is very good for processing data. Although an eight bit processor, the 68HC11 has some 16 bit instructions (add, subtract, 16 * 16 divide, 8 * 8 multiply, shift, and rotates). A 16 bit stack pointer is also present, and instructions are provided for stack manipulation. Typically multiplexed address and data bus.

HC11 A Series
8K ROM (A8), ROMless (A0,A1), 256 RAM, 512 EEPROM (A1,A8), SPI, SCI, 3 IC 5 OC, 8 channel 8 bit A/D.

HC11 C0
Nice new device developed together with AT&T. ROMless, on board bank switching to support memory maps of up to 256K. Totally glueless interface - Chip selects on board, Read Enable and Write Enable signals now generated on chip. 256 RAM, 8 channel 8 bit A/D.

HC11 D Series
Smallest and lowest cost member of the hc11 Family. ROMless (D0), 4K ROM (D3), 4K EPROM (711D3) - No A-D or EEPROM. Still has standard timers and serial ports.

HC11 E Series
Same as A series except 512 bytes RAM and 512 EEPROM (2048 for E2). Pin compatible, only difference is one timer pin (PA4) can now be used for IC or OC instead of just OC. Also have EPROM devices and larger memory - hc711e9 (12K OTP), hc711e20 (20K OTP).

HC11 F Series
ROMless, non multiplexed address/data bus with 4 chip selects built in. 1K RAM, 512 bytes EEPROM - otherwise same peripherals as E series.

HC11 G Series
16K ROM/EPROM, Non mulitplexed address/data bus, 512 RAM, 4 channel PWM, 10 Bit A/D convertor, 2 separate 16 bit timers.

HC11 K4
24K ROM/EPROM, 1Mb addressing using on chip memory mapping. Non multiplexed address and data bus. 4 programmable chip selects, 8 channel 8 bit A/D. 4 channel PWM, 768 bytes RAM.

HC11 L6
The 68HC11L6 is based on the 68HC11E9. 16K ROM, additional bidirectional port. Its fully static design allows operation at frequencies down to dc.

HC11 M Series
Large memory modules, 16 bit math coprocessor, 4 channels of DMA.

HC11 P Series
Programmable PLL- based clock circuit, many 1/0 pins, large memory and 3 SCI ports.

= project, intro =



http://www.embeddedtronics.com/computers.html


 * BSP
 * app
 * 68hc11 cross compiler build
 * buffalo
 * etc

synthesizable VHDL implementation
http://www.gmvhdl.com/hc11core.html

buffalo
The standard bootloader for the HC11 family is called BUFFALO, "Bit User Fast Friendly Aid to Logical Operation" (a BUFFALO prompt seen on the serial port at bootup is a sign that a board's flash memory has been erased). Not all HC11 models come with the BUFFALO bootloader. The 68HC11A0 and A1 do not but the A8 does.

srec talker
i am developing it

gcc
[[Media:m68HC11-gcc.pdf|m68HC11-gcc.pdf]]

ada
gnatgcc? 

teach
http://www.owlnet.rice.edu/~elec201/Book/6811_asm.html

http://www.owlnet.rice.edu/~elec201/Book/hardware.html

playstation1 pad interface
to be completed

i2c eepom reader/writer
to be comleted

fingerboard board test
to be completed

fingerboard boot loader srec
to be completed

Fast and simple insert code into crt0.s
Submitted by imajeff on Fri, 2006-09-22 18:22. Advise | Tricks

Some time ago there was a question of the sort, "How do I make my own crt0.o file". Then the buzz started, and everyone was talking about how to do these things, including relocating RAM and other hardware configuration.

It seemed overly dificult to worry about things like finding the original crt0.s file (I've only found it burried in the GCC source code), and taking chances of changing too much so it didn't properly initialize RAM and such. Well, I have a solution where all I do is insert my startup code in a specific slot within the default crt0.s without having to edit that file!

Here is my entire "startup.s" file:

startup.s
.section .install1 movb #0x39,0x10 ; INITRM: end 0x3fff movb #0x00,0x11 ; INITRG: start 0 movb #0x08,0x12 ; INITEE: end 0x0fff
 * Startup code
 * Author Jefferson Smith

Referring to the guide "Using the GNU Development Tools for 68HC11 and 68HC12" section 4.2, I notice that the memory section ".install1" is a "placeholder for applications". The reason is that if I add code to this section, it is automatically inserted between the stack pointer initialization and the default RAM initialization. This is a wonderful place to relocate RAM or hardware registers because no stack was used (have not called __premain yet) and no memory was accessed except the instruction to initialize SP.

If you have quite a lot of code to insert here, you could `call` into a PPAGE bank so the init code doesn't take up fixed Flash space.

This is an example of the link commandline that uses startup.s:

m6811-elf-gcc -m68hcs12 -mshort -Wl,-T,ldscript-rom.x -mrelax -o test.elf test.o vectors.o startup.o -lm -lbcc -lc -lbcc

Simply adding startup.o to the list of objects inserts the code.

interesting links
http://tcrobots.org/members/akili.htm

http://controls.ame.nd.edu/microcontroller/main/

cross compilers: http://www.geocities.com/ResearchTriangle/1495/ee_c_compilers.html

datasheet
http://www.freescale.com/files/microcontrollers/doc/data_sheet/M68HC11E.pdf

static ram 32k http://ecee.colorado.edu/~mcclurel/w24257-a16.pdf

static ram 64k http://doc.chipfind.ru/pdf/winbond/w24512.pdf

[[Media:m68HC24_datasheet.pdf|m68HC24_datasheet.pdf]]

= board =

Features

 * Improved silkscreen.
 * Jumper selectable reset address. Reset vector can be located at 0xFFFE,0xFFFF or 0xBFFE,0xBFFF.
 * Optional external battery backup capable.
 * Optional external memory mapped LCD capable.
 * Optional Low Dropout voltage regulator ready.
 * Optional remote reset through serial port.
 * Reset switch now added along side download switch on the communications board.
 * Smaller overall footprint, 2" x 4", with the attached communications board.
 * Same professional board quality as before.

Specifications

 * Motorola 68HC11 CPU.
 * 256kbit (32Kbyte) Dallas battery-backed memory module, no need to use eproms or slower eeproms.
 * Compact size 2" X 2.85" (main CPU board)
 * Network capable Serial Peripheral Interface (SPI).
 * No expensive hardware programmer needed, programs can be downloaded using a standard serial port.
 * Expansion Ports, list of headers:
 * Port A of 68HC11, 8 multi function I/O pins (JP8).
 * Port E of 68HC11, 8 analog channels (JP7).
 * Memory mapped I/O, Finger Board can be easily expanded to have 32 digital inputs and 32 digital output lines (JP9).
 * IRQ and XIRQ lines brought out for external interrupts (JP11).
 * Standard 9 pin serial port (P1).
 * SPI high speed serial interface, an easy way to attach peripherals (JP4).
 * LCD display interface (JP2).
 * Sharp IR receiver input (JP10).
 * Speaker output (JP12).
 * Infrared transmitter output (JP13).
 * MODB select (JP18)
 * External A/D reference input (JP6)
 * SRAM battery backup (JP19)

Power requirements

 * 7 to 18 Volts DC. Can easily run from a 9 Volt DC battery.
 * Current consumption: 24ma.
 * DC without communications board < 10ma in WAIT mode, or STOP mode 30ma.
 * DC with communications board.
 * Dimensions:
 * CPU board only 2.85" long 2.0" wide.
 * Communications board 1.15" long 2.0" wide.
 * CPU board with attached communications board 4" long 2.0" wide.

Memory map


Reset vector can be located at 0xFFFE,0xFFFF or 0xBFFE,0xBFFF.

The Finger Board operates the 68HC11 in "Special Mode". This causes the interrupt vectors to be located at address $BFC0-BFFF. While operating in "Special Mode", the 68HC11 can switch back and forth between expanded mode operation and single-chip mode. Interactive C switches the 68HC11 to single-chip mode when it communicates with the LCD since the LCD module cannot communicate at the normal rate of the peripheral bus.

On power-up with S1 depressed, the 68HC11 enters "Special Bootstrap Mode". This is when the internal boot loader is used to upload a more extensive bootloader which will then load your srecord program code. After your program code has been loaded and a reset is issued, the 68HC11 enters "Special Test Mode" and will automatically jump to the program with the reset vector location stored at $BFFE:BFFF.

When using other languages, make sure to declare your interrupt vectors in the "Special Mode" range of $BFC0 to $BFFF.

The Finger Board II now has the option to set the reset vector to location $FFFE:FFFF with jumper JP18 (MODB).

For more information, please see chapter 3 of the Motorola 68HC11 reference manual.

How much free memory do I have after loading the IC pcode? After loading the pcode, there are approximately 16320 bytes of available program space. The pcode source code can be modified and re-compiled to take up a smaller footprint in memory. Routines such as the IR and Motor PWM subroutines can be deleted if not needed for your application.

This is the approximate breakdown of the memory space. (Thanks to fredm@media.mit.edu)

User program object code + user global variables: 16320 bytes available Runtime pcode OS: 7936 bytes Used stack space for user processes: 6656 bytes Used buffer for interaction process: 256 bytes Used buffer for printing: 256 bytes used

LCD
The Finger Board uses LCD's with the Hitachi chip set HD44100 and HD44780. Some of the older LCD displays require a -5volt bias and will not work. If the version of the LCD contains a single row header, 1 X 14, connect the pins in the same pattern as on JP2. Pin 1 on LCD connects to pin 1 on JP2 etc.

This is the pin assignment of the LCD.

Pin 01 - gnd Pin 02 - 5volts Pin 03 - gnd (contrast pin, ground for highest contrast) Pin 04 - RS (register select) < A9 Pin 05 - R/W (read/write) < A8 Pin 06 - /enable <- 68hc11.PortA.4 Pin 07 - db0 (data bus) Pin 08 - db1 Pin 09 - db2 Pin 10 - db3 Pin 11 - db4 Pin 12 - db5 Pin 13 - db6 Pin 14 - db7

Features

 * Compact "DX" form factor (2.8" x 2.1")
 * Works with any 68HC11 E series microcontroller
 * 9.8304 MHz crystal
 * 32K EEPROM
 * 512 bytes internal RAM (on MCUs)
 * Hardware Write Protect switch for EEPROM
 * Design incorporates 68HC24 port replacement unit (PRU) for full 68HC11 port compatibility
 * 26 general purpose I/O lines (including 3 input captures and 5 output compares)
 * Pulse accumulator, hardware timer, real-time interrupt, watchdog, 2 hardware interrupts
 * 8 channel 8-bit analog-to-digital converter
 * Serial peripheral interface (SPI) port offers virtually unlimited expansion
 * Serial Communications Interface (SCI) port, with programmable baud rate up to 38,400
 * RS-232 serial port, utilizing on-chip SCI (4-pin connector)
 * SCI compatible with MIDI and RS485/RS422
 * On-board reset circuit and button, 5V regulator, and RS232 interface
 * Low power requirements (45 mA nominal; much less in STOP mode)
 * All port pins are brought out to standard 50-pin connector pattern
 * Virtual plug-in interchangeability with all Adapt11 family boards
 * 11 connector options for the ultimate in modular design capabilities
 * Use programming language of your choice: C, BASIC, assembler, etc.
 * Compatible with JBug11 and PCBug11 debug/monitor programs
 * Easy program-loading via MicroLoad, JBug11, PCBug11, ICC11, etc.
 * Compatible with BASIC11 Compiler/Simulator/Debugger/Terminal IDE for Windows
 * Low cost-- ideal for educational and embedded applications
 * Many accessories available

Memory map
0000-01ff internal ram 0200-0fff 3.5K external ram 1000-103f internal register block 103f-1fff reserved 2000-7fff 24k external ram 8000-ffff 32k eeprom e000-ffff 8k eeprom

Features
http://handyboard.com/

Handy Board

The Handy Board is based on the 52-pin 8-bit CPU Motorola MC68HC11A1 processor, and includes:

* MIT Handy Board and Serial/Battery charger boards with ALL components soldered * All components on both boards (MC68HC11A1, L293D motor drivers, IR demodulator...etc.) * 16x2 LCD display * RJ11 modular cable * DB9&DB25/DB25 Serial downloading cable * Interactive-C 4.x (the freeware program from KISS the robot institute) * 1 (8 x 1.5V AA) battery holder * 32K of battery-backed static RAM * four outputs for DC motors * two outputs for servo motors - there are plans for an expansion board to increase this to 8 * digital and anlaog inputs that allow active sensors to be individually plugged into the board * This design is ideal for experimental robotics project, but the Handy Board can serve any number of embedded control applications.

The Handy Board is a based on the 6811 microprocessor with 32K of static RAM, so just about any 'HC11 development tools may be used with it. A wide range of options are available for developing software on the Handy Board, including free assembly language tools provided by Motorola, and commercial C compilers.

Additionally, the Handy Board is shipped with access to the free KISS Interactive C, the programming environment. Interactive C (IC4.0) is a multi-tasking, C language based compiler that includes a user command line for dynamic expression compilation and evaluation. Originally created for student use, IC has a wide range of applicability to research and prototyping efforts.

gel
http://gel.sourceforge.net/gel.php