Lab #11 (04/18/02)
Programming the Kit Display
© D. Thiébaut
CSC270
Lab #11

As we saw in class, the circuits that drive the 7-segment displays are 74LS259 circuits, and contain 8 D-flipflops. Each one has an address associated with it:
Leftmost display digit: 0C16Fh
second digit: 0C15Fh
third digit: 0C14Fh
fourth digit: 0C13Fh
fifth digit: 0C12Fh
rightmost display digit: 0C11Fh
Note that we do not know for sure which LED these addresses correspond
to, yet...
Look for two posts labeled ST1 and ST2 on the board, and connect them temporarily with a wire. Do you observe all the segments turning on?
The idea is to store a 1 (01h) at that address, wait about 1/10th of a second, then store 0 (00h), wait 1/10th of a second and repeat. The result is an LED blinking at a rate of 1/0.1s = 10 Hz.
Which LED responds to Address 0C16Fh? _______________
Modify your program and use Address 0C16Eh instead of 0C16Fh. Do not modify anything else. What LED does the program activate now?
Continue on decrementing the addresses and figure out the assignment of addresses to LEDs:
Address of LED a: ___________
Address of LED b: ___________
Address of LED c: ___________
Address of LED d: ___________
Address of LED e: ___________
Address of LED f: ___________
Address of LED g: ___________
Address of LED DP: ___________
Be efficient and use the Index register to hold the address of the LEDs!
Also, use a procedure to display the contents of Acca on a 7-segment digit. Here is the skeleton and specification of such procedure:
;------------------------------------------
;OUTPUT: takes the pattern stored in Acca
; and stores in on the 7 segment
; display whose address is passed in
; the X register.
;------------------------------------------
Output: ...
...
...
RTS
With this procedure, displaying a character should be a fairly
simple task. Look at the following example (which might or might
not work with your procedure, depending on how you coded it):
LDAA # 5Bh ;pattern for digit '5'
LDX # 0C158h ;address of second digit
JSR Output ;output pattern on digit