Simulator Seven Segment DisplayOpen a browser window or tab containing the microcontroller simulator.

Copy and paste this program into the code editing area. Press F8 to assemble the code.

Click on SEV-SEG and connect to PORTC.

Step the program and watch the seven segment displays. Answer the reviseOmatic questions on this task.


TASK - Easy: Make one of the digits count from 0 to 9.

TASK - Very Hard: Make both the digits count from 00 to 59 like the seconds and minutes on a clock.

; ===== CONNECT THE DISPLAYS TO PORTC =====
        MOVW    0X00   ; SET 8 PORTC OUTPUTS
        MOVWR   TRISC  ; SET 8 PORTC OUTPUTS
        MOVWR   PORTC  ; CLEAR RIGHT SEGMENTS
        MOVW    0X80   ; CLEAR LEFT SEGMENTS
        MOVWR   PORTC  ; CLEAR LEFT SEGMENTS
START:
        MOVW    0X05
        MOVWR   PORTC
        MOVW    0X85
        MOVWR   PORTC

        MOVW    0X0
        MOVWR   PORTC
        MOVW    0X80
        MOVWR   PORTC
        
        JMP     START

Use this grid to help you work out which hexadecimal numbers to use.

Design Grid