Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 232 → Rev 233

/PIC Stuff/PICX_16F1825_Controller/main.c
25,8 → 25,6
#include "base_INTERRUPTS.h"
#include "base_I2C.h"
 
__persistent int temp;
 
void Pins_Init(void) {
// Set all pins to digital I/O
ANSELA = 0x0;
37,28 → 35,28
 
// Set buttons as inputs and enable weak pull-ups
BTN_L_N_TRIS = 1;
BTN_L_N_WPU = 1;
BTN_L_N_WPU = 1;
BTN_L_S_TRIS = 1;
BTN_L_S_WPU = 1;
BTN_L_S_WPU = 1;
 
BTN_R_N_TRIS = 1;
BTN_R_N_WPU = 1;
BTN_R_N_WPU = 1;
BTN_R_E_TRIS = 1;
BTN_R_E_WPU = 1;
BTN_R_E_WPU = 1;
BTN_R_S_TRIS = 1;
BTN_R_S_WPU = 1;
BTN_R_S_WPU = 1;
BTN_R_W_TRIS = 1;
BTN_R_W_WPU = 1;
BTN_R_W_WPU = 1;
 
// Set leds as outputs and initialize to off
LED_1_TRIS = 0;
LED_1_LAT = 0;
LED_1_LAT = 0;
LED_2_TRIS = 0;
LED_2_LAT = 0;
LED_2_LAT = 0;
LED_3_TRIS = 0;
LED_3_LAT = 0;
LED_3_LAT = 0;
LED_4_TRIS = 0;
LED_4_LAT = 0;
LED_4_LAT = 0;
}
 
// Function to read button status into a data structure
81,8 → 79,8
}
 
int main(void) {
char buffer[32];
char result, length;
uint8_t buffer[32];
uint8_t result, length;
 
// Set internal oscillator speed to 32MHz
OSCCONbits.SPLLEN = 1; // 4x PLL enable (overwritten by config bits)
101,6 → 99,7
Interrupt_Init();
Interrupt_Enable();
 
// Check for received data over I2C
while (1) {
do {
result = I2C_Get_Status();
/PIC Stuff/PICX_16F1825_Controller/nbproject/Makefile-genesis.properties
1,5 → 1,5
#
#Tue Dec 10 11:33:30 EST 2013
#Tue Dec 10 11:43:51 EST 2013
default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v1.20\\bin
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=0d2b1469ad71adb787c711a416386331
default.languagetoolchain.version=1.20
/PIC Stuff/PICX_16F1825_Controller/nbproject/private/private.xml
1,11 → 1,3
<?xml version="1.0" encoding="UTF-8"?><project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/1">
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/main.c</file>
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/base_I2C.c</file>
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/base_INTERRUPTS.c</file>
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/defines.h</file>
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/base_I2C.h</file>
<file>file:/C:/Users/Kevin/Documents/Code/PICX_16F1825_Controller/base_INTERRUPTS.h</file>
</open-files>
</project-private>