Skip to main content

Posts

Showing posts with the label Interrupt

External Interrupt Demonstration with PIC12F683

PIC12F683 has got one external interrupt input which is edge triggered. If you want to learn how to write an Interrupt Service  Routine (ISR) using mikroC compiler, check this out. When an interrpt arrives, the PIC12F683 displays the interrupt arrival information as a part of ISR on a windows PC hyper-terminal through software UART.

Experiment No. 7: Timers and Interrupts

Background Many microcontroller applications like generating periodic signals, measuring time interval, keeping date and time, use time as their variable. Therefore, microcontrollers need to have some internal resources to accurately measure time. The PIC16F628A has 3 timer modules which are known as Timer0 , Timer1 , and Timer2 . The basic unit of a timer is a free-run 8-bit or 16-bit incrementing synchronous counter which can be programmed to count internal or external pulses. The count number stored by each counter can be read or modified by accessing the special function register associated with that timer. Some of the bits in these registers are also the indicators of timer overflow, which, therefore, can generate interrupt request to the microcontroller. The use of timer modules to keep record of time elapsed allows the microcontroller to carry on with its other operations like controlling outputs, reading inputs, etc. Timers can also have another asynchronour counter, known...