65C816 Microprocessor KitWichit Sirichote, wichit.sirichote@gmail.com
Build the 65C816 microprocessor kit, learn the 68516 operations easily.
The 65C816 Microprocessor kit is suggested by Mendel Cooper from NC. The design is based on the 6502 kit with additional UART chip and 128kB RAM. The monitor program runs in emulation mode. To test the 65816 code, user can switch to native mode or emulation mode by software control.
The CPU is 65C816 microprocessor running at 1.228MHz. ROM monitor is 32kB, RAM is 96kB. The UART is Motorola 6850 ACIA. Serial speed is 9600.
65C816 Microprocessor kit Hardware description:
U5 is the 65C816 40-pin DIP package 16 bit microprocessor. The CPU oscillator is generated by Y1, half size 1.228MHz oscillator module. The clock signal is connected to PHI2 pin. The address lines A0-A15 are connected to rom monitor directly. The upper address lines, A16 to A19, are latched by U3, 74HC175.U1, 27C256 is rom monitor located at C000 to FFFF. The address lines A0-A14 are connected to the CPU address bus directly.
U2, 628128 is ram, located at 00000-07FFF and from 10000-1FFFF, 96 kB space. A16 is from U3, the latch for high address, 4-bit A16-A19.
U3, 74HC175 captures the high address from the data bus during the low to high edge of phi2 signal.
The memory decoder, is U4 GAL22V10. The PLD equation is shown below.
U9, 74HC573 is decoded as PORT2. The 8-bit output drives the segments of U7 and U8 directly.
U10, is decoded as PORT1. The output drives the common cathode pins of the 8-digit 7-segment display.
U11, 74Hc541 PORT0, reads the matrix key from row PA0 to PA7.
U12, 74Hc573 as gpio1 is located at 8000. It drives 8 dot leds.
U13, At89C2051 provides 10ms tick signal. SW1 selects between 10ms tick or IRQ signal.
U14, Motorola 6850 provides the 9600 serial interface. The UART clock is divided by 8 from PHI2, 1.228Mhz, by U16. The RX and TX clock is 153600Hz.
Hardware schematic (click to enlarge) Hardware Features:
-CPU: 65C816 CMOS 16-bit Microprocessor, 1.228MHz
-Memory: 96kB SRAM, 32k monitor ROM
-Memory and I/O Decoder chip: Programmable Logic Device GAL22V10D
-Display: high brightness 8-digit 7-segment LED
-Keyboard: 36 keys
-RS232 port: UART, 9600 bit/s 8n1
-Debugging LED: 8-bit GPIO1 LED at location 8000H
-Tick generator: 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
-Expansion header: 40-pin header
-Power consumption: 700mW
The monitor program features:
-Simple hex code entering
-Insert and Delete byte
-User registers display
-Copy block of memory
-Relative byte calculation
-HEX file downloading.
-Memory dump
-TEST 10ms tick interrupt
-16-bit zero page memory display, useful for native mode testing.The monitor program will be updated and available for modification at the download links.
Keyboard layout: Nice keyboard design with Helvetica font.
Keyboard layout. The memory and I/O devices decoder is made with PLD chip, GAL22V10. The equations are compiled to JEDEC file using WInCupL. The locations of memory and I/O devices are shown in the comment lines.
.
Name 65816KIT ;
PartNo 22V10 ;
Date 12/1/2014 ;
Revision 01 ;
Designer Engineer ;
Company Fangkhao ;
Assembly None ;
Location ;
Device g22v10;/* *************** INPUT PINS *********************/PIN 1 = PHI2; PIN 2 = RW; PIN 3 = A12; PIN 4 = A13; PIN 5 = A14; PIN 6 = A15; PIN 7 = A16; PIN 8 = A17; PIN 9 = A18; PIN 10 = A19; PIN 11 = A0; PIN 13 = A1;FIELD ADDRESS = [A19..A12];/* *************** OUTPUT PINS *********************/ PIN 14 = ROMCE; PIN 15 = RAMCE; PIN 16 = RAMWR; PIN 17 = GPIO1; PIN 18 = LCD_E; PIN 19 = PORT0; PIN 20 = PORT1; PIN 21 = PORT2; PIN 22 = UART; PIN 23 = HI_AD;!ROMCE = (RW & PHI2) & ADDRESS:[0C000..0FFFF];!RAMCE = ADDRESS:[00000..07FFF] # ADDRESS:[10000..1FFFF];!RAMWR = !RW & PHI2 & ((ADDRESS:[00000..07FFF] # ADDRESS:[10000..1FFFF]));!LCD_E = !PHI2 # A19 # A18 # A17 # A16 # !A15 # A14 # A13 # !A12; !GPIO1 = RW # !PHI2 # A19 # A18 # A17 # A16 # !A15 # A14 # A13 # A12 # A1 # A0;PORT0 = !RW # !PHI2 # A19 # A18 # A17 # A16 # !A15 # A14 # A13 # A12 # A1 # !A0;!PORT1 = RW # !PHI2 # A19 # A18 # A17 # A16 # !A15 # A14 # A13 # A12 # !A1 # A0;!PORT2 = RW # !PHI2 # A19 # A18 # A17 # A16 # !A15 # A14 # A13 # A12 # !A1 # !A0;UART = A19 # A18 # A17 # A16 # !A15 # A14 # !A13 # A12;HI_AD = PHI2;PLD equations The memory and input/output locations
00000-07FFF RAM 08000 GPIO1 08001 PORT0 08002 PORT1 08003 PORT2 09000 LCD COMMAND WRITE 09001 LCD DATA WRITE 09002 LCD COMMAND READ 09003 LCD DATA READ 0A000 ACIA 0A001 ACIA+1 0B000-0BFFF EXPANSION 10000-1FFFF RAM Sample code that shows how to switch from emulation to native mode. And test 16-bit accumulator.
![]()
First the carry flag is cleared and then is copied to emulation bit. This switches to native mode.
REP #$30, selects 16-bit accumulator and index registers.
Then load the accumulator with 16-bit constant, 1234. Store it to location 0 and 2 in zero page memory.
When completed, switch back to emulation mode.
Try enter the code and test run. Use key REG 6 to see the result of location 0000. It will display in 16-bit data.
Next example is to access the high address of the RAM at location 10000H.
Now we selects 8-bit accumulator mode.The 8-bit constant is loaded to the accumulator.
Then store it at memory location 10000H, using long addressing mode.
Read it back, then store it to GPIO1 LED. We will get the binary readings on the gpio1 LED directly.
For long code, we can use 9600 terminal for Hex file downloading easily. The Intel or MOS hex files are accepted.
Kit has direct bus interface LCD module. The monitor program provides LCD drivers. Study the monitor source code at download section.
Any text LCD with HD44780 compatible controller can be used.
PARTS LIST
Semiconductors
U1 27C256, 32k EPROM
U2 HM628128A, 128KB SRAM
U3 74HC175, 4-bit latch
U4 GAL22V10C, programmable logic device
U5 65C816, 16-bit Microprocessor
U6 LM7805, +5V voltage regulator
U8,U7 LTC-4727JR, 7-segment LED
U9,U10,U12 74HC573, 8-bit latch
U11 74HC541, 8-bit tri-state buffer
U13 AT89C2051, 20 pin microcontroller
U14 6850, ACIA communication adapter
U15 MAX232A RS232 converter
U16 74LS90, decade counterD1 1N4733A, +5V zener diode
D2 POWER, 3mm LED
D3 1N4007
D4,D5,D6,D7,D8,D9,D10, 3mmLED
D11,D12
D13 1N5227Resistors (all resistors are 1/8W +/-5%)
R1,R3,R4,R5,R7,R8 1k
R2 1k
R16,R6 10k
R11,R9 4.7k
R10 10k RESISTOR SIP 9
R13 10k POT
R12 20
R14 680
R15 20
Capacitors
C1,C2,C3,C13,C16,C17,C18 10uF
2 1 C4 10uF 16V
3 1 C5 1000uF25V
4 5 C6,C7,C8,C9,C10 0.1uF
5 2 C11,C12 0.1uF
6 3 C14,C19,C20 100nF
7 1 C15 10uF 10V
Additional parts
JP1 HEADER 20X2
JR1 CONN RECT 16
J1 DC Input
LS1 SPEAKER
Q3,Q1 BC557
Q2 KIA7042
SW1 10ms Tick Switch
SW2 IRQ
SW3 NMI
SW4 RESET
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
TP4 GND
VB1 SUB-D 9, Male (cross cable)
Y1 OSC8, 1.228MHz
PCB Four layers plate through hole printed circuit board
display filter sheet
Keyboard overlayKit is available on eBay.
Bitcoin and PayPal are accepted. Please contact wichit.sirichote@gmail.comDownload Schematic, monitor source code , PLD files, AT89C2051 file,
Quick start
April 25 , 2023