Skip to content

Instantly share code, notes, and snippets.

@jakabo27
Last active October 2, 2019 17:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakabo27/69b3694e093f4e8dfdacffcfdade3c76 to your computer and use it in GitHub Desktop.
Save jakabo27/69b3694e093f4e8dfdacffcfdade3c76 to your computer and use it in GitHub Desktop.
#include<plib.h>
//Interrupt Function
{
//Send Data to LEDs uses 4 buffers to make it more exact
//shifts bits to only get upper bits
//Reset flag for interrupt
}
main(){
//initialize registers
//Interrupt setup
//Set up input
//all information comes from the steps as well as the ADXCON sheet
//Configure ADC multiplexer used 4 for 4 buffers
//Set form to 16 bit integer output
//Select sample clock auto convert
//Set internal voltage reference source
//Select the scan mode
//Sample 4 channels then interrupt
//Set buffering mode
//Always use CH0NA, don't alternate to B
//Select MUX to ADC
//Select ADC clock source
//Set Sample Time
//Select clock prescaler
//Start auto-sample mode
//Turn on adxcon
//Configure ADC interrupts
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment