I/O Map of MTK-85 Microprocessor Training Kit

The location of the onboard I/O is from address 00H to 5FH. The MTK-85 has 6 input/output devices.

1. General Purpose Input Output port, GPIO is 8-bit port: 4-bit input and 4-bit output.
2. System Programmable Peripheral Port 8255.
3. Programmable Counter/Timer 8254.
4. User Programmable Peripheral Port 8255.
5. UART 16C550.
6. Text LCD.

The address from 60H to FFH is expansion I/O ports. User may build more ports through JP1, CPU bus signal connector.

The 4-bit output port of GPIO has four LED onboard. We can experiment with output instruction easily.

Let's study the simple program writing the content of the accumulator to GPIO. We can see the content of accumulator at the onboard LED!


    0000 = gpio equ 0



   8100                  org 8100h


   8100 3E00             mvi a,0 ; load accumulator with 0

   8102 D300      loop:  out gpio ; write accumulator to gpio

   8104 3C               inr a ; increment accumulator

   8105 C30281           jmp loop ; jump back to loop



 You can enter the machine code (bold letters) into memory with HEX key from address 8100 to 8107 byte by byte. Press key HOME to set current address to 8100.

 Then press key STEP to execute one by one instruction. Can you see the binary data incrementing by +1? 

Written by Wichit Sirichote, kswichit@kmitl.ac.th
Last updated: April 23, 2007.