Subversion Repositories Code-Repo

Compare Revisions

No changes between revisions

Ignore whitespace Rev 316 → Rev 329

/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/HT16K33.c
0,0 → 1,132
#include "HT16K33.h"
#include "I2C1.h"
 
static const uint8_t numbertable[] = {
0x3F /* 0 */,
0x06 /* 1 */,
0x5B /* 2 */,
0x4F /* 3 */,
0x66 /* 4 */,
0x6D /* 5 */,
0x7D, /* 6 */
0x07, /* 7 */
0x7F, /* 8 */
0x6F, /* 9 */
};
 
static const uint8_t alphatable[] = {
0x77, /* a */
0x7C, /* b */
0x39, /* C */
0x5E, /* d */
0x79, /* E */
0x71, /* F */
};
 
static LED_DATA *led_data_p;
 
void LED_Init(LED_DATA *data) {
led_data_p = data;
led_data_p->i2c_address = HT16K33_ADDRESS;
}
 
void LED_Start() {
uint8_t c = 0x21; // Cmd to turn on oscillator
I2C1_Master_Send(led_data_p->i2c_address, &c, 1);
uint8_t result = I2C1_Get_Status();
while (!result) {
result = I2C1_Get_Status();
}
 
LED_Blink_Rate(HT16K33_BLINK_OFF);
LED_Set_Brightness(15); // Max brightness
LED_Clear();
LED_Write_Display();
}
 
void LED_Set_Brightness(uint8_t c) {
if (c > 15) c = 15;
c |= 0xE0;
 
I2C1_Master_Send(led_data_p->i2c_address, &c, 1);
uint8_t result = I2C1_Get_Status();
while (!result) {
result = I2C1_Get_Status();
}
}
 
void LED_Blink_Rate(uint8_t c) {
uint8_t buffer;
 
if (c > 3) c = 0;
 
buffer = HT16K33_BLINK_CMD | HT16K33_BLINK_DISPLAYON | (c << 1);
 
I2C1_Master_Send(led_data_p->i2c_address, &buffer, 1);
buffer = I2C1_Get_Status();
while (!buffer) {
buffer = I2C1_Get_Status();
}
}
 
void LED_Write_Display() {
led_data_p->display_buffer[0] = 0x00; // Start at address 0x00
I2C1_Master_Send(led_data_p->i2c_address, led_data_p->display_buffer, 17);
 
uint8_t result = I2C1_Get_Status();
while (!result) {
result = I2C1_Get_Status();
}
}
 
void LED_Clear() {
for (uint8_t c = 0; c < 17; c++) {
led_data_p->display_buffer[c] = 0;
}
}
 
void LED_Draw_Colon(uint8_t c) {
if (c) {
led_data_p->display_buffer[5] = 0xFF;
} else {
led_data_p->display_buffer[5] = 0;
}
}
 
void LED_Write_Digit_Raw(uint8_t loc, uint8_t bitmask) {
if (loc > 4) return;
led_data_p->display_buffer[(loc<<1)+1] = bitmask;
}
 
void LED_Write_Digit_Num(uint8_t loc, uint8_t num, uint8_t dot) {
if (loc > 4) return;
if (loc > 1) loc++;
LED_Write_Digit_Raw(loc, numbertable[num] | dot << 7);
}
 
void LED_Write_Digit_Alpha(uint8_t loc, uint8_t alpha, uint8_t dot) {
if (loc > 4) return;
if (loc > 1) loc++;
LED_Write_Digit_Raw(loc, alphatable[alpha] | dot << 7);
}
 
void LED_Write_Num(uint16_t i) {
LED_Write_Digit_Num(0, (i%10000)/1000, 0);
LED_Write_Digit_Num(1, (i%1000)/100, 0);
LED_Write_Digit_Num(2, (i%100)/10, 0);
LED_Write_Digit_Num(3, i%10, 0);
 
if (i < 10) {
LED_Write_Digit_Raw(0, 0);
LED_Write_Digit_Raw(1, 0);
LED_Write_Digit_Raw(3, 0);
} else if (i < 100) {
LED_Write_Digit_Raw(0, 0);
LED_Write_Digit_Raw(1, 0);
} else if (i < 1000) {
LED_Write_Digit_Raw(0, 0);
}
LED_Write_Display();
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/HT16K33.h
0,0 → 1,36
#ifndef LED_BACKPACK_H
#define LED_BACKPACK_H
 
#include "defines.h"
 
#define HT16K33_ADDRESS 0x70
 
#define HT16K33_BLINK_CMD 0x80
#define HT16K33_BLINK_DISPLAYON 0x01
#define HT16K33_BLINK_OFF 0
#define HT16K33_BLINK_2HZ 1
#define HT16K33_BLINK_1HZ 2
#define HT16K33_BLINK_HALFHZ 3
 
#define HT16K33_CMD_BRIGHTNESS 0x0E
 
typedef struct {
uint8_t i2c_address;
uint8_t display_buffer[17];
} LED_DATA;
 
void LED_Init(LED_DATA *data);
void LED_Start(void);
void LED_Set_Brightness(uint8_t c);
void LED_Blink_Rate(uint8_t c);
void LED_Write_Display(void);
void LED_Clear(void);
void LED_Draw_Colon(uint8_t c);
void LED_Write_Digit_Raw(uint8_t loc, uint8_t bitmask);
void LED_Write_Digit_Num(uint8_t loc, uint8_t num, uint8_t dot);
void LED_Write_Digit_Alpha(uint8_t loc, uint8_t alpha, uint8_t dot);
void LED_Write_Num(uint16_t i);
 
 
#endif /* LED_BACKPACK_H */
 
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/I2C1.c
0,0 → 1,534
#include "defines.h"
#include "I2C1.h"
 
static I2C1_DATA *i2c_data_p;
 
// Set up the data structures for the base_I2C.code
// Should be called once before any i2c routines are called
void I2C1_Init(I2C1_DATA *data) {
i2c_data_p = data;
i2c_data_p->buffer_in_len = 0;
i2c_data_p->buffer_in_len_tmp = 0;
i2c_data_p->buffer_in_read_ind = 0;
i2c_data_p->buffer_in_write_ind = 0;
 
i2c_data_p->buffer_out_ind = 0;
i2c_data_p->buffer_out_len = 0;
i2c_data_p->operating_mode = 0;
i2c_data_p->operating_state = I2C_IDLE;
i2c_data_p->return_status = 0;
 
i2c_data_p->slave_in_last_byte = 0;
i2c_data_p->slave_sending_data = 0;
 
i2c_data_p->master_dest_addr = 0;
i2c_data_p->master_status = I2C_MASTER_IDLE;
// Enable I2C interrupt
PIE1bits.SSP1IE = 1;
}
 
// Setup the PIC to operate as a master.
void I2C1_Configure_Master(uint8_t speed) {
i2c_data_p->operating_mode = I2C_MODE_MASTER;
 
I2C_1_CLK_TRIS = 1;
I2C_1_DAT_TRIS = 1;
 
SSP1STAT = 0x0;
SSP1CON1 = 0x0;
SSP1CON2 = 0x0;
SSP1CON3 = 0x0;
SSP1CON1bits.SSPM = 0x8; // I2C Master Mode
if (speed == 0x01) {
SSP1ADD = 0x13; // Operate at 400KHz (32MHz)
SSP1STATbits.SMP = 1; // Disable Slew Rate Control
} else if (speed == 0x02) {
SSP1ADD = 0x07; // Operate at 1Mhz (32Mhz)
SSP1STATbits.SMP = 1; // Disable Slew Rate Control
} else {
SSP1ADD = 0x4F; // Operate at 100KHz (32MHz)
SSP1STATbits.SMP = 0; // Enable Slew Rate Control
}
SSP1CON1bits.SSPEN = 1; // Enable MSSP1 Module
}
 
// Sends length number of bytes in msg to specified address (no R/W bit)
void I2C1_Master_Send(uint8_t address, uint8_t *msg, uint8_t length) {
uint8_t i;
if (length == 0)
return;
// Copy message to send into buffer and save length/address
for (i = 0; i < length; i++) {
i2c_data_p->buffer_in[i] = msg[i];
}
i2c_data_p->buffer_in_len = length;
i2c_data_p->master_dest_addr = address;
i2c_data_p->buffer_in_read_ind = 0;
i2c_data_p->buffer_in_write_ind = 0;
 
// Change status to 'next' operation
i2c_data_p->operating_state = I2C_SEND_ADDR;
i2c_data_p->master_status = I2C_MASTER_SEND;
// Generate start condition
SSP1CON2bits.SEN = 1;
}
 
// Reads length number of bytes from address (no R/W bit)
void I2C1_Master_Recv(uint8_t address, uint8_t length) {
if (length == 0)
return;
 
// Save length and address to get data from
i2c_data_p->buffer_in_len = length;
i2c_data_p->master_dest_addr = address;
i2c_data_p->buffer_in_read_ind = 0;
i2c_data_p->buffer_in_write_ind = 0;
 
// Change status to 'next' operation
i2c_data_p->operating_state = I2C_SEND_ADDR;
i2c_data_p->master_status = I2C_MASTER_RECV;
// Generate start condition
SSP1CON2bits.SEN = 1;
}
 
// Writes msg to address then reads length number of bytes from address
void I2C1_Master_Restart(uint8_t address, uint8_t msg, uint8_t length) {
uint8_t c;
if (length == 0) {
c = msg;
I2C1_Master_Send(address, &c, 1);
return;
}
 
// Save length and address to get data from
i2c_data_p->buffer_in[0] = msg;
i2c_data_p->buffer_in_len = length;
i2c_data_p->master_dest_addr = address;
i2c_data_p->buffer_in_read_ind = 0;
i2c_data_p->buffer_in_write_ind = 0;
 
// Change status to 'next' operation
i2c_data_p->operating_state = I2C_SEND_ADDR;
i2c_data_p->master_status = I2C_MASTER_RESTART;
 
// Generate start condition
SSP1CON2bits.SEN = 1;
}
 
// Setup the PIC to operate as a slave. The address must not include the R/W bit
void I2C1_Configure_Slave(uint8_t addr) {
i2c_data_p->operating_mode = I2C_MODE_SLAVE;
 
// Ensure the two lines are set for input (we are a slave)
I2C_1_CLK_TRIS = 1;
I2C_1_DAT_TRIS = 1;
 
SSP1ADD = addr << 1; // Set the slave address
 
SSP1STAT = 0x0;
SSP1CON1 = 0x0;
SSP1CON2 = 0x0;
SSP1CON3 = 0x0;
SSP1CON1bits.SSPM = 0x6; // Enable Slave 7-bit address
SSP1STATbits.SMP = 1; // Slew Off
SSP1CON2bits.SEN = 1; // Enable clock-stretching
SSP1CON3bits.PCIE = 1; // Interrupt on stop condition
SSP1CON3bits.SCIE = 0; // Disable interrupt on start condition
SSP1CON1bits.SSPEN = 1; // Enable MSSP1 Module
}
 
void I2C1_Interrupt_Handler() {
// Call interrupt depending on which mode we are operating in
if (i2c_data_p->operating_mode == I2C_MODE_MASTER) {
I2C1_Interrupt_Master();
} else if (i2c_data_p->operating_mode == I2C_MODE_SLAVE) {
I2C1_Interrupt_Slave();
}
}
 
// An internal subroutine used in the master version of the i2c_interrupt_handler
void I2C1_Interrupt_Master() {
// If we are in the middle of sending data
if (i2c_data_p->master_status == I2C_MASTER_SEND) {
switch (i2c_data_p->operating_state) {
case I2C_IDLE:
break;
case I2C_SEND_ADDR:
// Send the address with read bit set
i2c_data_p->operating_state = I2C_CHECK_ACK_SEND;
SSP1BUF = (i2c_data_p->master_dest_addr << 1) | 0x0;
break;
case I2C_CHECK_ACK_SEND:
// Check if ACK is received or not
if (!SSP1CON2bits.ACKSTAT) {
// If an ACK is received, send next byte of data
if (i2c_data_p->buffer_in_read_ind < i2c_data_p->buffer_in_len) {
SSP1BUF = i2c_data_p->buffer_in[i2c_data_p->buffer_in_read_ind];
i2c_data_p->buffer_in_read_ind++;
} else {
// If no more data is to be sent, send stop bit
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_SEND_OK;
}
} else {
// If a NACK is received, stop transmission and send error
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_SEND_FAIL;
}
break;
}
// If we are in the middle of receiving data
} else if (i2c_data_p->master_status == I2C_MASTER_RECV) {
switch (i2c_data_p->operating_state) {
case I2C_IDLE:
break;
case I2C_SEND_ADDR:
// Send address with write bit set
i2c_data_p->operating_state = I2C_CHECK_ACK_RECV;
uint8_t tmp = (i2c_data_p->master_dest_addr << 1);
tmp |= 0x01;
SSP1BUF = tmp;
break;
case I2C_CHECK_ACK_RECV:
// Check if ACK is received
if (!SSP1CON2bits.ACKSTAT) {
// If an ACK is received, set module to receive 1 byte of data
i2c_data_p->operating_state = I2C_RCV_DATA;
SSP1CON2bits.RCEN = 1;
} else {
// If a NACK is received, stop transmission and send error
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_RECV_FAIL;
}
break;
case I2C_RCV_DATA:
// On receive, save byte into buffer
// TODO: Handle I2C buffer overflow
i2c_data_p->buffer_in[i2c_data_p->buffer_in_write_ind] = SSP1BUF;
i2c_data_p->buffer_in_write_ind++;
if (i2c_data_p->buffer_in_write_ind < i2c_data_p->buffer_in_len) {
// If we still need to read, send an ACK to the slave
i2c_data_p->operating_state = I2C_REQ_DATA;
SSP1CON2bits.ACKDT = 0; // ACK
SSP1CON2bits.ACKEN = 1;
} else {
// If we are done reading, send an NACK to the slave
i2c_data_p->operating_state = I2C_SEND_STOP;
SSP1CON2bits.ACKDT = 1; // NACK
SSP1CON2bits.ACKEN = 1;
}
break;
case I2C_REQ_DATA:
// Set module to receive one byte of data
i2c_data_p->operating_state = I2C_RCV_DATA;
SSP1CON2bits.RCEN = 1;
break;
case I2C_SEND_STOP:
// Send the stop bit and copy message to send to Main()
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_RECV_OK;
break;
}
} else if (i2c_data_p->master_status == I2C_MASTER_RESTART) {
switch (i2c_data_p->operating_state) {
case I2C_IDLE:
break;
case I2C_SEND_ADDR:
// Send the address with read bit set
i2c_data_p->operating_state = I2C_CHECK_ACK_SEND;
SSP1BUF = (i2c_data_p->master_dest_addr << 1) | 0x0;
break;
case I2C_CHECK_ACK_SEND:
// Check if ACK is received or not
if (!SSP1CON2bits.ACKSTAT) {
// If an ACK is received, send first byte of data
SSP1BUF = i2c_data_p->buffer_in[0];
i2c_data_p->operating_state = I2C_CHECK_ACK_RESTART;
} else {
// If a NACK is received, stop transmission and send error
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_SEND_FAIL;
}
break;
case I2C_CHECK_ACK_RESTART:
if (!SSP1CON2bits.ACKSTAT) {
SSP1CON2bits.RSEN = 1;
i2c_data_p->operating_state = I2C_SEND_ADDR_2;
} else {
// If a NACK is received, stop transmission and send error
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_SEND_FAIL;
}
break;
case I2C_SEND_ADDR_2:
// Send the address with read bit set
i2c_data_p->operating_state = I2C_CHECK_ACK_RECV;
uint8_t tmp = (i2c_data_p->master_dest_addr << 1);
tmp |= 0x01;
SSP1BUF = tmp;
break;
case I2C_CHECK_ACK_RECV:
// Check if ACK is received
if (!SSP1CON2bits.ACKSTAT) {
// If an ACK is received, set module to receive 1 byte of data
i2c_data_p->operating_state = I2C_RCV_DATA;
SSP1CON2bits.RCEN = 1;
} else {
// If a NACK is received, stop transmission and send error
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_RECV_FAIL;
}
break;
case I2C_RCV_DATA:
// On receive, save byte into buffer
// TODO: Handle I2C buffer overflow
i2c_data_p->buffer_in[i2c_data_p->buffer_in_write_ind] = SSP1BUF;
i2c_data_p->buffer_in_write_ind++;
if (i2c_data_p->buffer_in_write_ind < i2c_data_p->buffer_in_len) {
// If we still need to read, send an ACK to the slave
i2c_data_p->operating_state = I2C_REQ_DATA;
SSP1CON2bits.ACKDT = 0; // ACK
SSP1CON2bits.ACKEN = 1;
} else {
// If we are done reading, send an NACK to the slave
i2c_data_p->operating_state = I2C_SEND_STOP;
SSP1CON2bits.ACKDT = 1; // NACK
SSP1CON2bits.ACKEN = 1;
}
break;
case I2C_REQ_DATA:
// Set module to receive one byte of data
i2c_data_p->operating_state = I2C_RCV_DATA;
SSP1CON2bits.RCEN = 1;
break;
case I2C_SEND_STOP:
// Send the stop bit
i2c_data_p->operating_state = I2C_IDLE;
SSP1CON2bits.PEN = 1;
i2c_data_p->master_status = I2C_MASTER_IDLE;
i2c_data_p->return_status = I2C_RECV_OK;
break;
}
}
}
 
void I2C1_Interrupt_Slave() {
uint8_t received_data;
uint8_t data_read_from_buffer = 0;
uint8_t data_written_to_buffer = 0;
uint8_t overrun_error = 0;
 
// Clear SSPOV (overflow bit)
if (SSP1CON1bits.SSPOV == 1) {
SSP1CON1bits.SSPOV = 0;
// We failed to read the buffer in time, so we know we
// can't properly receive this message, just put us in the
// a state where we are looking for a new message
i2c_data_p->operating_state = I2C_IDLE;
overrun_error = 1;
i2c_data_p->return_status = I2C_ERR_OVERRUN;
}
 
// Read SPPxBUF if it is full
if (SSP1STATbits.BF == 1) {
received_data = SSP1BUF;
data_read_from_buffer = 1;
}
 
if (!overrun_error) {
switch (i2c_data_p->operating_state) {
case I2C_IDLE:
{
// // Ignore anything except a start
// if (SSP1STATbits.S == 1) {
// i2c_data_p->buffer_in_len_tmp = 0;
// i2c_data_p->operating_state = I2C_STARTED;
// }
// break;
// }
// case I2C_STARTED:
// {
// In this case, we expect either an address or a stop bit
if (SSP1STATbits.P == 1) {
// Return to idle mode
i2c_data_p->operating_state = I2C_IDLE;
} else if (data_read_from_buffer) {
i2c_data_p->buffer_in_len_tmp = 0;
if (SSP1STATbits.D_nA == 0) {
// Address received
if (SSP1STATbits.R_nW == 0) {
// Slave write mode
i2c_data_p->operating_state = I2C_RCV_DATA;
} else {
// Slave read mode
i2c_data_p->operating_state = I2C_SEND_DATA;
// Process the first byte immediatly if sending data
goto send;
}
} else {
i2c_data_p->operating_state = I2C_IDLE;
i2c_data_p->return_status = I2C_ERR_NOADDR;
}
}
break;
}
send:
case I2C_SEND_DATA:
{
if (!i2c_data_p->slave_sending_data) {
// If we are not currently sending data, figure out what to reply with
if (I2C1_Process_Receive(i2c_data_p->slave_in_last_byte)) {
// Data exists to be returned, send first byte
SSP1BUF = i2c_data_p->buffer_out[0];
i2c_data_p->buffer_out_ind = 1;
i2c_data_p->slave_sending_data = 1;
data_written_to_buffer = 1;
} else {
// Unknown request
i2c_data_p->slave_sending_data = 0;
i2c_data_p->operating_state = I2C_IDLE;
}
} else {
// Sending remaining data back to master
if (i2c_data_p->buffer_out_ind < i2c_data_p->buffer_out_len) {
SSP1BUF = i2c_data_p->buffer_out[i2c_data_p->buffer_out_ind];
i2c_data_p->buffer_out_ind++;
data_written_to_buffer = 1;
} else {
// Nothing left to send
i2c_data_p->slave_sending_data = 0;
i2c_data_p->operating_state = I2C_IDLE;
}
}
break;
}
case I2C_RCV_DATA:
{
// We expect either data or a stop bit or a (if a restart, an addr)
if (SSP1STATbits.P == 1) {
// Stop bit detected, we need to check to see if we also read data
if (data_read_from_buffer) {
if (SSP1STATbits.D_nA == 1) {
// Data received with stop bit
// TODO: Handle I2C buffer overflow
i2c_data_p->buffer_in[i2c_data_p->buffer_in_write_ind] = received_data;
if (i2c_data_p->buffer_in_write_ind == MAXI2C1BUF-1) {
i2c_data_p->buffer_in_write_ind = 0;
} else {
i2c_data_p->buffer_in_write_ind++;
}
i2c_data_p->buffer_in_len_tmp++;
// Save the last byte received
i2c_data_p->slave_in_last_byte = received_data;
i2c_data_p->return_status = I2C_DATA_AVAL;
} else {
i2c_data_p->operating_state = I2C_IDLE;
i2c_data_p->return_status = I2C_ERR_NODATA;
}
}
i2c_data_p->buffer_in_len += i2c_data_p->buffer_in_len_tmp;
i2c_data_p->operating_state = I2C_IDLE;
} else if (data_read_from_buffer) {
if (SSP1STATbits.D_nA == 1) {
// Data received
i2c_data_p->buffer_in[i2c_data_p->buffer_in_write_ind] = received_data;
if (i2c_data_p->buffer_in_write_ind == MAXI2C1BUF-1) {
i2c_data_p->buffer_in_write_ind = 0;
} else {
i2c_data_p->buffer_in_write_ind++;
}
i2c_data_p->buffer_in_len_tmp++;
// Save the last byte received
i2c_data_p->slave_in_last_byte = received_data;
i2c_data_p->return_status = I2C_DATA_AVAL;
} else {
// Restart bit detected
if (SSP1STATbits.R_nW == 1) {
i2c_data_p->buffer_in_len += i2c_data_p->buffer_in_len_tmp;
i2c_data_p->operating_state = I2C_SEND_DATA;
// Process the first byte immediatly if sending data
goto send;
} else {
// Bad to recv an address again, we aren't ready
i2c_data_p->operating_state = I2C_IDLE;
i2c_data_p->return_status = I2C_ERR_NODATA;
}
}
}
break;
}
}
}
 
// Release the clock stretching bit (if we should)
if (data_read_from_buffer || data_written_to_buffer) {
// Release the clock
if (SSP1CON1bits.CKP == 0) {
SSP1CON1bits.CKP = 1;
}
}
}
 
/* Returns 0 if I2C module is currently busy, otherwise returns status code */
uint8_t I2C1_Get_Status() {
if (i2c_data_p->operating_mode == I2C_MODE_MASTER) {
if (i2c_data_p->master_status != I2C_MASTER_IDLE || i2c_data_p->buffer_in_len == 0) {
return 0;
} else {
return i2c_data_p->return_status;
}
} else {
if (i2c_data_p->operating_state != I2C_IDLE || i2c_data_p->buffer_in_len == 0) {
return 0;
} else {
return i2c_data_p->return_status;
}
}
}
 
uint8_t I2C1_Buffer_Len() {
return i2c_data_p->buffer_in_len;
}
 
/* Returns 0 if I2C module is currently busy, otherwise returns buffer length */
uint8_t I2C1_Read_Buffer(uint8_t *buffer) {
uint8_t i = 0;
while (i2c_data_p->buffer_in_len != 0) {
buffer[i] = i2c_data_p->buffer_in[i2c_data_p->buffer_in_read_ind];
i++;
if (i2c_data_p->buffer_in_read_ind == MAXI2C1BUF-1) {
i2c_data_p->buffer_in_read_ind = 0;
} else {
i2c_data_p->buffer_in_read_ind++;
}
i2c_data_p->buffer_in_len--;
}
return i;
}
 
/* Put data to be returned here */
uint8_t I2C1_Process_Receive(uint8_t c) {
uint8_t ret = 0;
 
return ret;
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/I2C1.h
0,0 → 1,82
#ifndef I2C1_H
#define I2C1_H
 
#define MAXI2C1BUF 32
 
// I2C Operating Speed
#define I2C_100KHZ 0x0
#define I2C_400KHZ 0x1
#define I2C_1MHZ 0x2
 
// Operating State
#define I2C_IDLE 0x1
#define I2C_STARTED 0x2
#define I2C_RCV_DATA 0x3
#define I2C_SEND_DATA 0x4
#define I2C_SEND_ADDR 0x5
#define I2C_SEND_ADDR_2 0x6
#define I2C_CHECK_ACK_SEND 0x7
#define I2C_CHECK_ACK_RECV 0x8
#define I2C_CHECK_ACK_RESTART 0x9
#define I2C_REQ_DATA 0xA
#define I2C_SEND_STOP 0xB
#define I2C_SEND_START 0xC
 
// Operating Mode
#define I2C_MODE_SLAVE 0x10
#define I2C_MODE_MASTER 0x11
 
// Master Status
#define I2C_MASTER_SEND 0x20
#define I2C_MASTER_RECV 0x21
#define I2C_MASTER_RESTART 0x22
#define I2C_MASTER_IDLE 0x23
 
// Return Status
#define I2C_SEND_OK 0x30
#define I2C_SEND_FAIL 0x31
#define I2C_RECV_OK 0x32
#define I2C_RECV_FAIL 0x33
#define I2C_DATA_AVAL 0x34
#define I2C_ERR_NOADDR 0x35
#define I2C_ERR_OVERRUN 0x36
#define I2C_ERR_NODATA 0x37
#define I2C_ERR_BUFFER_OVERRUN 0x38
 
typedef struct {
uint8_t buffer_in[MAXI2C1BUF];
uint8_t buffer_in_len;
uint8_t buffer_in_len_tmp;
uint8_t buffer_in_read_ind;
uint8_t buffer_in_write_ind;
uint8_t buffer_out[MAXI2C1BUF];
uint8_t buffer_out_len;
uint8_t buffer_out_ind;
 
uint8_t operating_mode;
uint8_t operating_state;
uint8_t return_status;
 
uint8_t master_dest_addr;
uint8_t master_status;
uint8_t slave_in_last_byte;
uint8_t slave_sending_data;
} I2C1_DATA;
 
void I2C1_Init(I2C1_DATA *data);
void I2C1_Interrupt_Handler(void);
void I2C1_Interrupt_Slave(void);
void I2C1_Interrupt_Master(void);
void I2C1_Configure_Slave(uint8_t address);
void I2C1_Configure_Master(uint8_t speed);
void I2C1_Master_Send(uint8_t address, uint8_t *msg, uint8_t length);
void I2C1_Master_Recv(uint8_t address, uint8_t length);
void I2C1_Master_Restart(uint8_t address, uint8_t msg, uint8_t length);
uint8_t I2C1_Get_Status(void);
uint8_t I2C1_Buffer_Len(void);
uint8_t I2C1_Read_Buffer(uint8_t *buffer);
uint8_t I2C1_Process_Receive(uint8_t);
 
#endif
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/INTERRUPTS.c
0,0 → 1,71
#include "defines.h"
#include "INTERRUPTS.h"
#include "I2C1.h"
#include "UART.h"
#include "IOC.h"
 
void Interrupt_Init() {
}
 
void Interrupt_Enable() {
// Enable global and peripheral interrupts
INTCONbits.PEIE = 1;
INTCONbits.GIE = 1;
}
 
void Interrupt_Disable() {
INTCONbits.PEIE = 0;
INTCONbits.GIE = 0;
}
 
void interrupt InterruptHandler(void) {
// We need to check the interrupt flag of each enabled high-priority interrupt to
// see which device generated this interrupt. Then we can call the correct handler.
 
// Check to see if we have an I2C interrupt
if (PIR1bits.SSP1IF) {
 
// Call the handler
I2C1_Interrupt_Handler();
 
// Clear the interrupt flag
PIR1bits.SSP1IF = 0;
 
// return;
}
// Check for an IOC interrupt
if (INTCONbits.IOCIF) {
 
// Call the handler
IOC_Interrupt_Handler();
 
// Clear the interrupt flag
INTCONbits.IOCIF = 0;
 
// return;
}
// if (PIR1bits.RCIF) {
//
// // Call the handler
// UART_RX_Interrupt_Handler();
//
// // Clear the interrupt flag
// PIR1bits.RCIF = 0;
//
// return;
// }
 
// if (PIR1bits.TXIF) {
//
// // Call the handler
// UART_TX_Interrupt_Handler();
//
// // Clear the interrupt flag
// PIR1bits.TXIF = 0;
//
// return;
// }
 
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/INTERRUPTS.h
0,0 → 1,15
#ifndef INTERRUPTS_H
#define INTERRUPTS_H
 
// Initialize the interrupts
void Interrupt_Init(void);
 
// Enable all interrupts (high and low priority)
void Interrupt_Enable(void);
 
// Disable all interrupts (high and low priority)
void Interrupt_Disable(void);
 
void interrupt InterruptHandler(void);
 
#endif
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/IOC.c
0,0 → 1,32
#include "defines.h"
#include "IOC.h"
 
static IOC_DATA *data_p;
 
void IOC_Init(IOC_DATA *data, void (*callback)(void)) {
data_p = data;
data_p->ioc_callback = callback;
 
INTCONbits.IOCIE = 0;
 
// Enable interrupt on rising edge on RA4
IOCAPbits.IOCAP4 = 1;
}
 
void IOC_Enable(void) {
IOC_Clear();
INTCONbits.IOCIE = 1;
}
 
void IOC_Disable(void) {
INTCONbits.IOCIE = 0;
IOC_Clear();
}
 
void IOC_Clear(void) {
IOCAF = 0x0;
}
 
void IOC_Interrupt_Handler(void) {
data_p->ioc_callback();
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/IOC.h
0,0 → 1,15
#ifndef IOC_H
#define IOC_H
 
typedef struct {
void (*ioc_callback)(void);
} IOC_DATA;
 
void IOC_Init(IOC_DATA *data, void (*callback)(void));
void IOC_Enable(void);
void IOC_Disable(void);
void IOC_Clear(void);
void IOC_Interrupt_Handler(void);
 
#endif /* IOC_H */
 
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/Makefile
0,0 → 1,113
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
 
 
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
 
 
# build
build: .build-post
 
.build-pre:
# Add your pre 'build' code here...
 
.build-post: .build-impl
# Add your post 'build' code here...
 
 
# clean
clean: .clean-post
 
.clean-pre:
# Add your pre 'clean' code here...
# WARNING: the IDE does not call this target since it takes a long time to
# simply run make. Instead, the IDE removes the configuration directories
# under build and dist directly without calling make.
# This target is left here so people can do a clean when running a clean
# outside the IDE.
 
.clean-post: .clean-impl
# Add your post 'clean' code here...
 
 
# clobber
clobber: .clobber-post
 
.clobber-pre:
# Add your pre 'clobber' code here...
 
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
 
 
# all
all: .all-post
 
.all-pre:
# Add your pre 'all' code here...
 
.all-post: .all-impl
# Add your post 'all' code here...
 
 
# help
help: .help-post
 
.help-pre:
# Add your pre 'help' code here...
 
.help-post: .help-impl
# Add your post 'help' code here...
 
 
 
# include project implementation makefile
include nbproject/Makefile-impl.mk
 
# include project make variables
include nbproject/Makefile-variables.mk
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/SMT6500.c
0,0 → 1,41
#include "defines.h"
#include "SMT6500.h"
#include "TIMER.h"
#include "IOC.h"
 
static uint16_t tmr_value;
 
void SMT6500_Init(void) {
BLNK_LAT = 0;
INIT_LAT = 0;
BINH_LAT = 0;
}
 
uint16_t SMT6500_Read(void) {
// Start transmission and timer
INIT_LAT = 1;
TIMER1_Start();
tmr_value = 0;
// Enable interrupt after 1ms (blanking period)
__delay_ms(1);
IOC_Enable();
__delay_ms(120);
INIT_LAT = 0;
IOC_Disable();
TIMER1_Stop();
 
 
if (tmr_value == 0) {
return 0xFFFF;
} else {
return tmr_value;
}
}
 
void SMT6500_Callback(void) {
tmr_value = TIMER1_Read();
IOC_Disable();
TIMER1_Stop();
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/SMT6500.h
0,0 → 1,9
#ifndef SMT6500_H
#define SMT6500_H
 
void SMT6500_Init(void);
uint16_t SMT6500_Read(void);
void SMT6500_Callback(void);
 
#endif /* SMT6500_H */
 
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/TIMER.c
0,0 → 1,43
#include "defines.h"
#include "TIMER.h"
 
void TIMER1_Init(void) {
T1CONbits.TMR1CS = 0x0; // Clock source is instruction clock
T1CONbits.T1CKPS = 0x3; // Prescale of 1:8
T1CONbits.T1OSCEN = 0x0; // Dedicated oscillator circuit disabled
T1CONbits.nT1SYNC = 0x0; // Sync clock input with system clock
T1CONbits.TMR1ON = 0; // Timer starts off
T1GCONbits.TMR1GE = 0; // Gate disabled
TMR1 = 0x0;
 
PIE1bits.TMR1IE = 0; // Interrupt disabled
 
// Instruction clock running at 8MHz
// 1:1 Prescale overflows at 122Hz (8.2ms period)
// 1:2 Prescale overflows at 61Hz (16.4ms period)
// 1:4 Prescale overflows at 30.5Hz (32.7ms period)
// 1:8 Prescale overflows at 15.3Hz (65.5ms period)
 
// Instruction clock running at 4MHz
// 1:1 Prescale overflows at 61Hz (16.4ms period)
// 1:2 Prescale overflows at 30.5Hz (32.7ms period)
// 1:4 Prescale overflows at 15.3Hz (65.5ms period)
// 1:8 Prescale overflows at 7.6Hz (131.1ms period)
}
 
void TIMER1_Start(void) {
TMR1 = 0x0;
T1CONbits.TMR1ON = 1;
}
 
void TIMER1_Stop(void) {
T1CONbits.TMR1ON = 0;
}
 
uint16_t TIMER1_Read(void) {
return TMR1;
}
 
void TIMER1_Interrupt_Handler(void) {
 
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/TIMER.h
0,0 → 1,11
#ifndef TIMER_H
#define TIMER_H
 
void TIMER1_Init(void);
void TIMER1_Start(void);
void TIMER1_Stop(void);
uint16_t TIMER1_Read(void);
void TIMER1_Interrupt_Handler(void);
 
#endif /* TIMER_H */
 
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/UART.c
0,0 → 1,106
#include <xc.h>
#include "defines.h"
#include "UART.h"
 
static UART_DATA *data_ptr;
 
void UART_Init(UART_DATA *data) {
data_ptr = data;
 
APFCON0bits.RXDTSEL = 1; // Change RX from RB5 to RC5
APFCON0bits.TXCKSEL = 1; // Change TX from RB7 to RC4
UART_RX_TRIS = 1;
UART_TX_TRIS = 0;
 
SPBRG = 16; // Set baud rate to 115200 @ 32MHz
BAUDCONbits.BRG16 = 0; // 8-bit baud rate generator
TXSTAbits.BRGH = 1; // High baud rate select
 
TXSTAbits.SYNC = 0; // Async operation
RCSTAbits.CREN = 1; // Enable reception module
TXSTAbits.TXEN = 1; // Enable transmission module
RCSTAbits.SPEN = 1; // Enable EUSART module
 
PIE1bits.RCIE = 1; // UART RX interrupt starts enabled
PIE1bits.TXIE = 0; // UART TX interrupt starts disabled
 
// Initialize local variables
data_ptr->buffer_in_read_ind = 0;
data_ptr->buffer_in_write_ind = 0;
data_ptr->buffer_in_len = 0;
data_ptr->buffer_out_ind = 0;
data_ptr->buffer_out_len = 0;
}
 
void UART_TX_Interrupt_Handler(void) {
// Send more data when transmit buffer is empty
if (data_ptr->buffer_out_ind != data_ptr->buffer_out_len) {
TXREG = data_ptr->buffer_out[data_ptr->buffer_out_ind];
data_ptr->buffer_out_ind++;
} else {
// Stop processing TX interrupts if there is no more data to send
while (!TXSTAbits.TRMT);
PIE1bits.TXIE = 0;
data_ptr->buffer_out_ind = 0;
data_ptr->buffer_out_len = 0;
}
}
 
void UART_RX_Interrupt_Handler(void) {
char c = RCREG;
 
// Read received data into buffer
data_ptr->buffer_in[data_ptr->buffer_in_write_ind] = c;
if (data_ptr->buffer_in_write_ind == UART_BUFFER_SIZE - 1) {
data_ptr->buffer_in_write_ind = 0;
} else {
data_ptr->buffer_in_write_ind++;
}
 
// Increment read counter to keep only the latest data
if (data_ptr->buffer_in_len < UART_BUFFER_SIZE) {
data_ptr->buffer_in_len++;
} else {
if (data_ptr->buffer_in_read_ind == UART_BUFFER_SIZE - 1) {
data_ptr->buffer_in_read_ind = 0;
} else {
data_ptr->buffer_in_read_ind++;
}
}
 
// Reset receiver module on overrun error
if (RCSTAbits.OERR == 1) {
RCSTAbits.CREN = 0;
RCSTAbits.CREN = 1;
}
}
 
void UART_Write(char *data, char length) {
// Ensure that no transmission is currently running
while (PIE1bits.TXIE);
 
data_ptr->buffer_out_len = length;
data_ptr->buffer_out_ind = 0;
for (char i = 0; i < length; i++) {
data_ptr->buffer_out[i] = data[i];
}
 
// Start transmission
PIE1bits.TXIE = 1;
}
 
char UART_Read(char *buffer) {
PIE1bits.RCIE = 0; // Disable receiver interrupt
char length = data_ptr->buffer_in_len;
for (char i = 0; i < length; i++) {
buffer[i] = data_ptr->buffer_in[data_ptr->buffer_in_read_ind];
if (data_ptr->buffer_in_read_ind == UART_BUFFER_SIZE - 1) {
data_ptr->buffer_in_read_ind = 0;
} else {
data_ptr->buffer_in_read_ind++;
}
}
data_ptr->buffer_in_len -= length;
PIE1bits.RCIE = 1; // Re-enable receiver interrupt
return length;
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/UART.h
0,0 → 1,25
#ifndef UART_H
#define UART_H
 
#define UART_BUFFER_SIZE 30
 
typedef struct {
char buffer_in[UART_BUFFER_SIZE];
char buffer_in_read_ind;
char buffer_in_write_ind;
char buffer_in_len;
 
char buffer_out[UART_BUFFER_SIZE];
char buffer_out_ind;
char buffer_out_len;
} UART_DATA;
 
void UART_Init(UART_DATA *data);
void UART_Write(char *data, char length);
char UART_Read(char *buffer);
 
void UART_TX_Interrupt_Handler(void);
void UART_RX_Interrupt_Handler(void);
 
#endif /* UART_H */
 
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/defines.h
0,0 → 1,38
#ifndef DEFINES_H
#define DEFINES_H
 
#include <xc.h>
#include <stdint.h>
 
// <editor-fold defaultstate="collapsed" desc="I/O Pins">
 
// Resets the ECHO output for the next return signal
// Must be high at least 0.44ms
#define BLNK_TRIS TRISCbits.TRISC4
#define BLNK_LAT LATCbits.LATC4
 
// Starts the 16 pulse transmit
#define INIT_TRIS TRISCbits.TRISC3
#define INIT_LAT LATCbits.LATC3
 
// Ends the internal blanking early
#define BINH_TRIS TRISCbits.TRISC2
#define BINH_LAT LATCbits.LATC2
 
// 420kHz time base
#define OSC_TRIS TRISAbits.TRISA5
 
// Return signal
#define ECHO_TRIS TRISAbits.TRISA4
 
#define I2C_1_CLK_TRIS TRISCbits.TRISC0
#define I2C_1_DAT_TRIS TRISCbits.TRISC1
 
#define UART_RX_TRIS TRISAbits.TRISA1
#define UART_TX_TRIS TRISAbits.TRISA0
 
// </editor-fold>
 
#define _XTAL_FREQ 16000000
 
#endif /* DEFINES_H */
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/funclist
0,0 → 1,42
_LED_Write_Digit_Num: CODE, 1807 0 39
_LED_Write_Num: CODE, 1066 0 194
_LED_Write_Digit_Raw: CODE, 2012 0 18
_IOC_Enable: CODE, 4030 0 4
_IOC_Interrupt_Handler: CODE, 4052 0 14
_LED_Init: CODE, 4066 0 14
i1_TIMER1_Stop: CODE, 4010 0 3
_LED_Set_Brightness: CODE, 1846 0 38
_TIMER1_Read: CODE, 4044 0 8
_TIMER1_Stop: CODE, 4019 0 3
_I2C1_Init: CODE, 1350 0 78
_I2C1_Interrupt_Slave: CODE, 679 0 387
_TIMER1_Start: CODE, 4039 0 5
_IOC_Init: CODE, 2030 0 17
_LED_Write_Display: CODE, 1919 0 32
_main: CODE, 1260 0 90
_Interrupt_Enable: CODE, 4013 0 3
_numbertable: STRCODE, 2048 0 10
_InterruptHandler: CODE, 4 0 22
_LED_Start: CODE, 1765 0 42
_I2C1_Process_Receive: CODE, 4004 0 3
_LED_Blink_Rate: CODE, 1884 0 35
_Interrupt_Init: CODE, 2047 0 1
__initialization: CODE, 28 0 5
___lwdiv: CODE, 1563 0 55
_I2C1_Configure_Master: CODE, 1720 0 45
_alphatable: STRCODE, 2058 0 6
_IOC_Disable: CODE, 4026 0 4
_SMT6500_Read: CODE, 1504 0 59
_SMT6500_Init: CODE, 4034 0 5
_SMT6500_Callback: CODE, 4080 0 16
_LED_Clear: CODE, 1975 0 19
_I2C1_Master_Send: CODE, 1428 0 76
_I2C1_Interrupt_Handler: CODE, 1951 0 24
___lwmod: CODE, 1673 0 47
i1_IOC_Disable: CODE, 4022 0 4
_IOC_Clear: CODE, 4016 0 3
_I2C1_Get_Status: CODE, 1618 0 55
_I2C1_Interrupt_Master: CODE, 37 0 642
_Pins_Init: CODE, 1994 0 18
i1_IOC_Clear: CODE, 4007 0 3
Total: 2146
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/l.obj
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/l.obj
Property changes:
Added: svn:mime-type
+application/octet-stream
\ No newline at end of property
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/main.c
0,0 → 1,91
// <editor-fold defaultstate="collapsed" desc="Configuration Bits">
// PIC16F1825 Configuration Bit Settings
 
// CONFIG1
#pragma config FOSC = INTOSC // Oscillator Selection (INTOSC oscillator: I/O function on CLKIN pin)
#pragma config WDTE = OFF // Watchdog Timer Enable (WDT enabled)
#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled)
#pragma config MCLRE = ON // MCLR Pin Function Select (MCLR/VPP pin function is digital input)
#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config CPD = OFF // Data Memory Code Protection (Data memory code protection is disabled)
#pragma config BOREN = ON // Brown-out Reset Enable (Brown-out Reset enabled)
#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
#pragma config IESO = ON // Internal/External Switchover (Internal/External Switchover mode is enabled)
#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is enabled)
 
// CONFIG2
#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off)
#pragma config PLLEN = OFF // PLL Disabled (4x PLL disabled)
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
#pragma config LVP = OFF // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming)
// </editor-fold>
 
#include "defines.h"
#include "INTERRUPTS.h"
#include "I2C1.h"
#include "HT16K33.h"
#include "SMT6500.h"
#include "IOC.h"
//#include "UART.h"
 
void Pins_Init(void) {
// Set all pins to digital I/O
ANSELA = 0x0;
ANSELC = 0x0;
 
// // Enable weak pull-up if WPU bit is set
// OPTION_REGbits.nWPUEN = 0;
 
BLNK_LAT = 0;
BLNK_TRIS = 0;
INIT_LAT = 0;
INIT_TRIS = 0;
BINH_LAT = 0;
BINH_TRIS = 0;
OSC_TRIS = 1;
ECHO_TRIS = 1;
}
 
int main(void) {
// Set internal oscillator speed to 16MHz
OSCCONbits.SPLLEN = 0; // 4x PLL disabled (overwritten by config bits)
OSCCONbits.IRCF = 0b1111; // Base frequency @ 4MHz
OSCCONbits.SCS = 0b00; // System clock determined by config bits
 
// Initialize I/O
Pins_Init();
SMT6500_Init();
 
// Initialize I2C
I2C1_DATA i2c_data;
I2C1_Init(&i2c_data);
I2C1_Configure_Master(I2C_400KHZ);
 
// UART_DATA uart_data;
// UART_Init(&uart_data);
 
IOC_DATA ioc_data;
IOC_Init(&ioc_data, SMT6500_Callback);
 
LED_DATA led_data;
LED_Init(&led_data);
 
// Initialize interrupts
Interrupt_Init();
Interrupt_Enable();
 
__delay_ms(100);
 
LED_Start();
 
while (1) {
uint16_t distance = SMT6500_Read() / 7;
LED_Write_Num(distance);
// __delay_ms(100);
}
}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Makefile-default.mk
0,0 → 1,252
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a -pre and a -post target defined where you can add customized code.
#
# This makefile implements configuration specific macros and targets.
 
 
# Include project Makefile
ifeq "${IGNORE_LOCAL}" "TRUE"
# do not include local makefile. User is passing all local related variables already
else
include Makefile
# Include makefile containing local settings
ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk"
include nbproject/Makefile-local-default.mk
endif
endif
 
# Environment
MKDIR=gnumkdir -p
RM=rm -f
MV=mv
CP=cp
 
# Macros
CND_CONF=default
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
IMAGE_TYPE=debug
OUTPUT_SUFFIX=elf
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif
 
# Object Directory
OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE}
 
# Distribution Directory
DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE}
 
# Source Files Quoted if spaced
SOURCEFILES_QUOTED_IF_SPACED=I2C1.c INTERRUPTS.c UART.c main.c HT16K33.c TIMER.c SMT6500.c IOC.c
 
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/I2C1.p1 ${OBJECTDIR}/INTERRUPTS.p1 ${OBJECTDIR}/UART.p1 ${OBJECTDIR}/main.p1 ${OBJECTDIR}/HT16K33.p1 ${OBJECTDIR}/TIMER.p1 ${OBJECTDIR}/SMT6500.p1 ${OBJECTDIR}/IOC.p1
POSSIBLE_DEPFILES=${OBJECTDIR}/I2C1.p1.d ${OBJECTDIR}/INTERRUPTS.p1.d ${OBJECTDIR}/UART.p1.d ${OBJECTDIR}/main.p1.d ${OBJECTDIR}/HT16K33.p1.d ${OBJECTDIR}/TIMER.p1.d ${OBJECTDIR}/SMT6500.p1.d ${OBJECTDIR}/IOC.p1.d
 
# Object Files
OBJECTFILES=${OBJECTDIR}/I2C1.p1 ${OBJECTDIR}/INTERRUPTS.p1 ${OBJECTDIR}/UART.p1 ${OBJECTDIR}/main.p1 ${OBJECTDIR}/HT16K33.p1 ${OBJECTDIR}/TIMER.p1 ${OBJECTDIR}/SMT6500.p1 ${OBJECTDIR}/IOC.p1
 
# Source Files
SOURCEFILES=I2C1.c INTERRUPTS.c UART.c main.c HT16K33.c TIMER.c SMT6500.c IOC.c
 
 
CFLAGS=
ASFLAGS=
LDLIBSOPTIONS=
 
############# Tool locations ##########################################
# If you copy a project from one host to another, the path where the #
# compiler is installed may be different. #
# If you open this project with MPLAB X in the new host, this #
# makefile will be regenerated and the paths will be corrected. #
#######################################################################
# fixDeps replaces a bunch of sed/cat/printf statements that slow down the build
FIXDEPS=fixDeps
 
.build-conf: ${BUILD_SUBPROJECTS}
${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
 
MP_PROCESSOR_OPTION=16F1825
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/I2C1.p1: I2C1.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/I2C1.p1.d
@${RM} ${OBJECTDIR}/I2C1.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/I2C1.p1 I2C1.c
@-${MV} ${OBJECTDIR}/I2C1.d ${OBJECTDIR}/I2C1.p1.d
@${FIXDEPS} ${OBJECTDIR}/I2C1.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/INTERRUPTS.p1: INTERRUPTS.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/INTERRUPTS.p1.d
@${RM} ${OBJECTDIR}/INTERRUPTS.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/INTERRUPTS.p1 INTERRUPTS.c
@-${MV} ${OBJECTDIR}/INTERRUPTS.d ${OBJECTDIR}/INTERRUPTS.p1.d
@${FIXDEPS} ${OBJECTDIR}/INTERRUPTS.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/UART.p1: UART.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/UART.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/main.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/HT16K33.p1: HT16K33.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/HT16K33.p1.d
@${RM} ${OBJECTDIR}/HT16K33.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/HT16K33.p1 HT16K33.c
@-${MV} ${OBJECTDIR}/HT16K33.d ${OBJECTDIR}/HT16K33.p1.d
@${FIXDEPS} ${OBJECTDIR}/HT16K33.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/TIMER.p1: TIMER.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/TIMER.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/SMT6500.p1: SMT6500.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/SMT6500.p1.d
@${RM} ${OBJECTDIR}/SMT6500.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/SMT6500.p1 SMT6500.c
@-${MV} ${OBJECTDIR}/SMT6500.d ${OBJECTDIR}/SMT6500.p1.d
@${FIXDEPS} ${OBJECTDIR}/SMT6500.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/IOC.p1: IOC.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/IOC.p1.d
@${RM} ${OBJECTDIR}/IOC.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/IOC.p1 IOC.c
@-${MV} ${OBJECTDIR}/IOC.d ${OBJECTDIR}/IOC.p1.d
@${FIXDEPS} ${OBJECTDIR}/IOC.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
else
${OBJECTDIR}/I2C1.p1: I2C1.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/I2C1.p1.d
@${RM} ${OBJECTDIR}/I2C1.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/I2C1.p1 I2C1.c
@-${MV} ${OBJECTDIR}/I2C1.d ${OBJECTDIR}/I2C1.p1.d
@${FIXDEPS} ${OBJECTDIR}/I2C1.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/INTERRUPTS.p1: INTERRUPTS.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/INTERRUPTS.p1.d
@${RM} ${OBJECTDIR}/INTERRUPTS.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/INTERRUPTS.p1 INTERRUPTS.c
@-${MV} ${OBJECTDIR}/INTERRUPTS.d ${OBJECTDIR}/INTERRUPTS.p1.d
@${FIXDEPS} ${OBJECTDIR}/INTERRUPTS.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/UART.p1: UART.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/UART.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/main.p1: main.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/main.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/HT16K33.p1: HT16K33.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/HT16K33.p1.d
@${RM} ${OBJECTDIR}/HT16K33.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/HT16K33.p1 HT16K33.c
@-${MV} ${OBJECTDIR}/HT16K33.d ${OBJECTDIR}/HT16K33.p1.d
@${FIXDEPS} ${OBJECTDIR}/HT16K33.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/TIMER.p1: TIMER.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/TIMER.p1.d
@${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%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}../
${OBJECTDIR}/SMT6500.p1: SMT6500.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/SMT6500.p1.d
@${RM} ${OBJECTDIR}/SMT6500.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/SMT6500.p1 SMT6500.c
@-${MV} ${OBJECTDIR}/SMT6500.d ${OBJECTDIR}/SMT6500.p1.d
@${FIXDEPS} ${OBJECTDIR}/SMT6500.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/IOC.p1: IOC.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${OBJECTDIR}
@${RM} ${OBJECTDIR}/IOC.p1.d
@${RM} ${OBJECTDIR}/IOC.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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: (%%n) %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -o${OBJECTDIR}/IOC.p1 IOC.c
@-${MV} ${OBJECTDIR}/IOC.d ${OBJECTDIR}/IOC.p1.d
@${FIXDEPS} ${OBJECTDIR}/IOC.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
endif
 
# ------------------------------------------------------------------------------------
# Rules for buildStep: assemble
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
else
endif
 
# ------------------------------------------------------------------------------------
# Rules for buildStep: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${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 -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.hex
else
dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${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 -mdist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${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:multilocs --stack=compiled:auto:auto "--errformat=%%f:%%l: error: %%s" "--warnformat=%%f:%%l: warning: (%%n) %%s" "--msgformat=%%f:%%l: advisory: (%%n) %%s" -odist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
endif
 
 
# Subprojects
.build-subprojects:
 
 
# Subprojects
.clean-subprojects:
 
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r build/default
${RM} -r dist/default
 
# Enable dependency checking
.dep.inc: .depcheck-impl
 
DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Makefile-genesis.properties
0,0 → 1,8
#
#Sun Nov 16 18:54:24 EST 2014
default.languagetoolchain.dir=C\:\\Program Files (x86)\\Microchip\\xc8\\v1.32\\bin
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=1f98a0eed69cb2a45c12981fa9470927
default.languagetoolchain.version=1.32
host.platform=windows
conf.ids=default
default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=52258db7536b2d1fec300cefc7ed9230
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Makefile-impl.mk
0,0 → 1,69
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a pre- and a post- target defined where you can add customization code.
#
# This makefile implements macros and targets common to all configurations.
#
# NOCDDL
 
 
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
# and .clean-reqprojects-conf unless SUB has the value 'no'
SUB_no=NO
SUBPROJECTS=${SUB_${SUB}}
BUILD_SUBPROJECTS_=.build-subprojects
BUILD_SUBPROJECTS_NO=
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
CLEAN_SUBPROJECTS_=.clean-subprojects
CLEAN_SUBPROJECTS_NO=
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
 
 
# Project Name
PROJECTNAME=PICX_16F1825_SMT6500_Ultrasonic
 
# Active Configuration
DEFAULTCONF=default
CONF=${DEFAULTCONF}
 
# All Configurations
ALLCONFS=default
 
 
# build
.build-impl: .build-pre
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-conf
 
 
# clean
.clean-impl: .clean-pre
${MAKE} -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .clean-conf
 
# clobber
.clobber-impl: .clobber-pre .depcheck-impl
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default clean
 
 
 
# all
.all-impl: .all-pre .depcheck-impl
${MAKE} SUBPROJECTS=${SUBPROJECTS} CONF=default build
 
 
 
# dependency checking support
.depcheck-impl:
# @echo "# This code depends on make tool being used" >.dep.inc
# @if [ -n "${MAKE_VERSION}" ]; then \
# echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES}))" >>.dep.inc; \
# echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \
# echo "include \$${DEPFILES}" >>.dep.inc; \
# echo "endif" >>.dep.inc; \
# else \
# echo ".KEEP_STATE:" >>.dep.inc; \
# echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \
# fi
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Makefile-local-default.mk
0,0 → 1,37
#
# Generated Makefile - do not edit!
#
#
# This file contains information about the location of compilers and other tools.
# If you commmit this file into your revision control server, you will be able to
# to checkout the project and build it from the command line with make. However,
# if more than one person works on the same project, then this file might show
# conflicts since different users are bound to have compilers in different places.
# In that case you might choose to not commit this file and let MPLAB X recreate this file
# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
# least once so the file gets created and the project can be built. Finally, you can also
# avoid using this file at all if you are only building from the command line with make.
# You can invoke make with the values of the macros:
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
#
SHELL=cmd.exe
PATH_TO_IDE_BIN=C:/Program Files (x86)/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/
# 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.7.0_25-windows-x64\java-windows/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="C:\Program Files (x86)\Microchip\xc8\v1.32\bin\xc8.exe"
# MP_CPPC is not defined
# MP_BC is not defined
# MP_AS is not defined
# 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.32\bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
# MP_AS_DIR is not defined
# MP_LD_DIR is not defined
# MP_AR_DIR is not defined
# MP_BC_DIR is not defined
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Makefile-variables.mk
0,0 → 1,13
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=PICX_16F1825_SMT6500_Ultrasonic.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/PICX_16F1825_SMT6500_Ultrasonic.production.hex
CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
CND_PACKAGE_NAME_default=picx16f1825smt6500ultrasonic.tar
CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/picx16f1825smt6500ultrasonic.tar
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/Package-default.bash
0,0 → 1,73
#!/bin/bash -x
 
#
# Generated - do not edit!
#
 
# Macros
TOP=`pwd`
CND_CONF=default
CND_DISTDIR=dist
TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
TMPDIRNAME=tmp-packaging
OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
OUTPUT_BASENAME=PICX_16F1825_SMT6500_Ultrasonic.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
PACKAGE_TOP_DIR=picx16f1825smt6500ultrasonic/
 
# Functions
function checkReturnCode
{
rc=$?
if [ $rc != 0 ]
then
exit $rc
fi
}
function makeDirectory
# $1 directory path
# $2 permission (optional)
{
mkdir -p "$1"
checkReturnCode
if [ "$2" != "" ]
then
chmod $2 "$1"
checkReturnCode
fi
}
function copyFileToTmpDir
# $1 from-file path
# $2 to-file path
# $3 permission
{
cp "$1" "$2"
checkReturnCode
if [ "$3" != "" ]
then
chmod $3 "$2"
checkReturnCode
fi
}
 
# Setup
cd "${TOP}"
mkdir -p ${CND_DISTDIR}/${CND_CONF}/package
rm -rf ${TMPDIR}
mkdir -p ${TMPDIR}
 
# Copy files and create directories and links
cd "${TOP}"
makeDirectory ${TMPDIR}/picx16f1825smt6500ultrasonic/bin
copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
 
 
# Generate tar file
cd "${TOP}"
rm -f ${CND_DISTDIR}/${CND_CONF}/package/picx16f1825smt6500ultrasonic.tar
cd ${TMPDIR}
tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/picx16f1825smt6500ultrasonic.tar *
checkReturnCode
 
# Cleanup
cd "${TOP}"
rm -rf ${TMPDIR}
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/configurations.xml
0,0 → 1,173
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<logicalFolder name="root" displayName="root" projectFiles="true">
<logicalFolder name="HeaderFiles"
displayName="Header Files"
projectFiles="true">
<itemPath>I2C1.h</itemPath>
<itemPath>INTERRUPTS.h</itemPath>
<itemPath>UART.h</itemPath>
<itemPath>defines.h</itemPath>
<itemPath>HT16K33.h</itemPath>
<itemPath>TIMER.h</itemPath>
<itemPath>SMT6500.h</itemPath>
<itemPath>IOC.h</itemPath>
</logicalFolder>
<logicalFolder name="LinkerScript"
displayName="Linker Files"
projectFiles="true">
</logicalFolder>
<logicalFolder name="SourceFiles"
displayName="Source Files"
projectFiles="true">
<itemPath>I2C1.c</itemPath>
<itemPath>INTERRUPTS.c</itemPath>
<itemPath>UART.c</itemPath>
<itemPath>main.c</itemPath>
<itemPath>HT16K33.c</itemPath>
<itemPath>TIMER.c</itemPath>
<itemPath>SMT6500.c</itemPath>
<itemPath>IOC.c</itemPath>
</logicalFolder>
<logicalFolder name="ExternalFiles"
displayName="Important Files"
projectFiles="false">
<itemPath>Makefile</itemPath>
</logicalFolder>
</logicalFolder>
<projectmakefile>Makefile</projectmakefile>
<confs>
<conf name="default" type="2">
<toolsSet>
<developmentServer>localhost</developmentServer>
<targetDevice>PIC16F1825</targetDevice>
<targetHeader></targetHeader>
<targetPluginBoard></targetPluginBoard>
<platformTool>PICkit3PlatformTool</platformTool>
<languageToolchain>XC8</languageToolchain>
<languageToolchainVersion>1.32</languageToolchainVersion>
<platform>3</platform>
</toolsSet>
<compileType>
<linkerTool>
<linkerLibItems>
</linkerLibItems>
</linkerTool>
<loading>
<useAlternateLoadableFile>false</useAlternateLoadableFile>
<alternateLoadableFile></alternateLoadableFile>
</loading>
</compileType>
<makeCustomizationType>
<makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
<makeCustomizationPreStep></makeCustomizationPreStep>
<makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
<makeCustomizationPostStep></makeCustomizationPostStep>
<makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
<makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
<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"/>
<property key="operation-mode" value="free"/>
<property key="opt-xc8-compiler-strict_ansi" value="false"/>
<property key="optimization-assembler" value="true"/>
<property key="optimization-assembler-files" value="true"/>
<property key="optimization-debug" value="false"/>
<property key="optimization-global" value="true"/>
<property key="optimization-level" value="9"/>
<property key="optimization-set" value="default"/>
<property key="optimization-speed" value="true"/>
<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"/>
</HI-TECH-COMP>
<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=""/>
<property key="additional-options-use-response-files" value="false"/>
<property key="backup-reset-condition-flags" value="false"/>
<property key="calibrate-oscillator" value="true"/>
<property key="calibrate-oscillator-value" value=""/>
<property key="clear-bss" value="true"/>
<property key="code-model-external" value="wordwrite"/>
<property key="code-model-rom" value=""/>
<property key="create-html-files" value="false"/>
<property key="data-model-ram" value=""/>
<property key="data-model-size-of-double" value="24"/>
<property key="data-model-size-of-float" value="24"/>
<property key="display-class-usage" value="false"/>
<property key="display-hex-usage" value="false"/>
<property key="display-overall-usage" value="true"/>
<property key="display-psect-usage" value="false"/>
<property key="fill-flash-options-addr" value=""/>
<property key="fill-flash-options-const" value=""/>
<property key="fill-flash-options-how" value="0"/>
<property key="fill-flash-options-inc-const" value="1"/>
<property key="fill-flash-options-increment" value=""/>
<property key="fill-flash-options-seq" value=""/>
<property key="fill-flash-options-what" value="0"/>
<property key="format-hex-file-for-download" value="false"/>
<property key="initialize-data" value="true"/>
<property key="keep-generated-startup.as" value="false"/>
<property key="link-in-c-library" value="true"/>
<property key="link-in-peripheral-library" value="true"/>
<property key="managed-stack" value="false"/>
<property key="opt-xc8-linker-file" value="false"/>
<property key="opt-xc8-linker-link_startup" value="false"/>
<property key="opt-xc8-linker-serial" value=""/>
<property key="program-the-device-with-default-config-words" value="true"/>
</HI-TECH-LINK>
<PICkit3PlatformTool>
<property key="AutoSelectMemRanges" value="auto"/>
<property key="Freeze Peripherals" value="true"/>
<property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
<property key="ToolFirmwareFilePath"
value="Press to browse for a specific firmware version"/>
<property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
<property key="hwtoolclock.frcindebug" value="false"/>
<property key="memories.aux" value="false"/>
<property key="memories.bootflash" value="true"/>
<property key="memories.configurationmemory" value="true"/>
<property key="memories.eeprom" value="true"/>
<property key="memories.flashdata" value="true"/>
<property key="memories.id" value="true"/>
<property key="memories.programmemory" value="true"/>
<property key="memories.programmemory.end" value="0x1fff"/>
<property key="memories.programmemory.start" value="0x0"/>
<property key="poweroptions.powerenable" value="false"/>
<property key="programmertogo.imagename" value=""/>
<property key="programoptions.eraseb4program" value="true"/>
<property key="programoptions.pgmspeed" value="2"/>
<property key="programoptions.preserveeeprom" value="false"/>
<property key="programoptions.preserveprogramrange" value="false"/>
<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="advanced-elf" value="true"/>
<property key="output-file-format" value="-mcof,+elf"/>
<property key="stack-size-high" value="auto"/>
<property key="stack-size-low" value="auto"/>
<property key="stack-size-main" value="auto"/>
<property key="stack-type" value="compiled"/>
</XC8-config-global>
</conf>
</confs>
</configurationDescriptor>
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/private/configurations.xml
0,0 → 1,25
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="62">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>900A:=&lt;rev>0002:=&lt;man>Microchip Technology Inc.:=&lt;prod>PICkit 3:=&lt;sn>BUR114189291:=&lt;drv>x:=&lt;xpt>h:=end</platformToolSN>
<languageToolchainDir>C:\Program Files (x86)\Microchip\xc8\v1.32\bin</languageToolchainDir>
<mdbdebugger version="1">
<placeholder1>place holder 1</placeholder1>
<placeholder2>place holder 2</placeholder2>
</mdbdebugger>
<runprofile version="6">
<args></args>
<rundir></rundir>
<buildfirst>true</buildfirst>
<console-type>0</console-type>
<terminal-type>0</terminal-type>
<remove-instrumentation>0</remove-instrumentation>
<environment>
</environment>
</runprofile>
</conf>
</confs>
</configurationDescriptor>
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/private/private.properties
--- PICX_16F1825_SMT6500_Ultrasonic/nbproject/private/private.xml (nonexistent)
+++ PICX_16F1825_SMT6500_Ultrasonic/nbproject/private/private.xml (revision 329)
@@ -0,0 +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"/>
+</project-private>
/PIC Stuff/PICX_16F1825_SMT6500_Ultrasonic/nbproject/project.properties
--- PICX_16F1825_SMT6500_Ultrasonic/nbproject/project.xml (nonexistent)
+++ PICX_16F1825_SMT6500_Ultrasonic/nbproject/project.xml (revision 329)
@@ -0,0 +1,16 @@
+<?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">
+ <name>PICX_16F1825_SMT6500_Ultrasonic</name>
+ <creation-uuid>c6cdd3b9-ae67-442b-be12-227aa291caac</creation-uuid>
+ <make-project-type>0</make-project-type>
+ <c-extensions>c</c-extensions>
+ <cpp-extensions/>
+ <header-extensions>h</header-extensions>
+ <asminc-extensions/>
+ <sourceEncoding>ISO-8859-1</sourceEncoding>
+ <make-dep-projects/>
+ </data>
+ </configuration>
+</project>