Sign In

Customised Function For Interrupt On Change With Shared Variable With Main Code

Wilson Tham sparwn@gmail.com Malaysia

Hardware: Microchip PIC10F320 Software: C Language, XC8 Compiler, MPLAB X IDE With Microchip Code Configurator

Hi,

I am new to using the microchip IDE.
I am trying to develop a circuit where a button would be triggered through Interrupt on change. When the button is pressed, a variable would increase its count by 1. This value should be returned to the main code and it will determine the LED function in the main code to be blinking or always on/off.

I have used the code configurator to setup everything. I have managed to get the Interrupt on change to function but i am not familiar on how to transfer the variable from another source file back to the main file.

Images

Post a reply to Wilson Tham

Think you can help Wilson Tham ? Then post your thoughts that might help Wilson Tham. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.