TAMS / Java / Hades / applets: contents | previous | next | ||||
Hades Applets contents visual index introduction std_logic_1164 gatelevel circuits delay models flipflops adders and arithm... counters LFSR and selftest memories programmable logic state-machine editor misc. demos I/O and displays DCF-77 clock relays (switch-le... CMOS circuits (sw... RTLIB logic RTLIB registers Prima processor D*CORE MicroJava Pic16 cosimulation Mips R3000 cosimu... Intel MCS4 (i4004) MCS4 Overview MCS4 binary ... MCS4 BCD add... MCS4 binary ... MCS4 BCD sub... MCS4 RAM add... MCS4 RAM sub... MCS4 increment MCS4 increme... MCS4 calculator i4003 shift-... MCS4 I/O ports MCS4 Counter image processing ... [Sch04] Codeumsetzer [Sch04] Addierer [Sch04] Flipflops [Sch04] Schaltwerke [Sch04] RALU, Min... [Fer05] State-Mac... [Fer05] PIC16F84/... [Fer05] Miscellan... [Fer05] Femtojava FreeTTS | Intel MCS4 (i4004) increment on TEST-signal
Circuit Description
This circuit demonstrates the test-input of the i4004
microprocessor.
While the i4004 had no support for interrupts,
an extra input pin called test
and a corresponding jump-instruction were provided by the processor.
The circuit shown here consists of the i4004 microprocessor, one i4001 ROM chip with its I/O ports configured as output ports and connected to a hex-display, and a single input switch conntected to the processor's text input. Wait until the simulation has started, then start clicking the input switch. The software running on the processor will count your clicks and display the current counter-value (4-bit) on the hex-display. If necessary, switch glow-mode off to reduce the number of repaints to speed up the simulation. The program used in this applet basically consists of a single endless loop: jmp_test.asm. At the beginning of each loop iteration, the current value from register R0 is transfered to the I/O-ports of the ROM-chip, (and displayed by the hex-display). Next the program calls the subroutine checkTest. If the subroutine returns the value 1, the counter variable R0 is incremented, otherwise the next loop iteration is started right away. The remaining logic in subroutine checkTest and newTest ensures that the test-switch is released before the counter variable is next incremented (input switch debouncing).
; jmp_test.asm ; increase on test FIM R0R1, 0 ; initialize: R0=0, R1=0 begin: JMS display ; display current value of R0 on ROM I/O pins JMS checkTest ; check test-signal JCN Z, begin ; no test, next iteration INC R0 ; increase Register 0 LDM 1 ; 1 into accumulator XCH R1 ; store 1 in Register 1 JUN begin ; next iteration ; subroutine to check the test input ; checkTest: JCN T, test ; conditional jump if test LDM 0 ; 0 into accumulator XCH R1 ; store 0 in Register 1 BBL 0 ; return zero: no inc test: LD R1 ; load Register 1 JCN Z, newTest ; signal is new BBL 0 ; inc newTest: BBL 1 ; no inc ; copy contents of R1 onto ROM output port pins ; display: FIM R2R3, 0 SRC R2R3 LD R0 WRR ; write to ROM output pins BBL 0 See also:
| |||
Print version | Run this demo in the Hades editor (via Java WebStart) | ||||
Usage | FAQ | About | License | Feedback | Tutorial (PDF) | Referenzkarte (PDF, in German) | ||||
Impressum | http://tams.informatik.uni-hamburg.de/applets/hades/webdemos/80-mcs4/jmp/jmp_test.html |