Assembly code for displaying given number using the

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: 00000110’ ;Setting displayed number to ‘1’ MOVWF PORTB ; Displayed number CALL DELAY BTFSS PORTA,2 ;Check the switch if it is still pushed GOTO SHOWTME ;Pushed‘0’, then stay SHOWTIME! GOTO MAIN ;Not pushed ‘1’ DELAY MOVLW MOVWF DELAY_1 DELAY_2 .250 DELAY_COUNT1 CLRF DELAY_COUNT2 DECFSZ DELAY_COUNT2 GOTO DELAY_2 DECFSZ DELAY_COUNT1 GOTO DELAY_1 RETURN Table2. Assembly Code for Displaying Given Number Using the development tool MRPIC-IDE and the ROM writer, compile the programmed code and write it to the PIC16F84. The circuit should be constructed as presented in Figure 5.2.1. Caution: Remember to connect the LED the correct way round and never connect the LED directly to a battery or power supply. Otherwise, the chip can be burnt out. Additional Information: In the circuit depicted in Figure 5.2.1, the common cathode 7-segment LED array is employed. That is, the common pin is connected to ground. The ‘power control input’ described in Figure 4.2.1 is not used here. Those who are interested try to wor...
View Full Document

This note was uploaded on 11/21/2010 for the course MECHANICAL mae302 taught by Professor Jang during the Spring '10 term at Seoul National.

Ask a homework question - tutors are online