|
|
View previous topic :: View next topic |
Author |
Message |
young
Joined: 24 Jun 2004 Posts: 285
|
what does int_rb0 ---int_rb5 means for 12f675 |
Posted: Thu Jan 06, 2005 5:21 pm |
|
|
in 12f675.h there is some interrupt definition, except the int_ext, there are
Quote: |
#define INT_RA 0x0B08
#define INT_RA0 0x010B08
#define INT_RA1 0x020B08
#define INT_RA2 0x040B08
#define INT_RA3 0x080B08
#define INT_RA4 0x100B08
#define INT_RA5 0x200B08 |
what do these mean? how I can use them? |
|
|
Ttelmah Guest
|
|
Posted: Fri Jan 07, 2005 3:17 am |
|
|
Look at the interrupt defintions in the processor data sheet. The 675, supports 'interrupt on change', on each pin of the GPIO port, with the pins being selected by the IOCB register (this is unusual, normally there is just a generic select for al the high bits of portB). Each of these definitions, enable this interrupt for a single pin. The top bytes, are the 'mask' to select which pin will interrupt. You can 'or' these together, to give more than one pin enabled at a time. Remember that as with all 'interrupt on change' inputs, your handler must read the port, and if using more than one, you will need to determine which pin was involved.
Best Wishes |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|