Have a look at the example provided in the manual, even if they don't use the same interrupt source, this should give you some tips.
You could still do a search with ON INTERRUPT within this forum.
Have a look at the example provided in the manual, even if they don't use the same interrupt source, this should give you some tips.
You could still do a search with ON INTERRUPT within this forum.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I have searched around some and found some good tips, but have not been able to find the exact interupt I am wanting to do. I have changed the interupt code based on the examples, but I am still not getting the interupt to trigger off the I2C interupt. Thanks, cp
on Interrupt goto myint
INTCON.6 = 1 ' PEIE = Peripheral Interrupt Enable bit
PIR1.3 = 1 ' I2C interrupt enable
enable
Check once again all peripheral register and also the MSSP section of your datasheet, maybe you have to select a specific mode in X register(s)... 7 bits+start/stop int or something like that.
More tha often the datasheet will give you some tips how to set/use int flags.
I never dared to open your datasheet to check it![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
I have read the data sheet and can't seem to find anything. I noticed some other chips have a SSPCON2 register, bit 7 looks like what I need.
GCEN: General Call Enable bit (In I2C Slave mode only)
1 = Enable interrupt when a general call address (0000h) is received in the SSPSR
0 = General call address disabled
The 16F819 does not have this register. I am stuck with the 18 pin interal osc with some analogs and I2C form, but I would really prefer getting the 16F819 working with an interupt. I have an 16F88, but that also does not have the SSPCON2 register either...
Bookmarks