Ok, wow, do I feel stupid now.
About 10 or so days ago, I posted THIS THREAD because I was beating my head against the wall trying to get an interrupt to work.
Since then, every evening, I have tried something else, and tonight, I finally got it.
All along, I was using PORTB.0 to trigger part of the program - I had PORTB defined as all digital. I had PORTB.0 defined as an input. I turned on PORTB change of state interrupt, I enabled the interrupt on PORTB.0. I turned on the weak pullup for PORTB.0. But in the OPTION register, I specifically was TURNING OFF PORTB PULLUPS!
I didn't look at the datasheet "because I've done this a bunch of times - OPTION.7 = 1 is PORTB pullups on"
:eek: AAGGGHHHH! OPTION.7 = 1 is pullups OFF! No wonder it wasn't working!
So, I guess the moral of the story is, if you're sure it should work, go over those darned special function register settings again, and save yourself a headache
<RANT MODE OFF>
About 10 or so days ago, I posted THIS THREAD because I was beating my head against the wall trying to get an interrupt to work.
Since then, every evening, I have tried something else, and tonight, I finally got it.
All along, I was using PORTB.0 to trigger part of the program - I had PORTB defined as all digital. I had PORTB.0 defined as an input. I turned on PORTB change of state interrupt, I enabled the interrupt on PORTB.0. I turned on the weak pullup for PORTB.0. But in the OPTION register, I specifically was TURNING OFF PORTB PULLUPS!
I didn't look at the datasheet "because I've done this a bunch of times - OPTION.7 = 1 is PORTB pullups on"
:eek: AAGGGHHHH! OPTION.7 = 1 is pullups OFF! No wonder it wasn't working!
So, I guess the moral of the story is, if you're sure it should work, go over those darned special function register settings again, and save yourself a headache
<RANT MODE OFF>