An introduction to timers and counters programming in pic18f microcontrollers using both assembly and c18 language. The objective of this lab includes getting familiar with different timer modes and their applications in microcontrollers, as well as programming counters in assembly and c18 language.
Download Introduction to Timers and Counters Programming in PIC18F Microcontrollers and more Assignments Earth science in PDF only on Docsity!
PIC18F
TIMER,COUNTER
PROGRAMMING
OBJECTIVE:
Introduction to Timers in PIC
Familiarization with programming of Timers in Assembly and C18 language
Understanding different timers Modes and its use in Microcontrollers. • Familiarization with Programming Counters in Assembly and C18 language Lab Task # 1 Code: #include <p18f452.h> void Delay(void); void main(void) { TRISAbits.TRISA4 = 0; TRISCbits.TRISC0 = 1; PORTC = 255; while(1) { if (PORTCbits.RC0 == 1) { PORTAbits.RA4=1; Delay(); PORTAbits.RA4=0;