high_ISR

=function_name= Owner: You

Purpose and Documentation
What is the purpose of this function? Explain what it does, and justify it's place in the program. This section will appear in the Technical Documentation, so try to be complete.

Syntax
type function_name(args)

Usage
When and how should this function be called? Use examples where necessary.

Input Arguments

 * void. This function takes no arguments.
 * int example. A value that is used by the function.
 * char* string. A string that will be transmitted to the serial transmit.

Output Arguments

 * None. This function does not make changes to any existing values.
 * int* status. The program will modify the non-local value status if it has an error.

Return Value

 * int. When the operation successfully, a 1 is returned. Otherwise, a 0 is returned.

Read

 * int Settings.speech_mute. Needed to see if the string should be spoken.
 * PORTA <0-4>: Please add the names of the registers you use to the "tags" of this page for indexing purposes.
 * PIE1<3>

Write

 * int Settings.current_state. The program will change the operating state of the program.
 * INTCON1

Operation
Describe in very general terms how the function fulfills it's purpose. This should be reflected in the code.

Code
code format="c" void high_ISR(void) {   /*All interrupts will check the mask (PIE) before checking the request (PIR)*/ //Disable ALL interrupts INTCONbits.GIEH = 0;

//Check for recieve int if(PIE1bits.RCIE == 1 && PIR1bits.RCIF == 1) {       serial_receive; }

//Check for external keypress if(INTCONbits.RBIE == 1 && INTCONbits.RBIF == 1) {       //KEYPRESS ROUTINE }

INTCONbits.GIEH = 1; //   _asm retfie _endasm } code