Motorola 68008 Microprocessor Kit
Wichit Sirichote, firstname.lastname@example.org
Build your own Microprocessor training kit with the 68008 Microprocessor.
This is my 2016 year-end project. The educational kit using a 32-bit computing power, the Motorola 68008 microprocessor. The design is simple with minimum components, however providing a large amount of memory space, 128kB RAM and 128kB ROM. The keyboard and hex display allow us to enter 68000 code to the memory and test run with single step and break point. The CPU status will be saved to user registers for example D0-D7. These are 32-bits registers which can be displayed on the 8-digit seven segment directly. The decoder logics are put into the PLD chip, 22V10. All memory and I/O spaces, DTACK, AUTO vector, boot overlay signals, are written in logic equations. The monitor program was 'c' and assembly codes. Users may modify your own monitor program easily. The board layout is very nice, easy build, and easy use.
Hardware schematic (click to enlarge)
Hardware descriptions: U6 is the 68008 microprocessor. The bus interface signals are A0-A19, and D0-D7.
The CPU clock is generated by Y1, the oscillator chip. The frequency is 10.000MHz.
U1 is 128kB EPROM, 27C010. The address space for EPROM is located at 0x40000-0x5FFFF. U2 is 128kB static RAM, 628128. The RAM space is located at 0x00000-0x1FFFF.
Power on reset will put the first 8 locations, 0 to 7 in ROM to be enabled. The ROM is enabled for that locations by the BOOT_VECTOR signal produced by the shift register, U7 74HC164. QH becomes HI, after 8 locations are fetched. The next cycle, will put RAM to the low address. This gives the interrupt vectors to be placed in RAM.
U5, memory and I/O spaces decoder chip is made with GAL20V10. It provides chip selected signals for memory and I/O chips, DTACK and VPA for auto vector generation.
U3, the 20-pin 89C2051 microcontroller chip produces 10ms tick. SW1 selects between 10ms tick or manual IRQ button. The chip uses E clock from 68008 which is 1MHz. The output from U4B is IPL1 signal. This is signal will be used to experiment the external interrupt level 2 with auto vector by VPA signal.
RESET signal is generated by Schmitt-trigger inputs trigger U4, R5 and C3. Q2 is voltage detector for brownout reset. The 68008 reset pin and halt pin are tied together. Q1 will pull it down when RESET1 signal is '0'.
U14, 74HC541 is 8-bit input port (PORT0). PA7 is one bit for serial data RXD signal. PA6 is for user key.
U11, 74HC573 is 8-bit output port (PORT2). The 8-bit output drives the 7-segment LED directly. No current limit resistor. U13 (PORT1) drives the BCD to decimal decoder chip, 74LS145. The active low output drives all 8 digit seven segment LED. The brightness is controlled by PWM. U13, pin 13 drives Q3 transistor for beep producing. Pin 12 is TXD pin.
U15,74HC573 is 8-bit output port (GPIO1 LED) for 8-bit binary number display. D14 lifts the forward biasing for proper brightness. JR1 is 16-pin socket for text LCD interface.
U16, MAX232 converts TTL level to RS232 level.
Q1, KIA7042 is reset chip for power brownout.
PLD equations : U5 is a PLD chip providing select signals for the memory, I/O ports, DTACK and VPA . The address and I/O spaces can be programmed using PLD equations. The PLD compiler is ATMELWinCupl. The output file, JEDEC will be used to program the PLD chip by a PLD programmer. All signals use FC0-FC2 as the main control.
Name 68008KIT ;
PartNo 20V10 ;
Date 3/12/2016 ;
Revision 01 ;
Designer Engineer ;
Company Fangkhao ;
Assembly None ;
Device p22v10;/* *************** INPUT PINS *********************/ PIN 2 = AS; PIN 3 = RW; PIN 4 = A16; PIN 5 = A17; PIN 6 = A18; PIN 7 = A19; PIN 8 = FC0; PIN 9 = FC1; PIN 10 = FC2; PIN 11 = A1; PIN 13 = BOOT_VECTOR; PIN 1 = E;/* *************** OUTPUT PINS *********************/PIN 14 = ROMCE; PIN 15 = RAMCE; PIN 16 = RAMWR; PIN 17 = PORT0; PIN 18 = PORT1; PIN 19 = PORT2; PIN 20 = LCD_E; PIN 21 = GPIO1; PIN 22 = VPA; PIN 23 = DTACK;ROMCE = ((FC2&FC1&FC0) # A19 # !A18 # A17 # AS) & BOOT_VECTOR;!RAMCE = !((FC2&FC1&FC0) # A19 # A18 # A17 # AS) & BOOT_VECTOR;!RAMWR = !((FC2&FC1&FC0) # A19 # A18 # A17 # AS # RW) & BOOT_VECTOR;!LCD_E = (FC2&FC1&FC0) # A19 # !A18 # !A17 # AS;!GPIO1 = (FC2&FC1&FC0) # !A19 # !A18 # !A17 # AS # RW # A1; PORT0 = (FC2&FC1&FC0) # !A19 # A18 # A17 # A1 # AS # !RW;!PORT1 = (FC2&FC1&FC0) # !A19 # A18 # A17 # !A1 # AS # RW;!PORT2 = (FC2&FC1&FC0) # !A19 # A18 # !A17 # AS # RW # A1;!VPA = (FC2&FC1&FC0);DTACK = (FC2&FC1&FC0);
PLD equations for 68008 kit.
10ms System Tick: U3, 8051 compatible microcontroller is used to generate 10ms tick. The circuit runs with E clock from 68008 chip. The frequency is 10MHz/10. The tick signal is output at P3.7. TP1 is 50% duty cycle with frequency of tick/2. D1 is for indicating tick signal. Calibrating the correct tick frequency can be done by testing the pulse frequency at TP1.
The source code was written in assembly code. The sample below produces a fixed frequency 100Hz or 10ms tick. We can use 10ms tick for experimenting with realtime OS as well.
; 10ms systemTick TIMER CHIP FOR 68008 KIT
; main clock is 1000kHz(E signal)$mod52dseg at 30hTICK: DS 1cseg at 0 jmp mainorg 00bhtimer0_vector:JMP timer0_SERVICE org 100h;-----initialize data-----------------------------main: mov r7,#0 djnz r7,$mov sp,#60h ; set stack pointer to 60hMOV P1,#0FFH MOV TICK,#0mov tmod,#1 ; set timer mode 1 setb et0 ; enable timer0 interrupt setb ea ; enable all interrupt setb tr0 ; run timer0SJMP $; RELOAD FCBFH FOR 10ms INTERRUPTTIMER0_SERVICE: PUSH ACC ORL TH0,#0FCH ORL TL0,#0BFH CLR P3.7 ; produce interrupt trigger ; SETB P3.7CPL P1.6 ; CHECK TICK FREQUENCY must be 100Hz/2INC TICKMOV A,TICK CJNE A,#100,SKIP MOV TICK,#0 Clr P1.7 MOV R7,#5 DJNZ R7,$ SETB P1.7SKIP:READ_MORE: POP ACC RETIend
Source code listing of 10ms tick generator.
-CPU: Motorola 68008P10
-Memory: 128kB RAM, 128kB EPROM
-Memory and I/O Decoder chip: Programmable Logic Device GAL20V10D
-DTACK generation: zero wait state
-Display: high brightness 8-digit 7-segment LED
-Keyboard: 36 keys
-RS232 port: software controlled UART 2400 bit/s 8n1
-Debugging LED: 8-bit GPIO1 LED at location 0xF0000
-Tick: 10ms tick produced by 89C2051 for time trigger experiment
-Text LCD interface: direct CPU bus interface text LCD
-Brownout reset: KIA7042 reset chip for power brownout reset
-Power consumption: 300mA @7.5V AC adapter
-Expansion header: 40-pin header
Monitor commands features:
-Enter 68008 instructions using hex code directly
-Test code running with single step or break point
-User registers for status capturing
-Dump memory to terminal
-Copy block of memory
-8-bit relative byte calculation
-Motorola hex file (S1 and S2) downloading using 2400 bit/s RS232 port.
The kit is connected to terminal with key DUMP and LOAD. The serial port format is 2400 bit/s 8n1.
The example shows memory DUMP key and LOAD key for Motorola s-record downloading. Terminal software is Teraterm.
With a big letter LCD. Key TEST writes text to the LCD and makes 32-bit counting by a 10ms tick with interrupt level 2.
The counting is 32-bit, 8 digit display at 100Hz rate. SW1 must select 10ms tick.
Let us try simple code. The example program that writes D0 to the gpio1 LED, delay a while with D1 counting, increment D0, then repeat at start. Simple and easy understand.
And here is the list file, after using the assembler. We can enter the hex code by hand or downloading to the memory and test run it.
The address begins at 400. The first instruction that writes D0 to gpio1 location composed of 6 bytes, i.e. 13, C0, 00, 0F, 00, and 00.
Can we change speed running? how?
Another example that uses 10ms generator to make gpio1 counting at 1 second rate.
The assembler is IDE68K by Peter J. Fondse. Very nice and easy use tools for 68000 chip.
Line 5 inserts the vector for interrupt level 2 at location $68. Then reinits the SYSTEM stack and enables interrupt.
Main code is Branch HERE waiting for 10ms tick interrupt.
The service routine uses D0 for counting 100 ticks or one second then increments D1, writes D1 to gpio1 LED.
We will see counting on the gpio1 LED at 1Hz rate!
The IDE68k has a nice tool for terminal interface as well. After using the assembler, we will get the hex file. The terminal can use for hex code downlading directly.
To download the Motorola hex file, press LOAD on 68008 kit then press F2 on PC. Browse the hex file then click OK. Press key GO to run the program then.
Without terminal connection, students can test such program by entering the instruction hex code to the memory using hex keys directly. The 68008 kit is a real computer!
Can you change the coutning rate from 1Hz to 10Hz? How to do that?
We can test system reset on brownout condition easily with the adjustable power supply.
The sample is BAKU power supply. Connection diagram shows Red wire to the center pin of DC jack and Black wire to the TP4, GND pin.
Try adjust output voltage from 0 to +9V and see the kit can reset properly. The DC current display will show current consumption.
New display with Amber color 7-segment.
U1 AT27C010, 128kB EPROM
U2 HM628128A, 128kB SRAM
U3 AT89C2051, 20-pin microcontroller
U4 74HC14, inverter hex inverter with Schmitt-trigger inputs input
U5 GAL22V10C, Programmable Logic Device
U6 68008P10, 48 pin DIP, Microprocessor
U7 74HC164, shift register
U8 LM7805, voltage regulator
U10,U9 LTC-4727JR, 7-segment LED
U11,U13,U15 74HC573, 8-bit data latch
U12 74LS145, BCD to decimal decoder
U14 74HC541, 8-bit tri-state buffer
U16 MAX232A, RS232 level converter
D2 TVS5V_SOD123, Transient voltage suppressor
D3 HALT LED, 3mm LED
D4 1N4007, rectifying diode
D5 POWER, 3mm LED
D14 1N5227A, +3.6V zener diode
Q3,Q1 BC557, PNP small signal transistor
Q2 KIA7042, brownout voltage detector
Resistors (all resistors are 1/8W +/-5%)
R15 10k RESISTOR SIP 9
R16 5 Ohms
C1 100uF, electrolytic capacitor
C2,C3,C13,C16,C17,C18 10uF. electrolytic capacitor
C4 10uF 16V, electrolytic capacitor
C5 1000uF25V, electrolytic capacitor
C11,C12 0.1uF, ceramic capacitor
C15 10uF 10V, electrolytic capacitor
JP1 HEADER 20X2
JR1 CONN RECT 16
J1 DC Input
SW1 ESP switch
SW2 IRQ, 12x12mm tact switch
SW3 RESET, 12x12mm tact switch
SW4 user, 12x12mm tact switch
S1,S2,S3,S4,S5,S6,S7,S8, SW PUSHBUTTON
S9,S10,S11,S12,S13,S14, S15,S16,S17,S18,S19,S20, S21,S22,S23,S24,S25,S26, S27,S28,S29,S30,S31,S32, S33
TP2,TP1 TEST POINT
TP3 +5V, use D4's leg
TP4 GND, use D4's leg
VB1 SUB-D 9, Male (cross cable)
Y1 OSC14, 10MHz oscillator chip
PCB double side plate through hole
LED cover Clear RED color 0.8mm acrylic plastic
Keyboard sticker printable SVG file
Kit information, please contact Wichit Sirichote
Download Hardware schematic, PLD files, monitor V1,monitor V2, 10ms Tick geneartor, keypad file , HD picture file, Monitor hex file for 27C010 EPROM
User's Manual rev1.0 , 68008 Kit LAB book,
Sample test code, testcode.rar small code shows simple program for testing the kit.
4 December, 2017 fixed RESET time constant, change C3 to 47uF, R8 to 10k.
8 April, 2017 68kv21.rar updated monitor program fix power on reset. Add 10k pullup at CPU pin 1-8.
27 February, 2017 MonitorV3.zip updated monitor program with 9600 terminal, by Keith Hacke. The binary image is ready for programming the 128k EPROM. Source code with comments is available for 68008 kit users.
Last updated 8 April 2017
27 Frebruary 2017
31 December 2016