After modifying the program code or the circuit

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: k on the circuit presented in Figure. END 4.2.1 as well, in order to learn the way to control power supply for the 7-segment LEDs. Figure 5.2.1: Circuit Diagram for Exercise 2 (Displaying Number) and Exercise 3 (Digital Dice) Push down the switch and verify the expected number is coming up. If it does not work as expected, find out the flaw is in the program or in the circuit. After modifying the program code or the circuit, according to the cause of the flaw, verify again the device’s operation. If it works fine, try to change the number displayed on the LEDs with other numbers and repeat the process. Exercise 3 (Digital Dice): After experiencing how to control the 7-segment LED display with the previous exercise, a digital dice is developed. Same as before, an Assembly code is programmed first. The following table is an incomplete code for digital dice. Using the provided code, complete a program code for the digital dice. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;FILE DEFINITION;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LIST INDIR TMR0 PC STATUS FSR PORTA PORTB EEDATA EEADR PCLATH INTCON OPTIONR TRISA TRISB EECON1 CF DC ZF PD TO RP0 P=16F84 EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU EQU 00H 01H 02H 03H 04H 05H 06H 08H 09H 0AH 0BH 01H 05H 06H 08H .0 .1 .2 .3 .4 .5 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;MAIN ROUTINE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;INIT...
View Full Document

Ask a homework question - tutors are online