Professional Documents
Culture Documents
Interrupts
Checklist
The following tools will be used in this lesson:
The PIC24 GA010 family allows for the following list of interrupt
sources:
NOTE: The PIC24F GA1, GB1, DA2 and GB2 families add several more
peripherals sources each capable of generating additional interrupt events,
including: several additional Timers, a USB interface (GBx), and a CTMU or
touch sensing interface.
Interrupt Control
Interrupt Nesting
Traps
// 5. main loop
while( 1)
{
// your main code here
} // main loop
} // main
main()
{
// 2. initializations
_T1IP = 4;
// this is the default value anyway
TMR1 = 0;
// clear the timer
PR1 = 25000-1; // set the period register
TRISA = 0xff00; // set PORTA LSB as output
// 3. configure Timer1 module
T1CON = 0x8020; // enabled, prescaler 1:64, internal
clock
// 4. init the Timer 1 Interrupt control bits
_T1IF = 0;
// clear the interrupt flag, before
_T1IE = 1;
// enable the T1 interrupt source
// 5. main loop
while( 1)
{
// your main code here
PORTA = Sec;
} // main loop
} // main
After this step, initializing the RTCC, set the date and time as follows:
_RTCEN = 0;
// optional calibration
//_CAL = 0x00;
Practical Rules
1.
2.
3.
4.
Suggested Excercises
1.
2.
Recommended Readings
Online Resources
http://www.niell.org/nixie_clock/Nixieclock.html
A PIC based clock with a retro style, using glowing
Nixie tubes
http://www.aopa.org
This is the web site of the Aircraft Owners and Pilot
Association. Feel free to browse through the web
site and access the many magazines and free
services offered by the association. You will find a lot
of useful and interesting information in here.