TMS9995 Microprocessor Kit

Wichit Sirichote,

Build your own the TMS9995 Microprocessor training kit in the year 2021!

The TMS9995 microprocessor kit is based on Texas Instruments TMS9995 16-bit microprocessor. The chip has 8-bit memory interface and the software is TMS9900 compatible. I used the same platform as CDP1802 kit. All I/Os including 7-segemnt display, keyboard, UART and LCD are memory mapped. The 8 digits display provides 16-bit EVEN location and 16-bit data. The monitor program was developed with assembly coding by c32 cross assembler. Serial communication uses UART chip, NS8250. The hex monitor allows instruction to be entered and tested it directly. The interrupt vectors from level 1 to level 4 are put in RAM. The software interrupt vector XOP8 to XOP15 are also relocated to RAM.
The TMS9995 Microprocessor kit

Hardware description:

U5 is the TMS9995 CPU. The oscillator is the onchip circuit with 8MHz XTAL. Internal clock is then 2MHz (8MHz/4). The CLKOUT 2MHz is used for UART and tick generator chips.

External memory is interfaced with data bus D0-D7, and A0-A14. The memory Read/Write control signals are MRD (*DBIN), MWR (*WE) and MEMEN (*MEMEN).

The memory and I/O decoder locations use the programmable logic device, GAL22V10. See the equations below.

U1 is 32kB monitor EPROM, 27C256. The address space is located at 0x0000-0x6FFF.

U2 is 32kB static RAM, 62256. The RAM space is located at 0x8000-0xFFFF.

All I/O are decoded to memory locations from 0x7000 to 0x7FFF. (see PLD equation for each device)

U3, the 20-pin 89C2051 microcontroller chip produces 10ms tick. SW1 selects between 10ms tick or manual INT1 button.

U12, 74HC541 is 8-bit input port (PORT0). Seven bits, PA0-PA6 are input signals of the row keypad.

U10, 74HC573 is 8-bit output port (PORT2). The 8-bit output drives the 7-segment LED directly. No current limit resistor. U11 (PORT1) drives 6-digit common cathode pin. The brightness is controlled by software.

U13(GPIO1), 74HC573 is 8-bit output port located at 7000H. It is for program testing.

D14 lifts the forward biasing for proper brightness.

JR1 is 16-pin socket for text LCD interface. Any text LCD with HD44780 compatible controller can be used with no modifications. U15, HIN232 converts TTL level to RS232 level.

U14, is hardware UART using the NS 8250 chips. All registers are located in memory space. The input clock signal is the same CPU frequency, 2MHz. To produce 9600 bit/s, we can use internal divider with 13. It will produces close value to 16x9600 Hz.

OUT1 pin of the UART chip drives small speaker LS1. The hex monitor produces BEEP when key was pressed.

Q1, KIA7042 is reset chip for power brownout. JP1 is 40 pins header. It is for hardware interface experiment.
Hardware schematic (click to enlarge)

Hardware Features:

-CPU: Texas Instruments TMS9995 @8MHz XTAL (2MHz internal)
-Memory: 32kB SRAM, 28kB EPROM, 4kB memory mapped I/O
-Memory and I/O Decoder chip: Programmable Logic Device GAL22V10D
-Display: high brightness 6-digit 7-segment LED
-Keyboard: 36 keys
-RS232 port: INS8250 UART, 9600 bit/s 8n1
-Debugging LED: 8-bit GPIO1 LED at location $7000
-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
-Expansion header: 40-pin header

Monitor program was developed using assembly language. Source code was compiled with c32 cross assembler. The source code is available for customizing your own monitor.

The monitor program features:

-Simple hex code entering
-Insert and Delete word
-User registers: R0-R10 Workspace for saving CPU registers after BREAK
-Copy block of memory
-HEX CALculator for relative byte
-Intel HEX file downloading
-Memory dump
-Beep ON/OFF
-TEST 10ms tick interrupt

The monitor program will be updated and available for testing at the download links.

Keyboard layout: Making key layout sticker is simply done by printing the SVG file to sticker paper.
Keyboard layout. 

The memory and I/O devices decoder is made with PLD chip, GAL22V10. The equations were compiled to JEDEC file using WInCupL. The locations of memory and I/O devices are shown in the comment lines.

Name     9995KIT ;
PartNo 22V10 ;
Date 28/4/2021 ;
Revision 01 ;
Designer Engineer ;
Company Fangkhao ;
Assembly None ;
Location ;
Device p22v10;
/* *************** INPUT PINS *********************/
PIN 2 = MRD; 
PIN 3 = MWR; 
PIN 4 = A15; 
PIN 5 = A14; 
PIN 6 = A13; 
PIN 7 = A12; 
PIN 8 = A10; 
PIN 9 = A9; 
PIN 10 = A8;
PIN 11 = A1;
PIN 13 = A0;
FIELD ADDRESS = [A15..A12]; 
/* *************** OUTPUT PINS *********************/
PIN 14 = OPT; 
PIN 15 = UART; 
PIN 16 = PORT2; 
PIN 17 = PORT1; 
PIN 18 = PORT0; 
PIN 19 = LCD_E;
PIN 20 = GPIO1;
PIN 21 = RAM_WR;
PIN 22 = RAM_CE;
PIN 23 = ROM_CE; 
!ROM_CE = !MRD & ADDRESS:[0000..6FFF];
!RAM_WR = !MWR & ADDRESS:[8000..EFFF];
!GPIO1 = A15 # !A14 # !A13 # !A12 # A10 # A9 # A8 # A1 # A0 # MWR; /* 7000H */
PORT0 = A15 # !A14 # !A13 # !A12 # A10 # A9 # !A8 # A1 # A0 # MRD; /* 7100H */
!PORT1 = A15 # !A14 # !A13 # !A12 # A10 # A9 # !A8 # A1 # !A0 # MWR; /* 7101H */
!PORT2 = A15 # !A14 # !A13 # !A12 # A10 # A9 # !A8 # !A1 # A0 # MWR; /* 7102H */
!LCD_E = A15 # !A14 # !A13 # !A12 # A10 # !A9 # A8 # (MWR & MRD); /* 7200H */
UART = A15 # !A14 # !A13 # !A12 # A10 # !A9 # !A8; /* 7300H */

