Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

PIC16F628A Global Variables and Flags. XC8

$
0
0
Hello, still getting the hang of using interrupts properly and I'm having a hard time modifying a global variable in my ISR. It seems like no matter what I do state is never modified. Here are the relevant parts of the code. I know it is a bit much but any help it all is appreciated!

defines and variables
Code (Text):
  1.  
  2. // Defines
  3. #define _XTAL_FREQ 4000000         // running the chip at 4Mhz
  4. #define ID_MAX 63                  // highest ID number possible. 6 bits base^n
  5. #define ID 1...
PIC16F628A Global Variables and Flags. XC8

Viewing all articles
Browse latest Browse all 4923

Trending Articles