|TAMS / Java / Hades / applets: contents | previous | next|
adders and arithm...
LFSR and selftest
I/O and displays
CMOS circuits (sw...
Mips R3000 cosimu...
Mips fast Sieve
Mips - game ...
Mips prime n...
Intel MCS4 (i4004)
image processing ...
[Sch04] RALU, Min...
|TinyMips with KS0108 graphics display
This applet demonstrates how to control a
graphics liquid-crystal display
(based on the KS0108 controller chip) from the TinyMips microprocessor.
Please check the introductory applet for the introduction and description of the TinyMips processor. The hardware structure used for this applet consists of the processor, some glue logic, the liquid-crystal display component, and a single RAM component that stores both the program and the output data.
The LCD demoSorry, text not ready yet.
_start: lui $sp, 0x0000 addiu $sp, $sp, 0x1800 lui $gp, 0x0000 ori $gp, $gp, 0xb000 jal mainThis puts the stack base at byte-address 0000.1800, shown as word-address 0000.0600 in the MipsRAM editor. The global-pointer register is initialized to a value of 0000.b000. Program code generated by gcc accesses global (static) data via a signed 16-bit16-bit offset from the global pointer. Therefore, the first global data is at -32768+gp or gp-0x8000, which in our case maps to byte address 0000.3000, shown as word-address 0000.0c00 in the MipsRAM editor. The static internal variables used by the ks0108.c display driver routines are therefore mapped at (near) word-address 0000.0c00 in the RAM.
KS0108 display controller
00 0011 111E E=0: display off E=1: display on 00 11SS SSSS set start address 0..63 00 01AA AAAA set byte address 0..63 00 1011 1PPP set page address 0..7 01 0000 0000 read busy flag (not implemented!) 10 DDDD DDDD write 8-bit data to selected address 11 DDDD DDDD read 8-bit data at selected address 1xx xxxx xxxx reset controller
Wait until the applet is loaded. Click on the LC-display component or use the popup-menu on the LCD (popup > edit) to open the actual liquid-crystal display user-interface. Watch the program while it writes data to the display.
You might also want to open the memory-editor (via popup > edit) The memory editor highlights the last read operation in green color, and the last write operation in cyan color, which allows you to easily watch the program execution.
If you want to change the simulation speed, just select 'edit' on the clock-generator component, then edit the value of the clock-generator 'period' property, and select 'apply' (and 'ok' to close the clock-generator config dialog).
Similarly, open the TinyMips user-interface window (via popup > edit) to watch the current register values.
The binary program running on the processor was compiled and linked with the GNU gcc (18.104.22.168) and binutils cross-compiler toolchain on a Linux x86 host, with the final ELF loading and relocation done via the Hades Elf2rom tool. For details, see:
|Print version | Run this demo in the Hades editor (via Java WebStart)|
|Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German)|