![]() |
Bad Interupt Code
When I compile my interupt code with the 2007 library It gives me this error:
Code:
H:\Code\Code\user_routines.c:173:Error [1205] unknown member 'INT3IP' in '__tag_223'Code:
user_routines.c 173: rc_dig_int02_ip = LOW_PRIORITY;rc_dig_int02_ip is defined as INTCON2bits.INT3IP based on Daniel Katanski's paper "Interrupts for Dummies" (http://www.chiefdelphi.com/media/papers/1483). Everything works with the interrupt on the first port, and everything everything but setting the proirity works with the second port interrupt. All of the interrupt code worked with the 2005 library. I am using MPLAB IDE v7.50 |
Re: Bad Interupt Code
From p18f8722.h.....
Code:
extern volatile near union { |
Re: Bad Interupt Code
I've never used that pin definition for overflow... did you try just looking up the register in the part schematic?
If you use this reference for where pins are on the part as compared to the pinout of the control board you can find that the second digital i/o pin is routed to RB3 on the microchip.... then if you look at the processor manual... that pin has a unique interrupt on it (unlike the second half of port b's external interrupts)... and its priority register byte is in INTCON2, so the bit to set the pirority is "INTCON2bits.INT3IP" here's the line of code i suggest switching out for the one you had: Code:
INTCON2bits.INT3IP = 0; //sets RB3's interrupt to be low priority-q |
Re: Bad Interupt Code
Thank You, it was a typo. But the weird thing is that it worked with the 2005 library.
|
Re: Bad Interupt Code
From Kevin's encoder_readme.txt, located inside frc_encoder.zip:
Quote:
|
Re: Bad Interupt Code
Maybe a different definitions file? hmm. interesting.
Well... thats why I always stay with the microchip standard names for interrupts and live by the book. -q |
Re: Bad Interupt Code
That was my first thought, that the p18f8722.h version was wrong. Either that or they changed the name of that register since 2005, which any good programmer tends not to do. That is an interesting point though. A lot of programmers would spend days of agony trying to fix it before they realized it was not their error. And here I thought professional programmers were perfect.
|
Re: Bad Interupt Code
Quote:
|
| All times are GMT -5. The time now is 00:14. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi