Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 216 → Rev 222

/PIC Stuff/PICX_16F1829_BLE_IMU/I2C.c
188,7 → 188,9
case I2C_SEND_ADDR:
// Send address with write bit set
data_ptr->operating_state = I2C_CHECK_ACK_RECV;
SSP1BUF = (data_ptr->master_dest_addr << 1) | 0x1;
char tmp = (data_ptr->master_dest_addr << 1);
tmp |= 0x1;
SSP1BUF = tmp;
break;
case I2C_CHECK_ACK_RECV:
// Check if ACK is received
239,7 → 241,7
case I2C_IDLE:
break;
case I2C_SEND_ADDR:
// Send the address with read bit set
// Send the address with write bit set
data_ptr->operating_state = I2C_CHECK_ACK_SEND;
SSP1BUF = (data_ptr->master_dest_addr << 1) | 0x0;
break;
272,7 → 274,9
case I2C_SEND_ADDR_2:
// Send the address with read bit set
data_ptr->operating_state = I2C_CHECK_ACK_RECV;
SSP1BUF = (data_ptr->master_dest_addr << 1) | 0x1;
char tmp = (data_ptr->master_dest_addr << 1);
tmp |= 0x1;
SSP1BUF = tmp;
break;
case I2C_CHECK_ACK_RECV:
// Check if ACK is received
/PIC Stuff/PICX_16F1829_BLE_IMU/INTERRUPT.c
25,6 → 25,12
PIR1bits.TMR1IF = 0;
}
 
// Check Timer 2 interrupt flag
if (PIR1bits.TMR2IF) {
TIMER_2_Interrupt_Handler();
PIR1bits.TMR2IF = 0;
}
 
