This preview shows page 1. Sign up to view the full content.
Unformatted text preview: er again from zero. The internal timer TMR0 is constantly incrementing as long as the chip is working. Applications of this internal timer are diverse. it is widely used in digital clocks and electronic meters to measure signal intervals. Besides, it can be used as a random number generator, which is employed in digital dice implementation. 5.
5.1. Experiment Method and Procedures
LED Control Program Exercise 1 (LED Control Program): Using a breadboard, the circuit for the LED control program is configured. The overall circuit diagram is illustrated in Figure 5.1.1. An Assembly code that operates the PIC16F84 to enable or disable the LEDs is programmed on the PC. The code is shown in Table ???. Note that this code is also presented in Preliminary Study 5. LIST ; INDIR TMR0 PC STATUS FSR PORTA PORTB EEDATA EEADR PCLATH INTCON OPTIONR TRISA TRISB EECON1 ; CF DC ZF PD TO RP0 ; ORG BSF MOVLW MOVWF MOVLW MOVWF BCF CLRF LOOP P=16F84 FILE DEFINITION 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 ; PAGE 0 ; PAGE 1 BIT DEFI...
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.
- Spring '10