aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lab6.X/circBuffer.c53
-rw-r--r--Lab6.X/circBuffer.h38
-rw-r--r--Lab6.X/dist/default/production/memoryfile.xml36
-rw-r--r--Lab6.X/lab6_main.c195
-rw-r--r--Lab6.X/nbproject/Makefile-genesis.properties20
-rw-r--r--Lab6.X/nbproject/configurations.xml449
-rw-r--r--Lab6.X/nbproject/private/configurations.xml50
7 files changed, 414 insertions, 427 deletions
diff --git a/Lab6.X/circBuffer.c b/Lab6.X/circBuffer.c
index d4d120f..6ce4ee0 100644
--- a/Lab6.X/circBuffer.c
+++ b/Lab6.X/circBuffer.c
@@ -1,28 +1,25 @@
-#include "xc.h"
-#include "circBuffer.h"
-#define SIZE 1024
-
-volatile unsigned int buffer[SIZE];
-int buffSize = 0, write = 0, read = 0;
-void initBuffer(){
- int i;
- for (i=0; i<SIZE; i++) {
- buffer[i]=0;
- }
- buffSize = 0, write = 0, read = 0;
-}
-
-void putVal(int newValue){
- if (buffSize < SIZE) {
- buffer[write++] = newValue;
- write %= SIZE;
- ++buffSize;
- }
- //Otherwise get rid of the data.
-}
-int getAvg(){
- int i, sum = 0;
- for (i=0; i<SIZE; i++) {
- sum += buffer[i];
- } return sum / SIZE;
-}
+#include "xc.h"
+#include "circBuffer.h"
+#define SIZE 1024
+
+volatile unsigned long buffer[SIZE];
+int buffSize = 0;
+void initBuffer(){
+ int i;
+ for (i=0; i<SIZE; i++) {
+ buffer[i]=0;
+ }
+ buffSize = 0;
+}
+
+void putVal(long newValue){
+ buffer[buffSize++] = newValue;
+ if (buffSize > SIZE)
+ buffSize = 0;
+}
+long getAvg(){
+ int i, sum = 0;
+ for (i=0; i<SIZE; i++) {
+ sum += buffer[i];
+ } return sum / SIZE;
+}
diff --git a/Lab6.X/circBuffer.h b/Lab6.X/circBuffer.h
index ad5f1fd..74f8386 100644
--- a/Lab6.X/circBuffer.h
+++ b/Lab6.X/circBuffer.h
@@ -1,19 +1,19 @@
-#ifndef CIRCBUFF_H
-#define CIRCBUFF_H
-
-#include <xc.h> // include processor files - each processor file is guarded.
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-void putVal(int newValue); // add a new value to the buffer
-int getAvg(); // average all buffer vals
-void initBuffer(); // set all buffer vals to zero
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif
-
+#ifndef CIRCBUFF_H
+#define CIRCBUFF_H
+
+#include <xc.h> // include processor files - each processor file is guarded.
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+void putVal(long newValue); // add a new value to the buffer
+long getAvg(); // average all buffer vals
+void initBuffer(); // set all buffer vals to zero
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif
+
diff --git a/Lab6.X/dist/default/production/memoryfile.xml b/Lab6.X/dist/default/production/memoryfile.xml
index e8d8e00..0c0496e 100644
--- a/Lab6.X/dist/default/production/memoryfile.xml
+++ b/Lab6.X/dist/default/production/memoryfile.xml
@@ -1,18 +1,18 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project>
- <executable name="dist/default/production/Lab6.X.production.elf">
- <memory name="data">
- <units>bytes</units>
- <length>8192</length>
- <used>2176</used>
- <free>6016</free>
- </memory>
- <memory name="program">
- <units>bytes</units>
- <length>65274</length>
- <used>8088</used>
- <free>57186</free>
- </memory>
- </executable>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+
+<project>
+ <executable name="dist/default/production/Lab6.X.production.elf">
+ <memory name="data">
+ <units>bytes</units>
+ <length>8192</length>
+ <used>4216</used>
+ <free>3976</free>
+ </memory>
+ <memory name="program">
+ <units>bytes</units>
+ <length>65274</length>
+ <used>8025</used>
+ <free>57249</free>
+ </memory>
+ </executable>
+</project>
diff --git a/Lab6.X/lab6_main.c b/Lab6.X/lab6_main.c
index e9258c4..7d46cd0 100644
--- a/Lab6.X/lab6_main.c
+++ b/Lab6.X/lab6_main.c
@@ -1,103 +1,92 @@
-#include "xc.h"
-#include "../Lab5.X/lab5_lcd.h"
-#include "circBuffer.h"
-#include <stdio.h>
-
-#pragma config ICS = PGx1 // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1)
-#pragma config FWDTEN = OFF // Watchdog Timer Enable (Watchdog Timer is disabled)
-#pragma config GWRP = OFF // General Code Segment Write Protect (Writes to program memory are allowed)
-#pragma config GCP = OFF // General Code Segment Code Protect (Code protection is disabled)
-#pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled)
-
-// CW2: FLASH CONFIGURATION WORD 2 (see PIC24 Family Reference Manual 24.1)
-#pragma config I2C1SEL = PRI // I2C1 Pin Location Select (Use default SCL1/SDA1 pins)
-#pragma config IOL1WAY = OFF // IOLOCK Protection (IOLOCK may be changed via unlocking seq)
-#pragma config OSCIOFNC = ON // Primary Oscillator I/O Function (CLKO/RC15 functions as I/O pin)
-#pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled,
- // Fail-Safe Clock Monitor is enabled)
-#pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL))
-
-void setup(void) {
- CLKDIVbits.RCDIV = 0;
- AD1PCFG = 0x9fff; //all digital inputs and outputs
- initBuffer();
- lcd_init();
- lcd_setCursor(0,0);
-
- // -- I2C STUFF --
- I2C2BRG = 0x9D;
- I2C2CONbits.I2CEN = 1;
- _I2CSIDL = 0;
- IFS3bits.MI2C2IF=0;
-
- // -- ADC STUFF --
- AD1CON1 = 0; // set all control to 0.
- AD1CON1bits.SSRC = 0b010; //Rollover to conversion
- AD1CON1bits.ASAM = 1; // auto-sample
- AD1CON1bits.FORM = 0b00;
- AD1CON2 = 0;
- AD1CON2bits.CSCNA = 0; // no scan
- AD1CON2bits.SMPI = 0b0; // every conversion
- AD1CON2bits.BUFM = 0; // two 8-word buffers
- AD1CON3bits.ADCS = 0b1;
- AD1CON3bits.ADRC = 0;
- AD1CON3bits.SAMC = 0b1;
- AD1CON1bits.ADON = 1; // ton
- AD1CHS = 0;
- AD1CHSbits.CH0NB = 0;
- AD1CHSbits.CH0SB = 0;
- AD1CHSbits.CH0NA = 0;
- AD1CHSbits.CH0SA = 0;
-
- // -- TIMER 2 STUFF --
- T2CON = 0;
- TMR2 = 0;
- T2CONbits.TCKPS = 0b10;
- PR2 = 25000;
- T2CONbits.TON = 1;
-
- // -- TIMER 3 STUFF --
- T3CON = 0;
- TMR3 = 0;
- T3CONbits.TCKPS = 0b10;
- PR3 = 1562;
- T3CONbits.TON = 1;
-
- // -- INTERRUPT ENABLES --
- IEC0bits.AD1IE = 1;
- IFS0bits.AD1IF = 0;
- //ADC Interrupt (Enabled)
- IEC0bits.T2IE = 1;
- IFS0bits.T2IF = 0;
- // T2 Interrupt (Enabled)
-}
-
-volatile unsigned int *ADCpointer = &ADC1BUF0, ADCvalue = 0;
-void __attribute__((__interrupt__, __auto_psv__)) _ADC1Interrupt(void) {
- IFS0bits.AD1IF = 0;
-
-
-}
-volatile unsigned char flag = 0;
-void __attribute__((__interrupt__, __auto_psv__)) _T2Interrupt(void) {
- //Allow writing to LCD
- _T2IF = 0;
- TMR2 = 0;
- flag = 1;
-}
-
-int main(void) {
- setup();
- while (1) {
- char adStr[20];
- unsigned long adValue;
- if (flag) {
- flag = 0;
- lcd_setCursor(0,0);
- adValue = getAvg();
- sprintf(adStr, "%6.4f V", (3.3/1024)*adValue);
- lcd_printStr(adStr);
- }
- }
- return -1;
-}
+#include "xc.h"
+#include <stdio.h>
+#include "../Lab5.X/lab5_lcd.h"
+
+
+#pragma config ICS = PGx1 // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1)
+#pragma config FWDTEN = OFF // Watchdog Timer Enable (Watchdog Timer is disabled)
+#pragma config GWRP = OFF // General Code Segment Write Protect (Writes to program memory are allowed)
+#pragma config GCP = OFF // General Code Segment Code Protect (Code protection is disabled)
+#pragma config JTAGEN = OFF // JTAG Port Enable (JTAG port is disabled)
+
+// CW2: FLASH CONFIGURATION WORD 2 (see PIC24 Family Reference Manual 24.1)
+#pragma config I2C1SEL = PRI // I2C1 Pin Location Select (Use default SCL1/SDA1 pins)
+#pragma config IOL1WAY = OFF // IOLOCK Protection (IOLOCK may be changed via unlocking seq)
+#pragma config OSCIOFNC = ON // Primary Oscillator I/O Function (CLKO/RC15 functions as I/O pin)
+#pragma config FCKSM = CSECME // Clock Switching and Monitor (Clock switching is enabled,
+ // Fail-Safe Clock Monitor is enabled)
+#pragma config FNOSC = FRCPLL // Oscillator Select (Fast RC Oscillator with PLL module (FRCPLL))
+
+void setup(void) {
+ CLKDIVbits.RCDIV = 0;
+ AD1PCFG = 0x9FFE; //AN1 analog
+ TRISA |= 1;;
+
+ // -- I2C STUFF --
+ I2C2BRG = 0x9D;
+ I2C2CONbits.I2CEN = 1;
+ _I2CSIDL = 0;
+ IFS3bits.MI2C2IF=0;
+ lcd_init();
+
+ // -- ADC STUFF --
+ AD1CON1 = 0; // set all control to 0.
+ AD1CON1bits.SSRC = 0b010; //Rollover to conversion
+ AD1CON1bits.ASAM = 1; // auto-sample
+ AD1CON1bits.FORM = 0b00;
+ AD1CON2 = 0;
+ AD1CON2bits.CSCNA = 0; // no scan
+ AD1CON2bits.SMPI = 0b0; // every conversion
+ AD1CON2bits.BUFM = 0; // two 8-word buffers
+ AD1CON3bits.ADCS = 0b1;
+ AD1CON3bits.ADRC = 0;
+ AD1CON3bits.SAMC = 0b1;
+ AD1CON1bits.ADON = 1; // ton
+ AD1CHS = 0;
+ AD1CHSbits.CH0NB = 0;
+ AD1CHSbits.CH0SB = 0;
+ AD1CHSbits.CH0NA = 0;
+ AD1CHSbits.CH0SA = 0;
+
+ // -- TIMER 2 STUFF --
+ T2CON = 0;
+ TMR2 = 0;
+ T2CONbits.TCKPS = 0b10;
+ PR2 = 25000;
+ T2CONbits.TON = 1;
+
+ // -- TIMER 3 STUFF --
+ T3CON = 0;
+ TMR3 = 0;
+ T3CONbits.TCKPS = 0b10;
+ PR3 = 1562;
+ T3CONbits.TON = 1;
+
+ // -- INTERRUPT ENABLES --
+ IEC0bits.AD1IE = 1;
+ IFS0bits.AD1IF = 0;
+ //ADC Interrupt (Enabled)
+ IEC0bits.T2IE = 1;
+ IFS0bits.T2IF = 0;
+ // T2 Interrupt (Enabled)
+}
+
+void __attribute__((__interrupt__, __auto_psv__)) _ADC1Interrupt(void) {
+ IFS0bits.AD1IF = 0;
+ //This interrupt only serves to allow the ADC to work as intended.
+
+}
+unsigned char flag = 0;
+void __attribute__((__interrupt__, __auto_psv__)) _T2Interrupt(void) {
+ _T2IF = 0; TMR2 = 0;
+ char adStr[20];
+ lcd_setCursor(0,0);
+ sprintf(adStr, "%6.4f V", (3.3/1024)*ADC1BUF0);
+ lcd_printStr(adStr);
+}
+
+int main(void) {
+ setup();
+ while (1);
+ return -1;
+}
diff --git a/Lab6.X/nbproject/Makefile-genesis.properties b/Lab6.X/nbproject/Makefile-genesis.properties
index d6d71c3..f6d3f87 100644
--- a/Lab6.X/nbproject/Makefile-genesis.properties
+++ b/Lab6.X/nbproject/Makefile-genesis.properties
@@ -1,10 +1,10 @@
-#
-#Fri Apr 17 20:22:52 CDT 2020
-default.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.35\\packs\\Microchip\\PIC24F-GA-GB_DFP\\1.2.101
-default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=859fc649e7017fd01769e2187e1537a7
-default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.50\\bin
-configurations-xml=adb813cd4ce7c3e3b7bbe8664d6b0b98
-com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5db0f4d6bbe0ec2a1f1096ccfb9d7ad3
-default.languagetoolchain.version=1.50
-host.platform=windows
-conf.ids=default
+#
+#Fri Apr 24 14:35:39 CDT 2020
+default.Pack.dfplocation=C\:\\Program Files (x86)\\Microchip\\MPLABX\\v5.35\\packs\\Microchip\\PIC24F-GA-GB_DFP\\1.2.101
+default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=859fc649e7017fd01769e2187e1537a7
+default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.50\\bin
+configurations-xml=e2a041a657844a3c50448a1abf14139b
+com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=5db0f4d6bbe0ec2a1f1096ccfb9d7ad3
+default.languagetoolchain.version=1.50
+host.platform=windows
+conf.ids=default
diff --git a/Lab6.X/nbproject/configurations.xml b/Lab6.X/nbproject/configurations.xml
index 5c9fd0e..89e7382 100644
--- a/Lab6.X/nbproject/configurations.xml
+++ b/Lab6.X/nbproject/configurations.xml
@@ -1,224 +1,225 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configurationDescriptor version="65">
- <logicalFolder name="root" displayName="root" projectFiles="true">
- <logicalFolder name="HeaderFiles"
- displayName="Header Files"
- projectFiles="true">
- <itemPath>circBuffer.h</itemPath>
- </logicalFolder>
- <logicalFolder name="LinkerScript"
- displayName="Linker Files"
- projectFiles="true">
- </logicalFolder>
- <logicalFolder name="SourceFiles"
- displayName="Source Files"
- projectFiles="true">
- <itemPath>lab6_main.c</itemPath>
- <itemPath>circBuffer.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>PIC24FJ64GA002</targetDevice>
- <targetHeader></targetHeader>
- <targetPluginBoard></targetPluginBoard>
- <platformTool>PK3OBPlatformTool</platformTool>
- <languageToolchain>XC16</languageToolchain>
- <languageToolchainVersion>1.50</languageToolchainVersion>
- <platform>3</platform>
- </toolsSet>
- <packs>
- <pack name="PIC24F-GA-GB_DFP" vendor="Microchip" version="1.2.101"/>
- </packs>
- <compileType>
- <linkerTool>
- <linkerLibItems>
- <linkerLibFileItem>../Lab5.X/lab5_lcd.c</linkerLibFileItem>
- <linkerLibFileItem>../Lab5.X/lab5_lcd.h</linkerLibFileItem>
- </linkerLibItems>
- </linkerTool>
- <archiverTool>
- </archiverTool>
- <loading>
- <useAlternateLoadableFile>false</useAlternateLoadableFile>
- <parseOnProdLoad>false</parseOnProdLoad>
- <alternateLoadableFile></alternateLoadableFile>
- </loading>
- <subordinates>
- </subordinates>
- </compileType>
- <makeCustomizationType>
- <makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
- <makeCustomizationPreStep></makeCustomizationPreStep>
- <makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
- <makeCustomizationPostStep></makeCustomizationPostStep>
- <makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
- <makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
- <makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
- </makeCustomizationType>
- <C30>
- <property key="code-model" value="default"/>
- <property key="const-model" value="default"/>
- <property key="data-model" value="default"/>
- <property key="disable-instruction-scheduling" value="false"/>
- <property key="enable-all-warnings" value="true"/>
- <property key="enable-ansi-std" value="false"/>
- <property key="enable-ansi-warnings" value="false"/>
- <property key="enable-fatal-warnings" value="false"/>
- <property key="enable-large-arrays" value="false"/>
- <property key="enable-omit-frame-pointer" value="false"/>
- <property key="enable-procedural-abstraction" value="false"/>
- <property key="enable-short-double" value="false"/>
- <property key="enable-symbols" value="true"/>
- <property key="enable-unroll-loops" value="false"/>
- <property key="extra-include-directories" value=""/>
- <property key="isolate-each-function" value="false"/>
- <property key="keep-inline" value="false"/>
- <property key="oXC16gcc-align-arr" value="false"/>
- <property key="oXC16gcc-cnsts-mauxflash" value="false"/>
- <property key="oXC16gcc-data-sects" value="false"/>
- <property key="oXC16gcc-errata" value=""/>
- <property key="oXC16gcc-fillupper" value=""/>
- <property key="oXC16gcc-large-aggregate" value="false"/>
- <property key="oXC16gcc-mauxflash" value="false"/>
- <property key="oXC16gcc-mpa-lvl" value=""/>
- <property key="oXC16gcc-name-text-sec" value=""/>
- <property key="oXC16gcc-near-chars" value="false"/>
- <property key="oXC16gcc-no-isr-warn" value="false"/>
- <property key="oXC16gcc-sfr-warn" value="false"/>
- <property key="oXC16gcc-smar-io-lvl" value="1"/>
- <property key="oXC16gcc-smart-io-fmt" value=""/>
- <property key="optimization-level" value="0"/>
- <property key="post-instruction-scheduling" value="default"/>
- <property key="pre-instruction-scheduling" value="default"/>
- <property key="preprocessor-macros" value=""/>
- <property key="scalar-model" value="default"/>
- <property key="use-cci" value="false"/>
- <property key="use-iar" value="false"/>
- </C30>
- <C30-AR>
- <property key="additional-options-chop-files" value="false"/>
- </C30-AR>
- <C30-AS>
- <property key="assembler-symbols" value=""/>
- <property key="expand-macros" value="false"/>
- <property key="extra-include-directories-for-assembler" value=""/>
- <property key="extra-include-directories-for-preprocessor" value=""/>
- <property key="false-conditionals" value="false"/>
- <property key="keep-locals" value="false"/>
- <property key="list-assembly" value="false"/>
- <property key="list-section-info" value="false"/>
- <property key="list-source" value="false"/>
- <property key="list-symbols" value="false"/>
- <property key="oXC16asm-extra-opts" value=""/>
- <property key="oXC16asm-list-to-file" value="false"/>
- <property key="omit-debug-dirs" value="false"/>
- <property key="omit-forms" value="false"/>
- <property key="preprocessor-macros" value=""/>
- <property key="relax" value="false"/>
- <property key="warning-level" value="emit-warnings"/>
- </C30-AS>
- <C30-CO>
- <property key="coverage-enable" value=""/>
- </C30-CO>
- <C30-LD>
- <property key="additional-options-use-response-files" value="false"/>
- <property key="boot-eeprom" value="no_eeprom"/>
- <property key="boot-flash" value="no_flash"/>
- <property key="boot-ram" value="no_ram"/>
- <property key="boot-write-protect" value="no_write_protect"/>
- <property key="enable-check-sections" value="false"/>
- <property key="enable-data-init" value="true"/>
- <property key="enable-default-isr" value="true"/>
- <property key="enable-handles" value="true"/>
- <property key="enable-pack-data" value="true"/>
- <property key="extra-lib-directories" value=""/>
- <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="general-code-protect" value="no_code_protect"/>
- <property key="general-write-protect" value="no_write_protect"/>
- <property key="generate-cross-reference-file" value="false"/>
- <property key="heap-size" value=""/>
- <property key="input-libraries" value=""/>
- <property key="linker-stack" value="true"/>
- <property key="linker-symbols" value=""/>
- <property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>
- <property key="no-ivt" value="false"/>
- <property key="oXC16ld-extra-opts" value=""/>
- <property key="oXC16ld-fill-upper" value="0"/>
- <property key="oXC16ld-force-link" value="false"/>
- <property key="oXC16ld-no-smart-io" value="false"/>
- <property key="oXC16ld-nostdlib" value="false"/>
- <property key="oXC16ld-stackguard" value="16"/>
- <property key="preprocessor-macros" value=""/>
- <property key="remove-unused-sections" value="false"/>
- <property key="report-memory-usage" value="true"/>
- <property key="secure-eeprom" value="no_eeprom"/>
- <property key="secure-flash" value="no_flash"/>
- <property key="secure-ram" value="no_ram"/>
- <property key="secure-write-protect" value="no_write_protect"/>
- <property key="stack-size" value="16"/>
- <property key="symbol-stripping" value=""/>
- <property key="trace-symbols" value=""/>
- <property key="warn-section-align" value="false"/>
- </C30-LD>
- <C30Global>
- <property key="common-include-directories" value=""/>
- <property key="dual-boot-partition" value="0"/>
- <property key="fast-math" value="false"/>
- <property key="generic-16-bit" value="false"/>
- <property key="legacy-libc" value="true"/>
- <property key="mpreserve-all" value="false"/>
- <property key="oXC16glb-macros" value=""/>
- <property key="omit-pack-options" value="1"/>
- <property key="output-file-format" value="elf"/>
- <property key="preserve-all" value="false"/>
- <property key="preserve-file" value=""/>
- <property key="relaxed-math" value="false"/>
- <property key="save-temps" value="false"/>
- </C30Global>
- <PK3OBPlatformTool>
- <property key="AutoSelectMemRanges" value="auto"/>
- <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="memories.bootflash" value="true"/>
- <property key="memories.configurationmemory" value="true"/>
- <property key="memories.dataflash" value="true"/>
- <property key="memories.eeprom" value="true"/>
- <property key="memories.id" value="true"/>
- <property key="memories.programmemory" value="true"/>
- <property key="memories.programmemory.ranges"
- value="${memories.programmemory.ranges}"/>
- <property key="memories.userotp" value="true"/>
- <property key="poweroptions.powerenable" value="false"/>
- <property key="programoptions.eraseb4program" value="true"/>
- <property key="programoptions.preservedataflash" value="false"/>
- <property key="programoptions.preservedataflash.ranges"
- value="${programoptions.preservedataflash.ranges}"/>
- <property key="programoptions.preserveeeprom" value="false"/>
- <property key="programoptions.preserveeeprom.ranges"
- value="${programoptions.preserveeeprom.ranges}"/>
- <property key="programoptions.preserveprogram.ranges" value=""/>
- <property key="programoptions.preserveprogramrange" value="false"/>
- <property key="programoptions.usehighvoltageonmclr" value="false"/>
- <property key="programoptions.uselvpprogramming" value="false"/>
- <property key="voltagevalue" value="3.25"/>
- </PK3OBPlatformTool>
- </conf>
- </confs>
-</configurationDescriptor>
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="65">
+ <logicalFolder name="root" displayName="root" projectFiles="true">
+ <logicalFolder name="HeaderFiles"
+ displayName="Header Files"
+ projectFiles="true">
+ <itemPath>circBuffer.h</itemPath>
+ </logicalFolder>
+ <logicalFolder name="LinkerScript"
+ displayName="Linker Files"
+ projectFiles="true">
+ </logicalFolder>
+ <logicalFolder name="SourceFiles"
+ displayName="Source Files"
+ projectFiles="true">
+ <itemPath>lab6_main.c</itemPath>
+ <itemPath>circBuffer.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>PIC24FJ64GA002</targetDevice>
+ <targetHeader></targetHeader>
+ <targetPluginBoard></targetPluginBoard>
+ <platformTool>PK3OBPlatformTool</platformTool>
+ <languageToolchain>XC16</languageToolchain>
+ <languageToolchainVersion>1.50</languageToolchainVersion>
+ <platform>3</platform>
+ </toolsSet>
+ <packs>
+ <pack name="PIC24F-GA-GB_DFP" vendor="Microchip" version="1.2.101"/>
+ </packs>
+ <compileType>
+ <linkerTool>
+ <linkerLibItems>
+ <linkerLibFileItem>../Lab5.X/lab5_lcd.c</linkerLibFileItem>
+ <linkerLibFileItem>../Lab5.X/lab5_lcd.h</linkerLibFileItem>
+ </linkerLibItems>
+ </linkerTool>
+ <archiverTool>
+ </archiverTool>
+ <loading>
+ <useAlternateLoadableFile>false</useAlternateLoadableFile>
+ <parseOnProdLoad>false</parseOnProdLoad>
+ <alternateLoadableFile></alternateLoadableFile>
+ </loading>
+ <subordinates>
+ </subordinates>
+ </compileType>
+ <makeCustomizationType>
+ <makeCustomizationPreStepEnabled>false</makeCustomizationPreStepEnabled>
+ <makeCustomizationPreStep></makeCustomizationPreStep>
+ <makeCustomizationPostStepEnabled>false</makeCustomizationPostStepEnabled>
+ <makeCustomizationPostStep></makeCustomizationPostStep>
+ <makeCustomizationPutChecksumInUserID>false</makeCustomizationPutChecksumInUserID>
+ <makeCustomizationEnableLongLines>false</makeCustomizationEnableLongLines>
+ <makeCustomizationNormalizeHexFile>false</makeCustomizationNormalizeHexFile>
+ </makeCustomizationType>
+ <C30>
+ <property key="code-model" value="default"/>
+ <property key="const-model" value="default"/>
+ <property key="data-model" value="default"/>
+ <property key="disable-instruction-scheduling" value="false"/>
+ <property key="enable-all-warnings" value="true"/>
+ <property key="enable-ansi-std" value="false"/>
+ <property key="enable-ansi-warnings" value="false"/>
+ <property key="enable-fatal-warnings" value="false"/>
+ <property key="enable-large-arrays" value="false"/>
+ <property key="enable-omit-frame-pointer" value="false"/>
+ <property key="enable-procedural-abstraction" value="false"/>
+ <property key="enable-short-double" value="false"/>
+ <property key="enable-symbols" value="true"/>
+ <property key="enable-unroll-loops" value="false"/>
+ <property key="extra-include-directories" value=""/>
+ <property key="isolate-each-function" value="false"/>
+ <property key="keep-inline" value="false"/>
+ <property key="oXC16gcc-align-arr" value="false"/>
+ <property key="oXC16gcc-cnsts-mauxflash" value="false"/>
+ <property key="oXC16gcc-data-sects" value="false"/>
+ <property key="oXC16gcc-errata" value=""/>
+ <property key="oXC16gcc-fillupper" value=""/>
+ <property key="oXC16gcc-large-aggregate" value="false"/>
+ <property key="oXC16gcc-mauxflash" value="false"/>
+ <property key="oXC16gcc-mpa-lvl" value=""/>
+ <property key="oXC16gcc-name-text-sec" value=""/>
+ <property key="oXC16gcc-near-chars" value="false"/>
+ <property key="oXC16gcc-no-isr-warn" value="false"/>
+ <property key="oXC16gcc-sfr-warn" value="false"/>
+ <property key="oXC16gcc-smar-io-lvl" value="1"/>
+ <property key="oXC16gcc-smart-io-fmt" value=""/>
+ <property key="optimization-level" value="0"/>
+ <property key="post-instruction-scheduling" value="default"/>
+ <property key="pre-instruction-scheduling" value="default"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="scalar-model" value="default"/>
+ <property key="use-cci" value="false"/>
+ <property key="use-iar" value="false"/>
+ </C30>
+ <C30-AR>
+ <property key="additional-options-chop-files" value="false"/>
+ </C30-AR>
+ <C30-AS>
+ <property key="assembler-symbols" value=""/>
+ <property key="expand-macros" value="false"/>
+ <property key="extra-include-directories-for-assembler" value=""/>
+ <property key="extra-include-directories-for-preprocessor" value=""/>
+ <property key="false-conditionals" value="false"/>
+ <property key="keep-locals" value="false"/>
+ <property key="list-assembly" value="false"/>
+ <property key="list-section-info" value="false"/>
+ <property key="list-source" value="false"/>
+ <property key="list-symbols" value="false"/>
+ <property key="oXC16asm-extra-opts" value=""/>
+ <property key="oXC16asm-list-to-file" value="false"/>
+ <property key="omit-debug-dirs" value="false"/>
+ <property key="omit-forms" value="false"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="relax" value="false"/>
+ <property key="warning-level" value="emit-warnings"/>
+ </C30-AS>
+ <C30-CO>
+ <property key="coverage-enable" value=""/>
+ </C30-CO>
+ <C30-LD>
+ <property key="additional-options-use-response-files" value="false"/>
+ <property key="boot-eeprom" value="no_eeprom"/>
+ <property key="boot-flash" value="no_flash"/>
+ <property key="boot-ram" value="no_ram"/>
+ <property key="boot-write-protect" value="no_write_protect"/>
+ <property key="enable-check-sections" value="false"/>
+ <property key="enable-data-init" value="true"/>
+ <property key="enable-default-isr" value="true"/>
+ <property key="enable-handles" value="true"/>
+ <property key="enable-pack-data" value="true"/>
+ <property key="extra-lib-directories" value=""/>
+ <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="general-code-protect" value="no_code_protect"/>
+ <property key="general-write-protect" value="no_write_protect"/>
+ <property key="generate-cross-reference-file" value="false"/>
+ <property key="heap-size" value=""/>
+ <property key="input-libraries" value=""/>
+ <property key="linker-stack" value="true"/>
+ <property key="linker-symbols" value=""/>
+ <property key="map-file" value="${DISTDIR}/${PROJECTNAME}.${IMAGE_TYPE}.map"/>
+ <property key="no-ivt" value="false"/>
+ <property key="oXC16ld-extra-opts" value=""/>
+ <property key="oXC16ld-fill-upper" value="0"/>
+ <property key="oXC16ld-force-link" value="false"/>
+ <property key="oXC16ld-no-smart-io" value="false"/>
+ <property key="oXC16ld-nostdlib" value="false"/>
+ <property key="oXC16ld-stackguard" value="16"/>
+ <property key="preprocessor-macros" value=""/>
+ <property key="remove-unused-sections" value="false"/>
+ <property key="report-memory-usage" value="true"/>
+ <property key="secure-eeprom" value="no_eeprom"/>
+ <property key="secure-flash" value="no_flash"/>
+ <property key="secure-ram" value="no_ram"/>
+ <property key="secure-write-protect" value="no_write_protect"/>
+ <property key="stack-size" value="16"/>
+ <property key="symbol-stripping" value=""/>
+ <property key="trace-symbols" value=""/>
+ <property key="warn-section-align" value="false"/>
+ </C30-LD>
+ <C30Global>
+ <property key="common-include-directories" value=""/>
+ <property key="dual-boot-partition" value="0"/>
+ <property key="fast-math" value="false"/>
+ <property key="generic-16-bit" value="false"/>
+ <property key="legacy-libc" value="true"/>
+ <property key="mpreserve-all" value="false"/>
+ <property key="oXC16glb-macros" value=""/>
+ <property key="omit-pack-options" value="1"/>
+ <property key="output-file-format" value="elf"/>
+ <property key="preserve-all" value="false"/>
+ <property key="preserve-file" value=""/>
+ <property key="relaxed-math" value="false"/>
+ <property key="save-temps" value="false"/>
+ </C30Global>
+ <PK3OBPlatformTool>
+ <property key="AutoSelectMemRanges" value="auto"/>
+ <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="firmware.download.all" value="false"/>
+ <property key="memories.bootflash" value="true"/>
+ <property key="memories.configurationmemory" value="true"/>
+ <property key="memories.dataflash" value="true"/>
+ <property key="memories.eeprom" value="true"/>
+ <property key="memories.id" value="true"/>
+ <property key="memories.programmemory" value="true"/>
+ <property key="memories.programmemory.ranges"
+ value="${memories.programmemory.ranges}"/>
+ <property key="memories.userotp" value="true"/>
+ <property key="poweroptions.powerenable" value="false"/>
+ <property key="programoptions.eraseb4program" value="true"/>
+ <property key="programoptions.preservedataflash" value="false"/>
+ <property key="programoptions.preservedataflash.ranges"
+ value="${programoptions.preservedataflash.ranges}"/>
+ <property key="programoptions.preserveeeprom" value="false"/>
+ <property key="programoptions.preserveeeprom.ranges"
+ value="${programoptions.preserveeeprom.ranges}"/>
+ <property key="programoptions.preserveprogram.ranges" value=""/>
+ <property key="programoptions.preserveprogramrange" value="false"/>
+ <property key="programoptions.usehighvoltageonmclr" value="false"/>
+ <property key="programoptions.uselvpprogramming" value="false"/>
+ <property key="voltagevalue" value="3.25"/>
+ </PK3OBPlatformTool>
+ </conf>
+ </confs>
+</configurationDescriptor>
diff --git a/Lab6.X/nbproject/private/configurations.xml b/Lab6.X/nbproject/private/configurations.xml
index 099de7b..dbaf381 100644
--- a/Lab6.X/nbproject/private/configurations.xml
+++ b/Lab6.X/nbproject/private/configurations.xml
@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<configurationDescriptor version="65">
- <projectmakefile>Makefile</projectmakefile>
- <defaultConf>0</defaultConf>
- <confs>
- <conf name="default" type="2">
- <platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>8108:=&lt;rev>0002:=&lt;man>Digilent:=&lt;prod>chipKitProgrammer:=&lt;sn>DA63CA1:=&lt;drv>x:=&lt;xpt>h:=end</platformToolSN>
- <languageToolchainDir>C:\Program Files\Microchip\xc16\v1.50\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>
+<?xml version="1.0" encoding="UTF-8"?>
+<configurationDescriptor version="65">
+ <projectmakefile>Makefile</projectmakefile>
+ <defaultConf>0</defaultConf>
+ <confs>
+ <conf name="default" type="2">
+ <platformToolSN>:=MPLABComm-USB-Microchip:=&lt;vid>04D8:=&lt;pid>8108:=&lt;rev>0002:=&lt;man>Digilent:=&lt;prod>chipKitProgrammer:=&lt;sn>DA63CA1:=&lt;drv>x:=&lt;xpt>h:=end</platformToolSN>
+ <languageToolchainDir>C:\Program Files\Microchip\xc16\v1.50\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>