PLD equations 

Example of test code. Running the gpio1 led counting with r0.

Main program starts at location 8000, external RAM. We can enter the code using hex keyboard easily.

The instruction code of movb r0,@gpio1 has two words, D800 and 7000. D800 is instruction move byte of r0 to destination memory. 7000 is location of the gpio1 LED.

Simple delay subroutine is done with r7 counting.

We can change speed from which value?

If we change the value to be added at address 800A from 0100 to 0010, what would be happened? Why?

Jump loop is relative addressing. The offset byte F9 can be computed from
[destination - current program counter]/2

[8000-800E]/2 = FFF9, JMP instruction uses only F9. (internal calculation will be FFF9).

The hex monitor function provides key CAL for finding such offset value.

Can you find the offset value for jne $-2 instruction? Why it is FE?

The 2nd example that uses 10ms tick generator. The interrupt input INT1 will be triggered by 10ms tick pulse. SW1 must select 10ms position.

The program sets interrupt enable bit with 1. And repeat jump at location 8004.

The SW1 when sets to 10ms tick, the 100Hz trigger pulse will feed to INT1 pin.

Refer to the vector in ROM, we can find the vector in RAM then.

We see that, at location 0004 for Level 1 interrupt, the PC will be loaded with E020, and WP will be loaded with E000. Those are in RAM space. Thus in our test code, we can put the branch instruction to the interrupt 1 service easily.

Can you change the speed? from 1 second to 10 second, how?

The 3rd example shows how to use breakpoint with XOP 0 instruction.

This test code will learn the Multiply instruction, MPY reg1,reg2

R0 is loaded with 2 and R1 is loaded with FFFF.

MPY R0,R1 will compute 16-bit x 16-bit multiplication. Result will be 32-bit, R1:R2.

You can compute by hand before test the code. What is the result?

Enter the hex code from location 8000 to 800B. Press PC the GO. Press REG 0, 1 and 2 for the result.

For long program testing, we can use Assembler and produce the hex file. Kit has 9600 UART, we can dump memory contents with key DUMP and download Intel HEX file with key LOAD easily.

Interesting program example, finding the Perfect Number written by Jason M. Zinserling.
source code for c32 assembler

Running with TMS9995 kit takes approx. 16 mins 10 secs to complete. The results are stored from location 8320.

The perfect number found, 6, 1C, 1F0 and 1FC0 or in decimal 6, 28, 496 and 8128.

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. 



U1 27C256, 32kB EPROM (or SST27SF256 Flash EPROM)
U2 HM62256B, 32kB SRAM
U3 AT89C2051, 20-pin microcontroller preprogrammed
U4 22V10, Programmable Logic Device
U5 TMS9995, 16-bit Microprocessor, TMS9900 software compatible
U6 74HC14A, hex inverter
U7 7805, 1.5A +5V Voltage regulator
U9,U8 LTC-4727, high brightness 7-segment LED
U10,U11,U13 74HC573, D-type Latch
U12 74HC541, tristate input buffer
U14 8250, UART
U15 HIN232, rs232 level converter

D1,D6,D7,D8,D9,D10,D11, 3mm dot LED
D2 1N4733A, +5.1V Zener diode, voltage clipper at PLD chip.
D3 NMI LED, 3mm dot LED
D4 POWER, 3mm dot LED
D5 1N4001, rectifying diode
D14 1N5227A, zener diode
Q1 KIA7042, voltage detector RESET
Q2 BC557, PNP small signal transistor

Resistors (all resistors are 1/8W +/-5%)

R4, R1 680
R12, 10k trimmer
R5 10k
R6 1k
R10, R7 10k RESISTOR SIP 9
R8 4.7k
R9 10
R11 5


C1,C4,C5,C15,C18,C19,C20 10uF
C3,C2 22pF
C6 10uF 16V
C7 1000uF 25V
C8,C9,C10,C11,C12,C22 0.1uF
C13,C14 0.1uF
C21,C16 100nF
C17 10uF 10V

Additional parts

J1 DC Input
SW1 ESP switch, 10ms tick switch
TP4 +5V
VB1 SUB-D 9, Male (cross cable)
Y1 8MHz

PCB double side plate through hole
display filter sheet, Amber color
Keyboard sticker printable SVG file

Kit is available on eBay.

Download Schematic, Monitor source code , Assembly Listing , PLD files, AT89C2051 file, Keypad SVG file

Quick start
Programming Book rev1.0
User's Manual rev1.0


1 June, 2021