// Check UART RX interrupt flag
if (PIE1bits.RCIE) {
if (PIR1bits.RCIF) {
/PIC Stuff/PICX_16F1829_BLE_IMU/TIMER.c
2,6 → 2,11
#include "main.h"
#include "TIMER.h"
 
char timer_2_pwm = 0;
extern char LED_R_ON;
extern char LED_G_ON;
extern char LED_B_ON;
 
void TIMER_1_Init(void) {
T1CONbits.TMR1CS = 2; // Clock source is ext oscillator
T1CONbits.T1CKPS = 0; // Prescale of 1:1
23,6 → 28,42
}
 
void TIMER_1_Interrupt_Handler(void) {
LED_LAT = ~LED_LAT;
TMR1 = 0x8000;
}
 
void TIMER_2_Init(void) {
T2CONbits.T2OUTPS = 0; // 1:1 Postscaler
T2CONbits.TMR2ON = 0; // Timer stopped
T2CONbits.T2CKPS = 0; // 1:1 Perscaler
 
PIE1bits.TMR2IE = 1; // Timer 2 overflow interrupt
}
 
void TIMER_2_Start(void) {
T2CONbits.TMR2ON = 1; // Start timer
}
 
void TIMER_2_Stop(void) {
T2CONbits.TMR2ON = 0; // Stop timer
}
 
void TIMER_2_Interrupt_Handler(void) {
// Here we manually 'PWM' the LEDs
// Note: this is terribly inefficient but we need to do this
// otherwise we will blow out the blue LED (max 10mA)
if (timer_2_pwm == 0) {
LED_R_LAT = (LED_R_ON) ? 0 : 1;
LED_G_LAT = (LED_G_ON) ? 0 : 1;
LED_B_LAT = (LED_B_ON) ? 0 : 1;
}
if (timer_2_pwm == LED_R_MAX_BRIGHTNESS) {
LED_R_LAT = 1;
}
if (timer_2_pwm == LED_G_MAX_BRIGHTNESS) {
LED_G_LAT = 1;
}
if (timer_2_pwm == LED_B_MAX_BRIGHTNESS) {
LED_B_LAT = 1;
}
timer_2_pwm++;
}
/PIC Stuff/PICX_16F1829_BLE_IMU/TIMER.h
6,4 → 6,9
void TIMER_1_Stop(void);
void TIMER_1_Interrupt_Handler(void);
 
void TIMER_2_Init(void);
void TIMER_2_Start(void);
void TIMER_2_Stop(void);
void TIMER_2_Interrupt_Handler(void);
 
#endif /* TIMER_H */
/PIC Stuff/PICX_16F1829_BLE_IMU/funclist
1,29 → 1,28
_I2C_Get_Status: CODE, 3846 0 83
_I2C_Interrupt_Master: CODE, 64 0 741
_TIMER_2_Init: CODE, 2037 0 9
_I2C_Get_Status: CODE, 4034 0 62
_I2C_Interrupt_Master: CODE, 52 0 706
_TIMER_2_Start: CODE, 3708 0 3
__stringtab: STRING, 2048 0 1
_I2C_Read_Buffer: CODE, 3768 0 78
__stringdata: STRING, 2049 0 27
_INTERRUPT_Init: CODE, 3218 0 3
_UART_Read: CODE, 4012 0 84
_I2C_Interrupt_Slave: CODE, 805 0 571
_INTERRUPT_Handler: CODE, 4 0 58
_I2C_Configure_Master: CODE, 3316 0 38
_I2C_Master_Send: CODE, 1957 0 91
_UART_Init: CODE, 3354 0 52
_main: CODE, 3406 0 53
_Error: CODE, 3570 0 64
_TIMER_1_Init: CODE, 3245 0 18
_I2C_Process_Send: CODE, 3634 0 66
_TIMER_1_Start: CODE, 3215 0 3
_I2C_Interrupt_Handler: CODE, 3282 0 34
_UART_TX_Interrupt_Handler: CODE, 3513 0 57
__initialization: CODE, 3263 0 16
_I2C_Master_Restart: CODE, 3929 0 83
_I2C_Init: CODE, 1862 0 95
_UART_RX_Interrupt_Handler: CODE, 1765 0 97
_Startup_Check: CODE, 1376 0 389
_UART_Write: CODE, 3459 0 54
_TIMER_1_Interrupt_Handler: CODE, 3227 0 18
_memcmp: CODE, 3700 0 68
_INTERRUPT_Enable: CODE, 2 0 2
Total: 2944
_I2C_Read_Buffer: CODE, 1863 0 72
__stringdata: STRING, 2049 0 15
_INTERRUPT_Init: CODE, 3705 0 3
_I2C_Interrupt_Slave: CODE, 758 0 424
_INTERRUPT_Handler: CODE, 4 0 46
_I2C_Configure_Master: CODE, 2003 0 34
_I2C_Master_Send: CODE, 1620 0 83
_UART_Init: CODE, 3863 0 52
_main: CODE, 1399 0 126
_Error: CODE, 3915 0 57
_I2C_Process_Send: CODE, 3972 0 62
_I2C_Interrupt_Handler: CODE, 3739 0 26
_UART_TX_Interrupt_Handler: CODE, 3812 0 51
__initialization: CODE, 3717 0 19
_TIMER_2_Interrupt_Handler: CODE, 1935 0 68
_I2C_Master_Restart: CODE, 1784 0 79
_I2C_Init: CODE, 1525 0 95
_UART_RX_Interrupt_Handler: CODE, 1703 0 81
_Startup_Check: CODE, 1182 0 217
_UART_Write: CODE, 3765 0 47
_TIMER_1_Interrupt_Handler: CODE, 3 0 1
_INTERRUPT_Enable: CODE, 2046 0 2
Total: 2441
/PIC Stuff/PICX_16F1829_BLE_IMU/main.c
30,12 → 30,16
UART_DATA uart_data;
I2C_DATA i2c_data;
 
char LED_R_ON = 0;
char LED_G_ON = 0;
char LED_B_ON = 0;
 
void Error(char ID) {
while(1) {
for (char i = 0; i < ID; i++) {
LED_LAT = 1;
LED_R_ON = 1;
__delay_ms(120);
LED_LAT = 0;
LED_R_ON = 0;
__delay_ms(150);
}
__delay_ms(1000);
46,22 → 50,22
char buffer[20];
char result, length;
 
BLE_RESET_LAT = 0;
__delay_ms(3000);
BLE_RESET_LAT = 1;
__delay_ms(200);
// BLE_RESET_LAT = 0;
// __delay_ms(3000);
// BLE_RESET_LAT = 1;
// __delay_ms(200);
 
// Check BLE Module
length = UART_Read(buffer);
if (memcmp(buffer, "\r\nBR-LE4.0-S2\r\n", 15)) {
Error(1);
}
UART_Write("AT\r", 3);
__delay_ms(10);
length = UART_Read(buffer);
if (memcmp(buffer, "\r\nOK\r\n", 6)) {
Error(1);
}
// // Check BLE Module
// length = UART_Read(buffer);
// if (memcmp(buffer, "\r\nBR-LE4.0-S2\r\n", 15)) {
// Error(1);
// }
// UART_Write("AT\r", 3);
// __delay_ms(10);
// length = UART_Read(buffer);
// if (memcmp(buffer, "\r\nOK\r\n", 6)) {
// Error(1);
// }
 
// Check Battery Gauge
I2C_Master_Restart(ADDRESS_LIPO, 0x0C, 2);
75,7 → 79,7
if ((buffer[0] != 0x97) || (buffer[1] != 0x00) || (length != 2)) {
Error(2);
}
 
// Check Gyroscope
I2C_Master_Restart(ADDRESS_GYRO, 0x0F, 1);
do {
118,24 → 122,28
 
int main() {
 
OSCCON = 0x70; // PLL disabled, 8MHz
OSCCON = 0xF0; // Software PLL enabled, 32MHz
ANSELA = 0;
ANSELB = 0;
ANSELC = 0;
 
LED_TRIS = 0;
LED_LAT = 0;
LED_R_TRIS = 0;
LED_R_LAT = 1;
LED_G_TRIS = 0;
LED_G_LAT = 1;
LED_B_TRIS = 0;
LED_B_LAT = 1;
 
BLE_RESET_TRIS = 0;
BLE_RESET_LAT = 0;
BLE_RESET_LAT = 1;
 
BLE_SLEEP_TRIS = 0;
BLE_SLEEP_LAT = 0;
UART_CTS_TRIS = 1;
UART_RTS_TRIS = 0;
UART_RTS_LAT = 0;
 
BLE_MODE_TRIS = 0;
BLE_MODE_LAT = 0;
 
TIMER_1_Init();
// Initialize all peripherals
// TIMER_1_Init();
TIMER_2_Init();
UART_Init(&uart_data);
I2C_Init(&i2c_data);
INTERRUPT_Init();
142,11 → 150,28
 
I2C_Configure_Master(I2C_100KHZ);
INTERRUPT_Enable();
// TIMER_1_Start();
TIMER_2_Start();
 
// A small delay is needed for the sensors to start up
__delay_ms(10);
 
Startup_Check();
 
TIMER_1_Start();
// LED_R_ON = 1;
// LED_G_ON = 1;
// LED_B_ON = 1;
 
while(1);
}
 
while(1) {
UART_Write("Hello World \r\n", 14);
LED_B_ON = 0;
LED_R_ON = 1;
__delay_ms(250);
LED_R_ON = 0;
LED_G_ON = 1;
__delay_ms(250);
LED_G_ON = 0;
LED_B_ON = 1;
__delay_ms(250);
}
}
/PIC Stuff/PICX_16F1829_BLE_IMU/main.h
11,18 → 11,19
#define I2C_CLK_TRIS TRISBbits.TRISB6
#define I2C_DAT_TRIS TRISBbits.TRISB4
 
#define LED_TRIS TRISCbits.TRISC1
#define LED_LAT LATCbits.LATC1
#define LED_R_TRIS TRISCbits.TRISC0
#define LED_R_LAT LATCbits.LATC0
 
#define LED_G_TRIS TRISCbits.TRISC1
#define LED_G_LAT LATCbits.LATC1
 
#define LED_B_TRIS TRISCbits.TRISC2
#define LED_B_LAT LATCbits.LATC2
 
// Active low reset
#define BLE_RESET_TRIS TRISCbits.TRISC7
#define BLE_RESET_LAT LATCbits.LATC7
 
#define BLE_SLEEP_TRIS TRISCbits.TRISC2
#define BLE_SLEEP_LAT LATCbits.LATC2
 
#define BLE_MODE_TRIS TRISCbits.TRISC0
#define BLE_MODE_LAT LATCbits.LATC0
 
#define ADDRESS_GYRO 0x6B
#define ADDRESS_ACCL 0x19
#define ADDRESS_MAGN 0x1E
30,6 → 31,10
 
#define _XTAL_FREQ 32000000
 
#define LED_R_MAX_BRIGHTNESS 5
#define LED_G_MAX_BRIGHTNESS 20
#define LED_B_MAX_BRIGHTNESS 30 // Dont set this past 100!
 
#endif /* MAIN_H */
 
// <editor-fold defaultstate="collapsed" desc="Pinouts">
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/Makefile-default.mk
28,13 → 28,13
CND_CONF=default
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
IMAGE_TYPE=debug
OUTPUT_SUFFIX=cof
DEBUGGABLE_SUFFIX=cof
OUTPUT_SUFFIX=elf
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=cof
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif
 
44,6 → 44,9
# Distribution Directory
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
 
# Source Files Quoted if spaced
SOURCEFILES_QUOTED_IF_SPACED=main.c TIMER.c INTERRUPT.c UART.c I2C.c
 
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.p1 ${OBJECTDIR}/TIMER.p1 ${OBJECTDIR}/INTERRUPT.p1 ${OBJECTDIR}/UART.p1 ${OBJECTDIR}/I2C.p1
POSSIBLE_DEPFILES=${OBJECTDIR}/main.p1.d ${OBJECTDIR}/TIMER.p1.d ${OBJECTDIR}/INTERRUPT.p1.d ${OBJECTDIR}/UART.p1.d ${OBJECTDIR}/I2C.p1.d
51,7 → 54,10
# Object Files
OBJECTFILES=${OBJECTDIR}/main.p1 ${OBJECTDIR}/TIMER.p1 ${OBJECTDIR}/INTERRUPT.p1 ${OBJECTDIR}/UART.p1 ${OBJECTDIR}/I2C.p1
 
# Source Files
SOURCEFILES=main.c TIMER.c INTERRUPT.c UART.c I2C.c
 
 
CFLAGS=
ASFLAGS=
LDLIBSOPTIONS=
75,7 → 81,8
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/main.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/main.p1 main.c
@${RM} ${OBJECTDIR}/main.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/main.p1 main.c
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
82,7 → 89,8
${OBJECTDIR}/TIMER.p1: TIMER.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/TIMER.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/TIMER.p1 TIMER.c
@${RM} ${OBJECTDIR}/TIMER.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/TIMER.p1 TIMER.c
@-${MV} ${OBJECTDIR}/TIMER.d ${OBJECTDIR}/TIMER.p1.d
@${FIXDEPS} ${OBJECTDIR}/TIMER.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
89,7 → 97,8
${OBJECTDIR}/INTERRUPT.p1: INTERRUPT.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/INTERRUPT.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/INTERRUPT.p1 INTERRUPT.c
@${RM} ${OBJECTDIR}/INTERRUPT.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/INTERRUPT.p1 INTERRUPT.c
@-${MV} ${OBJECTDIR}/INTERRUPT.d ${OBJECTDIR}/INTERRUPT.p1.d
@${FIXDEPS} ${OBJECTDIR}/INTERRUPT.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
96,7 → 105,8
${OBJECTDIR}/UART.p1: UART.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/UART.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/UART.p1 UART.c
@${RM} ${OBJECTDIR}/UART.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/UART.p1 UART.c
@-${MV} ${OBJECTDIR}/UART.d ${OBJECTDIR}/UART.p1.d
@${FIXDEPS} ${OBJECTDIR}/UART.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
103,7 → 113,8
${OBJECTDIR}/I2C.p1: I2C.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/I2C.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/I2C.p1 I2C.c
@${RM} ${OBJECTDIR}/I2C.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/I2C.p1 I2C.c
@-${MV} ${OBJECTDIR}/I2C.d ${OBJECTDIR}/I2C.p1.d
@${FIXDEPS} ${OBJECTDIR}/I2C.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
111,7 → 122,8
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/main.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/main.p1 main.c
@${RM} ${OBJECTDIR}/main.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/main.p1 main.c
@-${MV} ${OBJECTDIR}/main.d ${OBJECTDIR}/main.p1.d
@${FIXDEPS} ${OBJECTDIR}/main.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
118,7 → 130,8
${OBJECTDIR}/TIMER.p1: TIMER.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/TIMER.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/TIMER.p1 TIMER.c
@${RM} ${OBJECTDIR}/TIMER.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/TIMER.p1 TIMER.c
@-${MV} ${OBJECTDIR}/TIMER.d ${OBJECTDIR}/TIMER.p1.d
@${FIXDEPS} ${OBJECTDIR}/TIMER.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
125,7 → 138,8
${OBJECTDIR}/INTERRUPT.p1: INTERRUPT.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/INTERRUPT.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/INTERRUPT.p1 INTERRUPT.c
@${RM} ${OBJECTDIR}/INTERRUPT.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/INTERRUPT.p1 INTERRUPT.c
@-${MV} ${OBJECTDIR}/INTERRUPT.d ${OBJECTDIR}/INTERRUPT.p1.d
@${FIXDEPS} ${OBJECTDIR}/INTERRUPT.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
132,7 → 146,8
${OBJECTDIR}/UART.p1: UART.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/UART.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/UART.p1 UART.c
@${RM} ${OBJECTDIR}/UART.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/UART.p1 UART.c
@-${MV} ${OBJECTDIR}/UART.d ${OBJECTDIR}/UART.p1.d
@${FIXDEPS} ${OBJECTDIR}/UART.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
139,7 → 154,8
${OBJECTDIR}/I2C.p1: I2C.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/I2C.p1.d
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --asmlist --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/I2C.p1 I2C.c
@${RM} ${OBJECTDIR}/I2C.p1
${MP_CC} --pass1 $(MP_EXTRA_CC_PRE) --chip=$(MP_PROCESSOR_OPTION) -Q -G --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -o${OBJECTDIR}/I2C.p1 I2C.c
@-${MV} ${OBJECTDIR}/I2C.d ${OBJECTDIR}/I2C.p1.d
@${FIXDEPS} ${OBJECTDIR}/I2C.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
156,13 → 172,13
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G --asmlist -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.map -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.map -D__DEBUG=1 --debugger=pickit3 --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G --asmlist -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.map --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug,9 --addrqual=ignore --mode=free -P -N255 --warn=0 --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
${MP_CC} $(MP_EXTRA_LD_PRE) --chip=$(MP_PROCESSOR_OPTION) -G -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.map --double=24 --float=24 --opt=default,+asm,-asmfile,+speed,-space,-debug --addrqual=ignore --mode=free -P -N255 --warn=0 --asmlist --summary=default,-psect,-class,+mem,-hex,-file --output=default,-inhx032 --runtime=default,+clear,+init,-keep,-no_startup,+osccal,-resetbits,-download,-stackcall,+clib --output=-mcof,+elf "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: %%s" "--msgformat=%%f:%%l: advisory: %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1829_BLE_IMU.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
endif
 
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/Makefile-genesis.properties
1,8 → 1,8
#
#Fri May 31 18:15:01 EDT 2013
default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v1.12\\bin
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=415494acd195d89b2f6d7a36797a5ab4
default.languagetoolchain.version=1.12
#Tue Sep 24 21:44:35 EDT 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
host.platform=windows
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=10ef1ca121a2d422272c53829f548789
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=1b3e17eea10b9e6765d1132465030f97
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/Makefile-local-default.mk
19,9 → 19,9
# Adding MPLAB X bin directory to path.
PATH:=C:/Program Files (x86)/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH)
# Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\sys\java\jre1.6.0_32-windows-x64\java-windows/bin/"
MP_JAVA_PATH="C:\Program Files (x86)\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="C:\Program Files (x86)\Microchip\xc8\v1.12\bin\xc8.exe"
MP_CC="C:\Program Files (x86)\Microchip\xc8\v1.20\bin\xc8.exe"
# MP_CPPC is not defined
# MP_BC is not defined
# MP_AS is not defined
28,7 → 28,7
# MP_LD is not defined
# MP_AR is not defined
DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files (x86)/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="C:\Program Files (x86)\Microchip\xc8\v1.12\bin"
MP_CC_DIR="C:\Program Files (x86)\Microchip\xc8\v1.20\bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
# MP_AS_DIR is not defined
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/configurations.xml
8,6 → 8,7
<itemPath>TIMER.h</itemPath>
<itemPath>INTERRUPT.h</itemPath>
<itemPath>UART.h</itemPath>
<itemPath>I2C.h</itemPath>
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
20,6 → 21,7
<itemPath>TIMER.c</itemPath>
<itemPath>INTERRUPT.c</itemPath>
<itemPath>UART.c</itemPath>
<itemPath>I2C.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
37,7 → 39,7
<targetPluginBoard></targetPluginBoard>
<platformTool>PICkit3PlatformTool</platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>1.12</languageToolchainVersion>
<languageToolchainVersion>1.20</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
60,6 → 62,7
<makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
</makeCustomizationType>
<HI-TECH-COMP>
<property key="asmlist" value="true"/>
<property key="define-macros" value=""/>
<property key="extra-include-directories" value=""/>
<property key="identifier-length" value="255"/>
75,6 → 78,7
<property key="preprocess-assembler" value="true"/>
<property key="undefine-macros" value=""/>
<property key="use-cci" value="false"/>
<property key="use-iar" value="false"/>
<property key="verbose" value="false"/>
<property key="warning-level" value="0"/>
<property key="what-to-do" value="ignore"/>
82,6 → 86,7
<HI-TECH-LINK>
<property key="additional-options-checksum" value=""/>
<property key="additional-options-code-offset" value=""/>
<property key="additional-options-command-line" value=""/>
<property key="additional-options-errata" value=""/>
<property key="additional-options-extend-address" value="false"/>
<property key="additional-options-trace-type" value=""/>
144,11 → 149,13
<property key="programoptions.preserveprogramrange.end" value="0x1fff"/>
<property key="programoptions.preserveprogramrange.start" value="0x0"/>
<property key="programoptions.preserveuserid" value="false"/>
<property key="programoptions.testmodeentrymethod" value="VPPFirst"/>
<property key="programoptions.usehighvoltageonmclr" value="false"/>
<property key="programoptions.uselvpprogramming" value="false"/>
<property key="voltagevalue" value="3.25"/>
</PICkit3PlatformTool>
<XC8-config-global>
<property key="output-file-format" value="-mcof,+elf"/>
</XC8-config-global>
</conf>
</confs>
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/private/configurations.xml
5,7 → 5,7
<confs>
<conf name="default" type="2">
<platformToolSN>:=MPLABCommUSB:=04D8:=900A:=0002:=Microchip Technology Inc.:=PICkit 3:=BUR114189291:=x:=en</platformToolSN>
<languageToolchainDir>C:\Program Files (x86)\Microchip\xc8\v1.12\bin</languageToolchainDir>
<languageToolchainDir>C:\Program Files (x86)\Microchip\xc8\v1.20\bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/private/private.xml
1,4 → 1,3
<?xml version="1.0" encoding="UTF-8"?>
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<?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"/>
</project-private>
/PIC Stuff/PICX_16F1829_BLE_IMU/nbproject/project.xml
1,5 → 1,4
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
<type>com.microchip.mplab.nbide.embedded.makeproject</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/make-project/1">