Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
Thread Tools Display Modes
Old 10th February 2007, 06:50 PM   (permalink)
Default Question about Interrupt

what is interrupt for pic18f452? and when do we need to use interrupt ? I read the datasheet of pic18f452 about interrupt:
Quote:
The PIC18FXX2 devices have multiple interrupt
sources and an interrupt priority feature that allows
each interrupt source to be assigned a high priority
level or a low priority level. The high priority interrupt
vector is at 000008h and the low priority interrupt vector
is at 000018h. High priority interrupt events will override
any low priority interrupts that may be in progress.
There are ten registers which are used to control
interrupt operation. These registers are:
• RCON
• INTCON
• INTCON2
• INTCON3
• PIR1, PIR2
• PIE1, PIE2
• IPR1, IPR2
.........
But don't know what are those registers above for. I was searching around for some example for interrupt in C language but barely to see. If anyone has studies or know this pic please help me. Sorry if my words may sound stupid and newbie.
tinhnho is offline   Reply With Quote
Old 10th February 2007, 09:50 PM   (permalink)
3v0
Default

Quote:
Originally Posted by tinhnho
what is interrupt for pic18f452? and when do we need to use interrupt ? I read the datasheet of pic18f452 about interrupt:

But don't know what are those registers above for. I was searching around for some example for interrupt in C language but barely to see. If anyone has studies or know this pic please help me. Sorry if my words may sound stupid and newbie.
This is a hardware interrupt, read the following esp the overview:

http://en.wikipedia.org/wiki/Interrupt
3v0 is offline   Reply With Quote
Old 11th February 2007, 08:51 AM   (permalink)
Default

The PICmicro® 18C MCU Family Reference Manual covers interrupts in much more detail than individual device data sheets:
http://ww1.microchip.com/downloads/e...Doc/39500a.pdf

If you find it too complex, then try starting with a PIC16F range chip, they are much simpler to configure for interrupts, - you could then migrate up to the 18F range once you have a better understanding.

There are some interrupt code examples (asm) at:
http://www.piclist.com/techref/microchip/ints.htm

Some application examples in C can be found in the "Microchip Application Maestro" software:
http://www.microchip.com/stellent/id...GE&nodeId=1411
picasm is offline   Reply With Quote
Old 11th February 2007, 07:07 PM   (permalink)
Default

thanks to 3V0 and picasm.
tinhnho is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Latest
Question On Setting Timer Interrupt taengi Micro Controllers 0 19th April 2006 01:21 AM
how to give 120degree phase shift i've written a code esconele Micro Controllers 18 16th February 2006 12:49 PM
question on using tmr2 to generate interrupt every 5ms ryan_ryan Micro Controllers 2 7th February 2005 12:47 PM
Interrupt routine question - PIC16F877 Neil1000 Micro Controllers 3 14th December 2004 05:45 PM
quick interrupt question evandude Micro Controllers 2 11th August 2004 08:59 PM



All times are GMT. The time now is 08:29 AM.


Electronic Circuits  |  Electronics Wiki
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.