Rewrote all the TNC code to run on a dsPIC.
Rewrote all the TNC code to run on a dsPIC.

--- /dev/null
+++ b/src/APRS_PIC.X/.gitignore
@@ -1,1 +1,23 @@
+*.d
+*.pre
+*.p1
+*.lst
+*.sym
+*.obj
+*.o
+*.sdb
+*.obj.dmp
+html/
+nbproject/private/
+nbproject/Package-*.bash
+build/
+nbbuild/
+dist/
+nbdist/
+nbactions.xml
+nb-configuration.xml
+funclist
+nbproject/Makefile-*
+disassembly/
+*.map 
 

--- /dev/null
+++ b/src/APRS_PIC.X/Makefile
@@ -1,1 +1,114 @@
+#
+#  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
+

--- /dev/null
+++ b/src/APRS_PIC.X/nbproject/configurations.xml
@@ -1,1 +1,274 @@
+<?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>src/console.h</itemPath>
+      <itemPath>src/main.h</itemPath>
+      <itemPath>src/spi.h</itemPath>
+      <itemPath>src/AFSK_Demodulator.h</itemPath>
+      <itemPath>src/AFSK_Modulator.h</itemPath>
+      <itemPath>src/char_ring_buffer.h</itemPath>
+      <itemPath>src/crcccitt.h</itemPath>
+      <itemPath>src/decimal.h</itemPath>
+      <itemPath>src/decimal_ring_buffer.h</itemPath>
+      <itemPath>src/fx32.h</itemPath>
+      <itemPath>src/sin_table.h</itemPath>
+      <itemPath>src/APRSPacket.h</itemPath>
+      <itemPath>src/base64.h</itemPath>
+      <itemPath>src/receive.h</itemPath>
+      <itemPath>src/transmit.h</itemPath>
+      <itemPath>src/config.h</itemPath>
+    </logicalFolder>
+    <logicalFolder name="LinkerScript"
+                   displayName="Linker Files"
+                   projectFiles="true">
+    </logicalFolder>
+    <logicalFolder name="SourceFiles"
+                   displayName="Source Files"
+                   projectFiles="true">
+      <itemPath>src/console.c</itemPath>
+      <itemPath>src/main.c</itemPath>
+      <itemPath>src/sin_table.c</itemPath>
+      <itemPath>src/AFSK_Demodulator.c</itemPath>
+      <itemPath>src/AFSK_Modulator.c</itemPath>
+      <itemPath>src/crcccitt.c</itemPath>
+      <itemPath>src/APRSPacket.c</itemPath>
+      <itemPath>src/base64.c</itemPath>
+      <itemPath>src/receive.c</itemPath>
+      <itemPath>src/transmit.c</itemPath>
+    </logicalFolder>
+    <logicalFolder name="ExternalFiles"
+                   displayName="Important Files"
+                   projectFiles="false">
+      <itemPath>Makefile</itemPath>
+    </logicalFolder>
+  </logicalFolder>
+  <sourceRootList>
+    <Elem>src</Elem>
+  </sourceRootList>
+  <projectmakefile>Makefile</projectmakefile>
+  <confs>
+    <conf name="default" type="2">
+      <toolsSet>
+        <developmentServer>localhost</developmentServer>
+        <targetDevice>dsPIC33FJ64GP802</targetDevice>
+        <targetHeader></targetHeader>
+        <targetPluginBoard></targetPluginBoard>
+        <platformTool>PICkit3PlatformTool</platformTool>
+        <languageToolchain>XC16</languageToolchain>
+        <languageToolchainVersion>1.23</languageToolchainVersion>
+        <platform>2</platform>
+      </toolsSet>
+      <compileType>
+        <linkerTool>
+          <linkerLibItems>
+          </linkerLibItems>
+        </linkerTool>
+        <archiverTool>
+        </archiverTool>
+        <loading>
+          <useAlternateLoadableFile>false</useAlternateLoadableFile>
+          <parseOnProdLoad>false</parseOnProdLoad>
+          <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>
+      <C30>
+        <property key="code-model" value="default"/>
+        <property key="const-model" value="default"/>
+        <property key="data-model" value="default"/>
+        <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-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="true"/>
+        <property key="heap-size" value="10000"/>
+        <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="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="true"/>
+      </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="false"/>
+        <property key="oXC16glb-macros" value=""/>
+        <property key="output-file-format" value="elf"/>
+        <property key="relaxed-math" value="false"/>
+        <property key="save-temps" value="false"/>
+      </C30Global>
+      <PICkit3PlatformTool>
+        <property key="ADC 1" value="true"/>
+        <property key="AutoSelectMemRanges" value="auto"/>
+        <property key="CRC" value="true"/>
+        <property key="DAC 1" value="true"/>
+        <property key="DUAL COMPARATOR" value="true"/>
+        <property key="ECAN" value="true"/>
+        <property key="Freeze All Other Peripherals" value="true"/>
+        <property key="I2C1" value="true"/>
+        <property key="INPUT CAPTURE 1" value="true"/>
+        <property key="INPUT CAPTURE 2" value="true"/>
+        <property key="INPUT CAPTURE 7" value="true"/>
+        <property key="INPUT CAPTURE 8" value="true"/>
+        <property key="OUTPUT COMPARE 1" value="true"/>
+        <property key="OUTPUT COMPARE 2" value="true"/>
+        <property key="OUTPUT COMPARE 3" value="true"/>
+        <property key="OUTPUT COMPARE 8" value="true"/>
+        <property key="PARALLEL MASTER/SLAVE PORT" value="true"/>
+        <property key="REAL TIME CLOCK AND CALENDAR" value="true"/>
+        <property key="SPI 1" value="true"/>
+        <property key="SPI 2" value="true"/>
+        <property key="SecureSegment.SegmentProgramming" value="FullChipProgramming"/>
+        <property key="TIMER1" value="true"/>
+        <property key="TIMER2" value="true"/>
+        <property key="TIMER3" value="true"/>
+        <property key="TIMER4" value="true"/>
+        <property key="TIMER5" value="true"/>
+        <property key="ToolFirmwareFilePath"
+                  value="Press to browse for a specific firmware version"/>
+        <property key="ToolFirmwareOption.UseLatestFirmware" value="true"/>
+        <property key="UART 1" value="true"/>
+        <property key="UART 2" value="true"/>
+        <property key="firmware.download.all" value="false"/>
+        <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.configurationmemory2" value="true"/>
+        <property key="memories.dataflash" 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="0x2bff"/>
+        <property key="memories.programmemory.partition2" value="true"/>
+        <property key="memories.programmemory.partition2.end"
+                  value="${memories.programmemory.partition2.end.value}"/>
+        <property key="memories.programmemory.partition2.start"
+                  value="${memories.programmemory.partition2.start.value}"/>
+        <property key="memories.programmemory.start" value="0x0"/>
+        <property key="poweroptions.powerenable" value="false"/>
+        <property key="programmertogo.imagename" value=""/>
+        <property key="programoptions.donoteraseauxmem" value="false"/>
+        <property key="programoptions.eraseb4program" value="true"/>
+        <property key="programoptions.pgmspeed" value="2"/>
+        <property key="programoptions.preservedataflash" value="false"/>
+        <property key="programoptions.preserveeeprom" value="false"/>
+        <property key="programoptions.preserveprogramrange" value="false"/>
+        <property key="programoptions.preserveprogramrange.end" value="0x2bff"/>
+        <property key="programoptions.preserveprogramrange.start" value="0x0"/>
+        <property key="programoptions.preserveuserid" value="false"/>
+        <property key="programoptions.programcalmem" value="false"/>
+        <property key="programoptions.programuserotp" 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>
+    </conf>
+  </confs>
+</configurationDescriptor>
 

--- /dev/null
+++ b/src/APRS_PIC.X/nbproject/project.properties

--- /dev/null
+++ b/src/APRS_PIC.X/nbproject/project.xml
@@ -1,1 +1,17 @@
+<?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>APRS_PIC</name>
+            <creation-uuid>d565d3b8-a94d-4bc2-9f76-d8aa0e526a5d</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>
 

--- /dev/null
+++ b/src/APRS_PIC.X/src/AFSK_Demodulator.c
@@ -1,1 +1,201 @@
-
+// AFSK_Demodulator.c
+
+#include "AFSK_Demodulator.h"
+
+static AFSK_Demodulator self;
+
+void AFSK_Demodulator_reset() {
+
+  self.count_last = 0;
+
+  self.window = (uint8_t)(SAMPLE_RATE / ((float)self.bit_rate) + 0.5);
+
+  self.bitwidth = SAMPLE_RATE / self.bit_rate;
+
+  /*
+   * Calculate Goertzel coefficents for calculating frequency magnitudes
+   */
+  float k0 = ((float)self.window * self.frequency_0 / SAMPLE_RATE);
+  float k1 = ((float)self.window * self.frequency_1 / SAMPLE_RATE);
+  float w0 = (2 * PI / self.window) * k0;
+  float w1 = (2 * PI / self.window) * k1;
+
+  self.coeff0 = d_from_float(2 * cos(w0));
+  self.coeff1 = d_from_float(2 * cos(w1));
+
+  self.last_bit = 0;
+
+  self.bit_stuffing = false;
+
+  if (self.input_buffer.size != 0)
+    decimal_ring_buffer_destory(&self.input_buffer);
+  decimal_ring_buffer_init(&self.input_buffer, self.window + 2);
+
+  self.fcd_filt = 0;
+
+  self.byte_seq_len = 0;
+
+  char_ring_buffer_clear(&self.bit_sequence);
+
+}
+
+void AFSK_Demodulator_init(const uint16_t frequency_0, const uint16_t frequency_1, const uint16_t bit_rate, const decimal offset) {
+
+  self.frequency_0 = frequency_0;
+  self.frequency_1 = frequency_1;
+
+  self.bit_rate = bit_rate;
+
+  self.offset = offset;
+
+  self.input_buffer.size = 0;
+
+  self.fcd_filt = 0;
+  self.byte_seq_len = 0;
+
+  char_ring_buffer_init(&self.bit_sequence, 14);
+
+  AFSK_Demodulator_reset(self);
+
+}
+
+void AFSK_Demodulator_proccess_byte(const int8_t data_point, uint8_t * new_data) {
+
+  new_data[0] = 0;
+
+  decimal_ring_buffer_put(&self.input_buffer, d_from_int(data_point));
+
+  if (decimal_ring_buffer_avail(&self.input_buffer) > self.window) {
+
+    decimal q1_0 = 0;
+    decimal q1_1 = 0;
+    decimal q2_0 = 0;
+    decimal q2_1 = 0;
+
+    int16_t i;
+    for (i = 0; i <= self.window; i++) {
+
+      decimal q0_0 = dcmul(self.coeff0, q1_0) - q2_0 + decimal_ring_buffer_get(&self.input_buffer, i);
+      decimal q0_1 = dcmul(self.coeff1, q1_1) - q2_1 + decimal_ring_buffer_get(&self.input_buffer, i);
+      q2_0 = q1_0;
+      q2_1 = q1_1;
+      q1_0 = q0_0;
+      q1_1 = q0_1;
+
+    }
+
+    decimal fc1 = dcmul(q1_0, q1_0) + dcmul(q2_0, q2_0) - dcmul(dcmul(q1_0, q2_0), self.coeff0);
+    decimal fc2 = dcmul(q1_1, q1_1) + dcmul(q2_1, q2_1) - dcmul(dcmul(q1_1, q2_1), self.coeff1);
+
+    /* The 1800 Offset needs to be calculated based on the amplitude of the incomming signal
+     * the radio should have a tunning utility so it will turn on an LED when the signal amplitude
+     * is in the ideal range for the offset
+     */
+    decimal fcd = fc1 - fc2 - self.offset;
+
+    decimal_ring_buffer_pop(&self.input_buffer);
+
+    // Moving average filter
+    self.fcd_filt = self.fcd_filt + dmul((fcd - self.fcd_filt), d_from_float(0.4)); // FILT <-- FILT + FF(NEW - FILT)
+
+    uint8_t current_value = 0;
+    if (self.fcd_filt < 0)
+      current_value = 1;
+
+    if (current_value != self.last_bit) {
+
+      self.last_bit = current_value;
+
+      // Ignore any noise
+      if (self.same_count >= 3) {
+
+        // Calculate how many bit lengths there are to the transition
+        // Integer rounding
+        uint8_t new_bits = (self.count_last + 1 + (self.bitwidth / 2)) / self.bitwidth;
+
+        // If we are not bit stuffing Add a 0
+        if (!self.bit_stuffing)
+          char_ring_buffer_put(&self.bit_sequence, 0);
+
+        // If we where bit stuffing stop now
+        self.bit_stuffing = false;
+
+        // Decrement new_bits
+        new_bits--;
+
+        // If new_bits > 5 we just found a preamble
+        if (new_bits > 5) {
+
+          // Preamble related things
+
+          uint16_t len = self.byte_seq_len;
+          if (len >= 17) {
+
+            new_data[0] = len;
+            memcpy(new_data + 1, &self.byte_sequence, len);
+
+          }
+
+          self.byte_seq_len = 0;
+          char_ring_buffer_clear(&self.bit_sequence);
+
+          // Set bit stuffing true so last bit of preamble will be removed
+          self.bit_stuffing = true;
+
+        }
+
+        // If its not a preamble
+        else {
+
+          // If new_bits == 5 bit stuffing is occurring
+          if (new_bits == 5)
+            self.bit_stuffing = true;
+
+          // Add the rest of the bits as 1's
+          for (i = 0; i < new_bits; i++)
+            char_ring_buffer_put(&self.bit_sequence, 1);
+
+        }
+
+        // Add bits to the sequence
+        uint8_t avail = char_ring_buffer_avail(&self.bit_sequence);
+        if (avail >= 8) {
+
+          int8_t dat = 0;
+          for (i = 7; i >= 0; i--) {
+            dat <<= 1;
+            if (char_ring_buffer_get(&self.bit_sequence, i)) dat |= 1;
+          }
+
+          char_ring_buffer_remove(&self.bit_sequence, 8);
+          self.byte_sequence[self.byte_seq_len++] = dat;
+          if (self.byte_seq_len >= MAX_BYTES) {
+            // Packet Overized!
+            self.byte_seq_len = 0;
+            char_ring_buffer_clear(&self.bit_sequence);
+          }
+
+        }
+
+        self.count_last = 0;
+
+      }
+
+      self.same_count = 0;
+
+    } else {
+
+      self.count_last++;
+      self.same_count++;
+
+    }
+
+  }
+
+}
+
+void AFSK_Demodulator_set_offset(const decimal offset) {
+  self.offset = offset;
+}
+
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/AFSK_Demodulator.h
@@ -1,1 +1,174 @@
+/**
+ * @file	AFSK_Demodulator.h
+ * @author	Michael Marques <dryerzinia@gmail.com>
+ * @brief	Demodulator for AFSK modulated AX.25 Frames.
+ * @ingroup Packet
+ *
+ * This file contains a struct AFSK_Demodulator for holding all the data
+ * necessary for the AFSK_Demodulator process byte function which takes in 8
+ * bit signed samples from an audio signal.
+ */
 
+#ifndef AFSK_DEMODULATOR_H
+#define AFSK_DEMODULATOR_H
+
+// malloc, free, int types, boolean's
+#include <stdlib.h>
+#include <stdbool.h>
+#include <stdint.h>
+
+// memcpy for generating packet data to return
+#include <string.h>
+
+#include <ctype.h>
+
+#include <math.h>
+
+#include "decimal.h"
+
+#include "char_ring_buffer.h"
+#include "decimal_ring_buffer.h"
+
+#ifndef PI
+#define PI 3.14159265359
+#endif
+
+#define MAX_BYTES 255
+#define SAMPLE_RATE 11025
+
+/**
+ * @ingroup Packet
+ * Contains all information necessary to demodulate AFSK modulated AX-25 frames
+ */
+typedef struct {
+
+  /**
+   * Bit rate of the encoded digital information in the audio signal
+   * Do not adjust this value directly, instead call the appropriate
+   * functions on the decoder as other variables require re-calibration
+   * when these change
+   */
+  uint16_t bit_rate;
+
+  /**
+   * Width of the window of samples to run Goertzels algorithm on and to
+   * average Fourier coefficients across
+   */
+  uint8_t window;
+
+  /**
+   * Width of a bit calculated from Sample Rate and Bit Rate
+   * TODO: call reset in the functions that set Sample Rate and Bit Rate
+   */
+  uint8_t bitwidth;
+
+  /**
+   * Buffer to hold incoming data until there is enough to fill the window
+   * and calculate Fourier Coefficients
+   */
+  decimal_ring_buffer input_buffer;
+
+  /**
+   * Buffer of Fourier Coefficients so we can average them and smooth out
+   * the signal for extracting bits from Zero-Crossings
+   */
+  decimal fcd_filt;
+
+  /**
+   * Goertzel Coefficient for calculating magnitude of frequency 0
+   */
+  decimal coeff0;
+  /**
+   * Goertzel Coefficient for calculating magnitude of frequency 1
+   */
+  decimal coeff1;
+
+  decimal offset;
+
+  /**
+   * Frequency of the 1st AFSK Symbol
+   * Standard VHF packet is 1200/2200 Hz
+   * Standard HF packet is
+   *  PK232 tones 1600/1800 Hz
+   *  KAM tones 2110/2310 Hz
+   */
+  uint16_t frequency_0;
+  /**
+   * Frequency of the 2nd AFSK Symbol
+   */
+  uint16_t frequency_1;
+
+  uint16_t same_count;
+
+  /**
+   * Count of samples since last Zero-Crossing
+   */
+  uint16_t count_last;
+
+  /**
+   * A 14 character ring buffer for Bit Data
+   * Stores currently demodulated bits after Bit Stuffing removal and
+   * NRZI decoding
+   * The highest number of bits that should be collected before they are
+   * pushed to the byte array is 12, 8 for a byte + 6 from bit stuffing
+   */
+  char_ring_buffer bit_sequence;
+
+  /**
+   * Value of the last bit to be decoded
+   * used to check if there has been a Zero-Crossing
+   */
+  uint8_t last_bit;
+
+  /**
+   * Indicator if bit stuffing is occurring
+   * TODO: same as above
+   */
+  bool bit_stuffing;
+
+  /**
+   * Expandable array containing the sequence of bytes in the received packet
+   * It has a default size of 330 to contain a standard APRS packet without
+   * any reallocations
+   */
+  uint16_t byte_seq_len;
+  char byte_sequence[MAX_BYTES];
+
+} AFSK_Demodulator;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup Packet
+ * Set up the demodulator with parameters for the type of signal to receive
+ */
+void AFSK_Demodulator_init(uint16_t frequency_0, uint16_t frequency_1, uint16_t bit_rate, decimal offset);
+
+/**
+ * @ingroup Packet
+ * Pass another byte of signal data to the demodulator
+ * @returns a pointer to a char array containing a demodulated packet
+ *  if this byte did not complete demodulation of a packet it returns a
+ *  NULL pointer instead
+ */
+void AFSK_Demodulator_proccess_byte(int8_t data_point, uint8_t * new_data);
+
+/**
+ * @ingroup Packet
+ * Adjust the bit rate of the incoming data
+ * This function resets the window width so these parameters cannot be
+ * adjusted directly
+ */
+void AFSK_Demodulator_set_bit_rate(uint16_t br);
+
+void AFSK_Demodulator_set_offset(decimal offset);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/AFSK_Modulator.c
@@ -1,1 +1,147 @@
 
+#include "AFSK_Modulator.h"
+
+#define PREAMBLE_START_STAGE 0
+#define DATA_STAGE 1
+#define PREAMBLE_END_STAGE 2
+#define PACKET_SENT_STAGE 3
+
+
+static AFSK_Modulator self;
+
+void AFSK_Modulator_init(uint8_t * data, uint8_t len, uint16_t bit_rate, uint16_t frequency_0, uint16_t frequency_1, uint8_t start_preambles, uint8_t end_preambles){
+
+  self.stage = 0;
+
+  self.start_preambles = start_preambles;
+  self.end_preambles = end_preambles;
+
+  self.bit_rate = bit_rate;
+
+  self.frequency_0 = frequency_0;
+  self.frequency_1 = frequency_1;
+
+  self.current_frequency = 0;
+
+  self.len = len;
+  memcpy(self.data, data, len);
+
+  self.same_count = 0;
+  self.last_bit = 0;
+  self.sample_counter = 0;
+
+  self.freq_0_phi_adjust = 256 * ((uint32_t)frequency_0) / MODULATOR_SAMPLE_RATE;
+  self.freq_1_phi_adjust = 256 * ((uint32_t)frequency_1) / MODULATOR_SAMPLE_RATE;
+
+}
+
+static inline void AFSK_Modulator_advance_stage(){
+
+  self.last_bit = 0;
+  self.sample_counter = 0;
+  self.stage++;
+
+}
+
+static inline void AFSK_Modulator_change_frequency(){
+
+  if(self.current_frequency == 0)
+    self.current_frequency = 1;
+
+  else
+    self.current_frequency = 0;
+
+}
+
+static int8_t AFSK_Modulator_next(const uint8_t freq){
+
+  // pull this before advancing PHI so the first sample is at 0
+  int8_t next = sin_table[self.phi];
+
+  if(freq == 0)
+    self.phi += self.freq_0_phi_adjust;
+  else
+    self.phi += self.freq_1_phi_adjust;
+  self.sample_counter++;
+
+  return next;
+
+}
+
+static int8_t AFSK_Modulator_get_preamble(const uint8_t num_preambles){
+
+  uint16_t current_bit = self.sample_counter * self.bit_rate / MODULATOR_SAMPLE_RATE;
+
+  if(current_bit != self.last_bit){
+
+    if(current_bit % 8 <= 1)
+      AFSK_Modulator_change_frequency();
+
+    if(current_bit >= num_preambles * 8 + 1){
+      AFSK_Modulator_change_frequency();
+      AFSK_Modulator_advance_stage();
+    }
+
+    self.last_bit = current_bit;
+
+  }
+
+  return AFSK_Modulator_next(self.current_frequency);
+
+}
+
+static int8_t AFSK_Modulator_get_data(){
+
+  uint16_t current_bit = self.sample_counter * self.bit_rate / MODULATOR_SAMPLE_RATE;
+
+  if(current_bit != self.last_bit){
+
+     // Bit stuffing
+    if(self.same_count == 5){
+
+      self.same_count = 0;
+      self.sample_counter -= MODULATOR_SAMPLE_RATE / self.bit_rate;
+      AFSK_Modulator_change_frequency();
+
+    } else {
+
+      // Change frequencies to indicate 0 bit
+      if((self.data[current_bit / 8] & (1 << (current_bit % 8))) == 0)
+        AFSK_Modulator_change_frequency();
+
+      if(current_bit >= self.len * 8 - 1){
+        AFSK_Modulator_change_frequency();
+        AFSK_Modulator_advance_stage();
+      }
+
+      self.last_bit = current_bit;
+
+    }
+
+    if((self.data[current_bit / 8] & (1 << (current_bit % 8))) != 0)
+      self.same_count++;
+    else
+      self.same_count = 0;
+
+  }
+
+  return AFSK_Modulator_next(self.current_frequency);
+
+}
+
+int16_t AFSK_Modulator_next_sample(){
+
+  switch(self.stage){
+    case PREAMBLE_START_STAGE:
+      return AFSK_Modulator_get_preamble(self.start_preambles);
+    case DATA_STAGE:
+      return AFSK_Modulator_get_data();
+    case PREAMBLE_END_STAGE:
+      return AFSK_Modulator_get_preamble(self.end_preambles);
+    case PACKET_SENT_STAGE:
+      return AFSK_MODULATOR_PACKET_FINISHED; // Indicates packet is finished
+  }
+
+  return 0x101; // ERROR: This should never happen
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/AFSK_Modulator.h
@@ -1,1 +1,55 @@
 
+#ifndef AFSK_MODULATOR_H
+#define AFSK_MODULATOR_H
+
+#include <stdint.h>
+#include <string.h>
+
+#include "sin_table.h"
+
+#define AFSK_MODULATOR_PACKET_FINISHED 0x100
+
+#define MODULATOR_SAMPLE_RATE 11025
+#define MAX_BYTES 255
+
+typedef struct {
+
+  uint8_t stage;
+
+  uint8_t len;
+  uint8_t data[MAX_BYTES];
+
+  uint8_t start_preambles;
+  uint8_t end_preambles;
+
+  uint16_t bit_rate;
+
+  uint16_t frequency_0;
+  uint16_t frequency_1;
+
+  uint8_t current_frequency;
+
+  uint8_t same_count;
+  uint16_t last_bit;
+  uint32_t sample_counter;
+  uint8_t phi;
+
+  uint8_t freq_0_phi_adjust;
+  uint8_t freq_1_phi_adjust;
+
+} AFSK_Modulator;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void AFSK_Modulator_init(uint8_t * data, uint8_t len, uint16_t bit_rate, uint16_t frequency_0, uint16_t frequency_1, uint8_t start_preambles, uint8_t end_preambles);
+
+int16_t AFSK_Modulator_next_sample();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/APRSPacket.c
@@ -1,1 +1,109 @@
+/**
+ * @file	APRSPacket.c
+ * @author	Michael Marques <dryerzinia@gmail.com>
+ */
 
+#include "APRSPacket.h"
+
+void APRSPacket_from_data(APRSPacket *packet, uint8_t * data, uint16_t len){
+
+	int i;
+
+	packet->len = len;
+        memcpy(&packet->data, data, len);
+
+	for(i = 0; i < 7; i++) packet->destination_address[i] = (signed char)((unsigned char)(data[i])>>1);
+	packet->destination_address[7] = '\0';
+
+	for(i = 7; i < 14; i++) packet->source_address[i-7] = (signed char)((unsigned char)(data[i])>>1);
+	packet->source_address[7] = '\0';
+
+	packet->repeaters = 0;
+
+        int n = 14;
+	while(true){
+
+		if(n+1 >= len) break;
+
+		// Check for 0 bit set on end of last address character indicating that there are no more repeater addresses
+		if((data[n-1] & 0x01) != 0) break;
+
+		if(packet->repeaters > 7) break;
+
+		if(n+7 >= len) break;
+
+		signed char* new_address = packet->repeater_addresses[packet->repeaters];
+		for(i = n; i < n+7; i++) new_address[i-n] = (signed char)((unsigned char)(data[i])>>1);
+		new_address[7] = '\0';
+		n+=7;
+
+		packet->repeaters++;
+
+	}
+
+}
+
+uint16_t APRSPacket_crc(APRSPacket *packet){
+
+	return CRCCCITT((uint8_t*) packet->data, packet->len - 2, APRS_CRC_POLY);
+
+}
+
+uint16_t APRSPacket_data_crc(APRSPacket *packet){
+
+    uint16_t crc = packet->data[packet->len - 1];
+    crc <<= 8;
+    crc |= packet->data[packet->len - 2] & 0xFF;
+    return crc;
+
+}
+
+bool APRSPacket_crc_is_valid(APRSPacket *packet){
+    return APRSPacket_crc(packet) == APRSPacket_data_crc(packet);
+}
+
+void APRSPacket_print_detailed(APRSPacket *packet){
+
+        int i;
+
+        uint16_t calculated_crc = APRSPacket_crc(packet);
+        uint16_t crc = APRSPacket_data_crc(packet);
+
+        printf("Packet Received\n");
+
+        if(calculated_crc != crc)
+                printf("Checksum Error!\nCaluclated checksum is: %04X\n", calculated_crc);
+
+        printf("Size: %d\n", packet->len);
+        printf("Destination Address: %s\n", packet->destination_address);
+        printf("Source Address: %s\n", packet->source_address);
+        for(i = 0; i < packet->repeaters; i++)
+                printf("Repeater-%d: %s\n", i+1, packet->repeater_addresses[i]);
+
+        printf("\nData: \n");
+
+        i = 0;
+        while(i < packet->len){
+                int j;
+                for(j = 0; j < 20; j++){
+                        if(i < packet->len){
+                                if(isprint(packet->data[i])) putchar(packet->data[i]);
+                                else printf(".");
+                        } else putchar(' ');
+                        i++;
+                }
+                i -= 20;
+                printf("  |  ");
+                for(j = 0; j < 20; j++){
+                        if(i < packet->len){
+                                unsigned char val = packet->data[i];
+                                printf(" %02X", (int)val);
+                                i++;
+                        }
+                }
+                putchar('\n');
+        }
+
+        printf("\nChecksum: %04X\n\n", crc);
+
+}

--- /dev/null
+++ b/src/APRS_PIC.X/src/APRSPacket.h
@@ -1,1 +1,92 @@
+/**
+ * @file	APRSPacket.h
+ * @author	Michael Marques <dryerzinia@gmail.com>
+ * @brief	Contains functions for parsing APRS data from packets and
+ * 			structs for storing that data
+ * @ingroup	Packet
+ *
+ * File contains all the necessary functions for parsing APRS packets.
+ * Contains structs for storing the APRS related data, and functions
+ * for accessing it and converting it to string form for printing.
+ */
 
+#ifndef APRSPACKET_H
+#define APRSPACKET_H
+
+#define MAX_APRS_PACKET_SIZE 256
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+#include <ctype.h>
+#include <string.h>
+
+#include "crcccitt.h"
+
+/**
+ * Value of CRC Polynomial used in AX-25
+ */
+#define APRS_CRC_POLY 0x8408
+
+/**
+ * @ingroup Packet
+ * Contains all information related to the APRS packet include the raw data,
+ * the AX-25 Addresses, and any parsed information based on standard APRS
+ * messages
+ */
+typedef struct {
+
+	/**
+	 * Raw data of APRS packet including CRC
+	 */
+	uint8_t data[MAX_APRS_PACKET_SIZE];
+        uint16_t len;
+
+	/**
+	 * Destination address of packet with SSID
+	 * May contain Mic-E data
+	 */
+	int8_t destination_address[8];
+	/**
+	 * Source of the packet with SSID
+	 */
+	int8_t source_address[8];
+
+	/**
+	 * Number of repeaters
+	 * A maximum of 8 repeaters is allowed
+	 */
+	uint8_t repeaters;
+	/**
+	 * List of repeaters
+         * Up to 8 repeaters
+	 */
+	int8_t repeater_addresses[8][8];
+
+} APRSPacket;
+
+/**
+ * @ingroup Packet
+ * Creates an APRSPacket strut from a char array of packet data parsing any
+ * relevant information for easier access later.
+ */
+void APRSPacket_from_data(APRSPacket *packet, uint8_t *data, uint16_t len);
+
+/**
+ * @ingroup Packet
+ * Calculates CRC of packet data using the APRS_CRC_POLY
+ * @returns CRC value of packet data
+ */
+uint16_t APRSPacket_crc(APRSPacket *packet);
+
+uint16_t APRSPacket_data_crc(APRSPacket *packet);
+
+bool APRSPacket_crc_is_valid(APRSPacket *packet);
+
+void APRSPacket_print_detailed(APRSPacket *packet);
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/base64.c
@@ -1,1 +1,100 @@
+#include "base64.h"
 
+char base64_digit(uint8_t n){
+
+    if(n < 26) return n + 'A';
+    else if(n < 26 + 26) return n - 26 + 'a';
+    else if(n < 10 + 26 + 26) return n - 26 - 26 + '0';
+    else if(n == 62) return '+';
+    else if(n == 63) return '/';
+
+    return 0;
+
+}
+
+uint16_t base64_encode(uint8_t *input, char *output, uint16_t len){
+
+    char *start = output;
+
+    uint16_t i;
+    uint8_t l;
+    for(i = 0; i < len + 1; i++, input++, output++){
+        switch(i % 3){
+            case 0:
+                if(i < len){
+                    *output = base64_digit((*input) >> 2);
+                    l = ((*input) & 0x03) << 4;
+                }
+                break;
+            case 1:
+                *output = base64_digit(l | ((*input) >> 4));
+                l = ((*input) & 0x0F) << 2;
+                break;
+            case 2:
+                *output = base64_digit(l | ((*input) >> 6));
+                if(i < len){
+                    output++;
+                    *output = base64_digit((*input) & 0x3F);
+                }
+                break;
+        }
+    }
+    *output = '\0';
+    switch(2 - ((len - 1) % 3)){
+        case 2:
+            *output = '=';
+            output++;
+            *output = '\0';
+        case 1:
+            *output = '=';
+            output++;
+            *output = '\0';
+            break;
+    }
+
+    return (uint16_t)(output - start);
+
+}
+
+unsigned char base64_decode_digit(char c) {
+
+    switch(c){
+        case '+' :
+            return 62;
+        case '/' :
+            return 63;
+        default  :
+            if(c >= 'A' && c <= 'Z') return c - 'A';
+            else if(c >= 'a' && c <= 'z') return c - 'a' + 26;
+            else if(c >= '0' && c <= '9') return c - '0' + 26 + 26;
+    }
+
+    return 0x00;
+
+}
+
+uint16_t base64_decode(char *s) {
+
+    char *p, *q;
+    uint8_t bits = 0;
+    uint16_t n = 0;
+    uint16_t len = 0;
+
+    for(p = s, q = s; *p; p++){
+
+        if(*p == '=') break;
+        n = ((n << 6) & 0xFFC0) + (base64_decode_digit(*p) & 0x3F);
+        bits += 6;
+        if(bits >= 8){
+            bits -= 8;
+            *q = (n >> bits) & 0xFF;
+            q++;
+            len++;
+        }
+
+    }
+
+    return len;
+
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/base64.h
@@ -1,1 +1,11 @@
+#ifndef BASE64_H
+#define	BASE64_H
 
+#include <stdint.h>
+
+uint16_t base64_encode(uint8_t *input, char *output, uint16_t len);
+uint16_t base64_decode(char *s);
+
+#endif
+
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/char_ring_buffer.h
@@ -1,1 +1,89 @@
+// char_ring_buffer.h
 
+#ifndef CHAR_RING_BUFFER_H
+#define CHAR_RING_BUFFER_H
+
+#include <stdlib.h>
+
+typedef struct {
+
+  signed char *data;
+
+  unsigned short read_position;
+  unsigned short write_position;
+
+  unsigned short size;
+
+} char_ring_buffer;
+
+static inline void char_ring_buffer_init(char_ring_buffer *self, unsigned short capacity) {
+
+  self->size = capacity;
+  self->data = (signed char*) malloc(sizeof(char) * capacity);
+
+  self->read_position = 0;
+  self->write_position = 0;
+
+}
+
+static inline void char_ring_buffer_put(char_ring_buffer *self, signed char c) {
+
+  self->data[self->write_position++] = c;
+
+  if (self->write_position >= self->size)
+    self->write_position = 0;
+
+}
+
+static inline signed char char_ring_buffer_get(char_ring_buffer *self, unsigned short index) {
+
+  unsigned short position = self->read_position + index;
+
+  if (position >= self->size)
+    position -= self->size;
+
+  return self->data[position];
+
+}
+
+static inline void char_ring_buffer_pop(char_ring_buffer *self) {
+
+  self->read_position++;
+  if (self->read_position >= self->size)
+    self->read_position = 0;
+
+}
+
+static inline void char_ring_buffer_remove(char_ring_buffer *self, unsigned short count) {
+
+  self->read_position += count;
+
+  if (self->read_position >= self->size)
+    self->read_position -= self->size;
+
+}
+
+static inline void char_ring_buffer_clear(char_ring_buffer *self) {
+
+  self->read_position = 0;
+  self->write_position = 0;
+
+}
+
+static inline unsigned short char_ring_buffer_avail(char_ring_buffer *self) {
+
+  if (self->read_position <= self->write_position)
+    return self->write_position - self->read_position;
+
+  return self->write_position + self->size - self->read_position;
+
+}
+
+static inline void char_ring_buffer_destory(char_ring_buffer *self) {
+
+  free(self->data);
+
+}
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/config.h
@@ -1,1 +1,15 @@
+#ifndef CONFIG_H
+#define	CONFIG_H
 
+#include <p33FJ64GP802.h>
+
+#define FCY 39613750ULL
+
+#include <libpic30.h>
+
+#define U1BAUDRATE  230400
+#define U1BRGVAL    ((FCY/U1BAUDRATE)/4)-1
+
+#endif	/* CONFIG_H */
+
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/console.c
@@ -1,1 +1,92 @@
+#include "console.h"
 
+// Need to be long enough for a 255 byte long Base64 encoded data packet
+#define CONSOLE_BUFFER_SIZE 400
+
+static uint16_t console_buf_rpos = 0;
+static uint16_t console_buf_wpos = 0;
+static uint16_t console_buf[CONSOLE_BUFFER_SIZE];
+
+static void (*rx_callback)(char) = NULL;
+
+int putch(int c){
+
+    // if(console_buf_wpos == console_buf_rpos) buffer overrun error
+
+    console_buf[console_buf_wpos++] = c;
+
+    if(console_buf_wpos >= CONSOLE_BUFFER_SIZE)
+        console_buf_wpos = 0;
+
+    // If we are not TXing start UART TX interupt cycle
+    if(U1STAbits.TRMT == 1){
+
+        IEC0bits.U1TXIE = 0;
+
+        if(U1STAbits.UTXBF == 0){
+            U1TXREG = console_buf[console_buf_rpos++];
+            if(console_buf_rpos >= CONSOLE_BUFFER_SIZE)
+                console_buf_rpos = 0;
+        }
+
+        IEC0bits.U1TXIE = 1;
+
+    }
+
+    return 1;
+
+}
+
+void console_init(void *rxcb){
+
+    rx_callback = rxcb;
+
+    TRISBbits.TRISB11 = 0;
+    TRISBbits.TRISB10 = 1;
+    RPOR5bits.RP11R = U1TXRP; // RP11 TX
+    RPINR18bits.U1RXR = 10;  // RP10 RX
+
+    U1MODEbits.STSEL    = 0; // 1-stop bit
+    U1MODEbits.PDSEL    = 0; // No parity
+    U1MODEbits.ABAUD    = 0; // Autobaud disabled
+    U1MODEbits.BRGH     = 1; // High Speed mode
+
+    U1MODEbits.USIDL    = 0; // Run IDLE
+    U1MODEbits.WAKE     = 1; // Wake from sleep
+
+    U1BRG = U1BRGVAL;        // Set baude rate
+
+    U1STAbits.URXISEL   = 0; // Interrupt after 1 RX char received
+
+    IEC0bits.U1RXIE     = 1; // Enable U1RX Interrupt
+
+    U1MODEbits.UARTEN   = 1;
+    U1STAbits.UTXEN     = 1; // Enable UART TX
+
+}
+
+void __attribute__((__interrupt__, auto_psv)) _U1RXInterrupt(void){
+
+    IFS0bits.U1RXIF = 0;
+
+    if(U1STAbits.OERR == 1) U1STAbits.OERR = 0; // Ignore errors
+
+    if(U1STAbits.URXDA == 1 && rx_callback != NULL)
+        rx_callback(U1RXREG);
+
+}
+
+void __attribute__((__interrupt__, auto_psv)) _U1TXInterrupt(void){
+
+    IFS0bits.U1TXIF = 0;
+
+    if(console_buf_wpos != console_buf_rpos){
+
+        U1TXREG = console_buf[console_buf_rpos++];
+
+        if(console_buf_rpos >= CONSOLE_BUFFER_SIZE)
+            console_buf_rpos = 0;
+
+    }
+
+}

--- /dev/null
+++ b/src/APRS_PIC.X/src/console.h
@@ -1,1 +1,25 @@
+/**
+ * @file    console.c
+ * @author  Michael Marques <dryerzinia@gmail.com>
+ * @brief   Serial interrupts and routines for communication
+ * @ingroup Interface
+ *
+ * Serial interrupts and routines for communication
+ */
 
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "config.h"
+
+#ifndef CONSOLE_H
+#define	CONSOLE_H
+
+#define U1TXRP 3
+
+int putch(int c);
+void console_init();
+
+#endif	/* PRINTF_ROUTE_H */
+
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/crcccitt.c
@@ -1,1 +1,28 @@
+// crcccitt.c
 
+#include "crcccitt.h"
+
+uint16_t CRCCCITT(const uint8_t *data, uint16_t len, const uint16_t polynomial) {
+
+  uint16_t crc = 0xFFFF;
+  uint8_t i;
+
+  while (len--) {
+
+    crc ^= *data++;
+
+    for (i = 0; i < 8; i++) {
+      if (crc & 0x0001)
+        crc = (crc >> 1) ^ polynomial;
+      else
+        crc >>= 1;
+    }
+
+  }
+
+  crc ^= 0xFFFF;
+
+  return crc;
+
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/crcccitt.h
@@ -1,1 +1,19 @@
+// crcccitt.h
 
+#ifndef CRCCCITT_H
+#define CRCCCITT_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+uint16_t CRCCCITT(const uint8_t *data, uint16_t len, const uint16_t polynomial);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/decimal.h
@@ -1,1 +1,14 @@
+#ifndef DECIMAL_H
+#define DECIMAL_H
 
+#include "fx32.h"
+typedef fx32 decimal;
+#define dmul(a, b) fx32_mul(a, b)
+#define dcmul(a, b) fx32_cmul(a, b)
+#define ddiv(a, b) fx32_div(a, b)
+#define d_from_int(a) fx32_from_int(a)
+#define d_from_float(a) fx32_from_float(a)
+#define d_to_int(a) fx32_to_int(a)
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/decimal_ring_buffer.h
@@ -1,1 +1,91 @@
+// decimal_ring_buffer.h
 
+#ifndef DECIMAL_RING_BUFFER_H
+#define DECIMAL_RING_BUFFER_H
+
+#include <stdlib.h>
+
+#include "decimal.h"
+
+typedef struct {
+
+  decimal *data;
+
+  unsigned short read_position;
+  unsigned short write_position;
+
+  unsigned short size;
+
+} decimal_ring_buffer;
+
+static inline void decimal_ring_buffer_init(decimal_ring_buffer *self, unsigned short capacity) {
+
+  self->size = capacity;
+  self->data = (decimal*) malloc(sizeof(decimal) * capacity);
+
+  self->read_position = 0;
+  self->write_position = 0;
+
+}
+
+static inline void decimal_ring_buffer_put(decimal_ring_buffer *self, decimal f) {
+
+  self->data[self->write_position++] = f;
+
+  if (self->write_position >= self->size)
+    self->write_position = 0;
+
+}
+
+static inline decimal decimal_ring_buffer_get(decimal_ring_buffer *self, unsigned short index) {
+
+  unsigned short position = self->read_position + index;
+
+  if (position >= self->size)
+    position -= self->size;
+
+  return self->data[position];
+
+}
+
+static inline void decimal_ring_buffer_pop(decimal_ring_buffer *self) {
+
+  self->read_position++;
+  if (self->read_position >= self->size)
+    self->read_position = 0;
+
+}
+
+static inline void decimal_ring_buffer_remove(decimal_ring_buffer *self, unsigned short count) {
+
+  self->read_position += count;
+
+  if (self->read_position >= self->size)
+    self->read_position -= self->size;
+
+}
+
+static inline void decimal_ring_buffer_clear(decimal_ring_buffer *self) {
+
+  self->read_position = 0;
+  self->write_position = 0;
+
+}
+
+static inline unsigned short decimal_ring_buffer_avail(decimal_ring_buffer *self) {
+
+  if (self->read_position < self->write_position)
+    return self->write_position - self->read_position;
+
+  return self->write_position + self->size - self->read_position;
+
+}
+
+static inline void decimal_ring_buffer_destory(decimal_ring_buffer *self) {
+
+  free(self->data);
+
+}
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/fx32.h
@@ -1,1 +1,24 @@
 
+#include <stdint.h>
+
+typedef int32_t fx32;
+typedef	int64_t	fx32d;
+
+#ifndef FX32W
+#define FX32W 26
+#endif
+
+#define FX32F (32 - FX32W)
+
+#define fx32_one ((fx32)((fx32)1 << FX32F))
+
+#define fx32_from_float(r) ((fx32)(r * fx32_one + (r >= 0 ? 0.5 : -0.5)))
+#define fx32_from_int(i) ((fx32d)(i) << FX32F)
+#define fx32_to_int(f) ((f) >> FX32F)
+#define fx32_add(a, b) (a + b)
+#define fx32_sub(a, b) (a - b)
+#define fx32_mul(a, b) ((fx32)(((fx32d)(a) * (fx32d)(b)) >> FX32F))
+#define fx32_div(a, b) ((fx32)(((fx32d)(a) << FX32F) / (fx32d)(b)))
+
+#define fx32_cmul(a, b) ((fx32)((a * b) >> FX32F))
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/main.c
@@ -1,1 +1,135 @@
+#include "main.h"
 
+#define COMMAND_BUFFER_SIZE 400
+
+static char command_buffer[COMMAND_BUFFER_SIZE];
+static uint8_t command_buffer_position = 0;
+
+const char STATUS_OK[] = "OK";
+
+#define RX_MODE 0
+#define TX_MODE 1
+
+uint8_t mode = RX_MODE;
+
+void inline print_ok(){
+    printf("%s\n\r", STATUS_OK);
+}
+
+void console_input(char c){
+
+    switch(c){
+        case 0x0A:	// New Line
+        case 0x0D:	// Carriage Return
+
+            printf("\n\r");
+            command_buffer[command_buffer_position] = '\0';
+
+            if(strcmp(command_buffer, "hello") == 0){
+
+                printf("HI\n\r");
+
+            } else if(strcmp(command_buffer, "rcon") == 0){
+
+                printf("%04x\n\r", RCON);
+
+            } else if(strcmp(command_buffer, "clr_rcon") == 0){
+
+                RCON = 0;
+                print_ok();
+
+            } else if(strncmp(command_buffer, "TX=", 3) == 0){
+
+                mode = TX_MODE;
+                receive_stop();
+                transmit_send(command_buffer + 3);
+                transmit_start();
+
+            } else {
+
+                printf("?\n\r");
+
+            }
+
+            command_buffer_position = 0;
+
+            break;
+
+        case 0x7F:	// Delete
+        case 0x08:	// Backspace
+
+            if(command_buffer_position > 0){
+                command_buffer_position--;
+                putch(c);
+            }
+
+            break;
+
+        default:
+
+            command_buffer[command_buffer_position] = c;
+            command_buffer_position++;
+
+            if(command_buffer_position == COMMAND_BUFFER_SIZE)
+                command_buffer_position--;
+            else
+                putch(c);
+
+            break;
+
+    }
+
+}
+
+int main(void){
+
+    // Configure PLL prescaler, PLL postsscaer, PLL divisor
+    PLLFBD = 41; // M = 43
+    CLKDIVbits.PLLPOST = 0;	// n2 = 2
+    CLKDIVbits.PLLPRE  = 0;	// n1 = 2
+
+    // Initiate Clock Switch to Internal FRC with PLL (NOSC = 0b001)
+    __builtin_write_OSCCONH(0x01);
+    __builtin_write_OSCCONL(0x01);
+
+    // Wait for Clock switch to occur
+    while(OSCCONbits.COSC != 0b001);
+
+    // Wait for PLL to lock
+    while(OSCCONbits.LOCK != 1);
+
+    ACLKCONbits.APSTSCLR = 0b111; // Divide aux clock by 1
+
+    INTCON1bits.NSTDIS = 1; // Disable interrupt nesting
+
+    receive_setup();
+    transmit_setup();
+
+    console_init(console_input);
+
+    IEC4bits.DAC1LIE = 0;
+
+    TRISAbits.TRISA0 = 0;
+    LATAbits.LATA0 = 0;
+
+    receive_start();
+
+    AFSK_Demodulator_init(1200, 2200, 1200, d_from_float(0.0));
+
+    printf("BluetoothLE TNC Active\n\r");
+
+    while(1){
+        if(mode == RX_MODE){
+            receive_process();
+        } else if(mode == TX_MODE){
+            if(transmit_process()){
+                print_ok();
+                receive_start();
+                mode = RX_MODE;
+            }
+        }
+    }
+
+    return 0;
+
+}

--- /dev/null
+++ b/src/APRS_PIC.X/src/main.h
@@ -1,1 +1,52 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
 
+#include <string.h>
+
+#include "config.h"
+
+#include "console.h"
+#include "decimal.h"
+#include "receive.h"
+#include "transmit.h"
+
+#include <xc.h>
+
+// FBS
+#pragma config BWRP = WRPROTECT_OFF     // Boot Segment Write Protect (Boot Segment may be written)
+#pragma config BSS = NO_FLASH           // Boot Segment Program Flash Code Protection (No Boot program Flash segment)
+#pragma config RBS = NO_RAM             // Boot Segment RAM Protection (No Boot RAM)
+
+// FSS
+#pragma config SWRP = WRPROTECT_OFF     // Secure Segment Program Write Protect (Secure segment may be written)
+#pragma config SSS = NO_FLASH           // Secure Segment Program Flash Code Protection (No Secure Segment)
+#pragma config RSS = NO_RAM             // Secure Segment Data RAM Protection (No Secure RAM)
+
+// FGS
+#pragma config GWRP = OFF               // General Code Segment Write Protect (User program memory is not write-protected)
+#pragma config GSS = OFF                // General Segment Code Protection (User program memory is not code-protected)
+
+// FOSCSEL
+#pragma config FNOSC = FRCPLL           // Oscillator Mode (Internal Fast RC (FRC) w/ PLL)
+#pragma config IESO = ON                // Internal External Switch Over Mode (Start-up device with FRC, then automatically switch to user-selected oscillator source when ready)
+
+// FOSC
+#pragma config POSCMD = NONE            // Primary Oscillator Source (Primary Oscillator Disabled)
+#pragma config OSCIOFNC = OFF           // OSC2 Pin Function (OSC2 pin has clock out function)
+#pragma config IOL1WAY = OFF            // Peripheral Pin Select Configuration (Allow Multiple Re-configurations)
+#pragma config FCKSM = CSECME           // Clock Switching and Monitor (Both Clock Switching and Fail-Safe Clock Monitor are enabled)
+
+// FWDT
+#pragma config WDTPOST = PS32768        // Watchdog Timer Postscaler (1:32,768)
+#pragma config WDTPRE = PR128           // WDT Prescaler (1:128)
+#pragma config WINDIS = OFF             // Watchdog Timer Window (Watchdog Timer in Non-Window mode)
+#pragma config FWDTEN = OFF             // Watchdog Timer Enable (Watchdog timer enabled/disabled by user software)
+
+// FPOR
+#pragma config FPWRT = PWR128           // POR Timer Value (128ms)
+#pragma config ALTI2C = OFF             // Alternate I2C  pins (I2C mapped to SDA1/SCL1 pins)
+
+// FICD
+#pragma config ICS = PGD1               // Comm Channel Select (Communicate on PGC1/EMUC1 and PGD1/EMUD1)
+#pragma config JTAGEN = OFF             // JTAG Port Enable (JTAG is Disabled)

--- /dev/null
+++ b/src/APRS_PIC.X/src/receive.c
@@ -1,1 +1,101 @@
+#include "receive.h"
 
+#define ADC_BUFFER_SIZE 4
+
+static int8_t adc_buffer[ADC_BUFFER_SIZE];
+static uint8_t adc_buffer_rpos = 0;
+static uint8_t adc_buffer_wpos = 0;
+
+static uint8_t data_buffer[MAX_APRS_PACKET_SIZE];
+
+static uint8_t mode = RECEIVE_PRINT_MODE_BASE64;
+
+static APRSPacket last_rxed;
+
+void print_packet(APRSPacket * packet){
+
+    if(!APRSPacket_crc_is_valid(packet)) return;
+
+    if(mode == RECEIVE_PRINT_MODE_BASE64){
+
+        char base64_packet[400];
+        base64_encode(data_buffer + 1, base64_packet, data_buffer[0]);
+        printf("RX=\"%s\"\n\r", base64_packet);
+
+    } else {
+
+        APRSPacket_print_detailed(packet);
+
+    }
+
+}
+
+void __attribute__((interrupt, no_auto_psv)) _ADC1Interrupt(void){
+
+    IFS0bits.AD1IF = 0;
+
+    int16_t adc_value = ADC1BUF0;
+
+    // Offload hardwork to main loop
+    adc_buffer[adc_buffer_wpos++] = (int8_t)((adc_value >> 2) & 0xFF);
+    if(adc_buffer_wpos >= ADC_BUFFER_SIZE)
+        adc_buffer_wpos = 0;
+
+}
+
+void receive_start(){
+    T3CONbits.TON = 1;
+}
+
+void receive_stop(){
+    T3CONbits.TON = 0;
+}
+
+void receive_setup(){
+
+    T3CONbits.TCS = 0; // Internal Clock
+    T3CONbits.TGATE = 0; // Gate time accumulation disabled
+    T3CONbits.TCKPS = 0b00; // 1:1 prescaler
+
+    // Fcy = 39613750
+    // Fcy / 11025 = 3593.08
+
+    PR3 = 3593; // 11025sps
+    // Measured 11042
+    // 0.15% error
+
+    AD1PCFGL = 0b1111111111011111; // Input AN5 enabled
+
+    AD1CON1bits.SSRC = 0b010; // Trigger on Timer 3 event
+    AD1CON1bits.FORM = 0b01; // signed integer
+    AD1CON1bits.ASAM = 1; // Automaticly start sampling right after convrsion
+
+    AD1CON2bits.VCFG = 0b000; // Reference Avdd Avss
+
+    AD1CHS0bits.CH0SA = 5; // AN5 input select
+
+    IFS0bits.AD1IF = 0; // Clear ADC interrupt flag
+    IEC0bits.AD1IE = 1; // Enable ADC interrupts
+
+    AD1CON1bits.ADON = 1;
+
+}
+
+void receive_process(){
+
+    if(adc_buffer_rpos != adc_buffer_wpos){
+
+        AFSK_Demodulator_proccess_byte(adc_buffer[adc_buffer_rpos++], data_buffer);
+        if(adc_buffer_rpos >= ADC_BUFFER_SIZE)
+            adc_buffer_rpos = 0;
+
+        if(data_buffer[0] != 0){
+
+            APRSPacket_from_data(&last_rxed, data_buffer + 1, (uint8_t)(data_buffer[0]));
+            print_packet(&last_rxed);
+            data_buffer[0] = 0;
+
+        }
+    }
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/receive.h
@@ -1,1 +1,20 @@
+#include <stdio.h>
+#include <stdint.h>
 
+#include <string.h>
+
+#include "config.h"
+
+#include "AFSK_Demodulator.h"
+#include "APRSPacket.h"
+#include "crcccitt.h"
+#include "base64.h"
+
+#define RECEIVE_PRINT_MODE_DETAILED 0
+#define RECEIVE_PRINT_MODE_BASE64   1
+
+void receive_start();
+void receive_stop();
+void receive_setup();
+void receive_process();
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/sin_table.c
@@ -1,1 +1,38 @@
 
+#include "sin_table.h"
+
+const uint8_t sin_table[256] = {
+       0,    3,    6,    9,   12,   16,   19,   22,
+      25,   28,   31,   34,   37,   40,   43,   46,
+      49,   51,   54,   57,   60,   63,   65,   68,
+      71,   73,   76,   78,   81,   83,   85,   88,
+      90,   92,   94,   96,   98,  100,  102,  104,
+     106,  107,  109,  111,  112,  113,  115,  116,
+     117,  118,  120,  121,  122,  122,  123,  124,
+     125,  125,  126,  126,  126,  127,  127,  127,
+     127,  127,  127,  127,  126,  126,  126,  125,
+     125,  124,  123,  122,  122,  121,  120,  118,
+     117,  116,  115,  113,  112,  111,  109,  107,
+     106,  104,  102,  100,   98,   96,   94,   92,
+      90,   88,   85,   83,   81,   78,   76,   73,
+      71,   68,   65,   63,   60,   57,   54,   51,
+      49,   46,   43,   40,   37,   34,   31,   28,
+      25,   22,   19,   16,   12,    9,    6,    3,
+       0,   -3,   -6,   -9,  -12,  -16,  -19,  -22,
+     -25,  -28,  -31,  -34,  -37,  -40,  -43,  -46,
+     -49,  -51,  -54,  -57,  -60,  -63,  -65,  -68,
+     -71,  -73,  -76,  -78,  -81,  -83,  -85,  -88,
+     -90,  -92,  -94,  -96,  -98, -100, -102, -104,
+    -106, -107, -109, -111, -112, -113, -115, -116,
+    -117, -118, -120, -121, -122, -122, -123, -124,
+    -125, -125, -126, -126, -126, -127, -127, -127,
+    -127, -127, -127, -127, -126, -126, -126, -125,
+    -125, -124, -123, -122, -122, -121, -120, -118,
+    -117, -116, -115, -113, -112, -111, -109, -107,
+    -106, -104, -102, -100,  -98,  -96,  -94,  -92,
+     -90,  -88,  -85,  -83,  -81,  -78,  -76,  -73,
+     -71,  -68,  -65,  -63,  -60,  -57,  -54,  -51,
+     -49,  -46,  -43,  -40,  -37,  -34,  -31,  -28,
+     -25,  -22,  -19,  -16,  -12,   -9,   -6,   -3
+};
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/sin_table.h
@@ -1,1 +1,17 @@
+#ifndef SIN_TABLE_H
+#define SIN_TABLE_H
 
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const uint8_t sin_table[256];
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/spi.c
@@ -1,1 +1,80 @@
+#include "spi.h"
 
+uint8_t spi_transfer(uint8_t data){
+
+    IFS0bits.SPI1IF = 0;
+    SPI1STATbits.SPIRBF = 0;
+    SPI1BUF = data;
+    while(SPI1STATbits.SPIRBF == 0);
+    return SPI1BUF;
+
+}
+
+void spi_cs(uint8_t state){
+
+    if(!state){
+        LATAbits.LATA3 = 0;
+    } else {
+        LATAbits.LATA3 = 1;
+    }
+
+}
+
+void spi_master_init(){
+
+    TRISAbits.TRISA3    = 0; // CS Output
+    LATAbits.LATA3      = 1; // Start CS High
+
+    TRISBbits.TRISB11   = 1; // SDI Input
+    TRISBbits.TRISB5    = 0; // SCK Output
+    TRISBbits.TRISB12   = 0; // SDO Output
+    _SDI1R              = 11; // SDI  -> RP11
+    RPOR2bits.RP5R     = SCK1RP; // RP5 -> SCK
+    RPOR6bits.RP12R     = SDO1RP; // RP12 -> SDO
+
+    IFS0bits.SPI1IF = 0; // Clear the Interrupt Flag
+    IEC0bits.SPI1IE = 0; // Disable the Interrupt
+
+    SPI1CON1bits.DISSCK = 0; // Internal Serial Clock Enabled
+    SPI1CON1bits.DISSDO = 0; // SDO pin is controled by module
+    SPI1CON1bits.MODE16 = 0; // 8-bit mode
+    SPI1CON1bits.CKE    = 0; // Data Transistions on Idle to Active, Low->High, Leading
+    SPI1CON1bits.CKP    = 0; // Clock Idle LOW, Active HIGH
+    SPI1CON1bits.MSTEN  = 1; // Master
+
+    SPI1STATbits.SPIROV = 0;
+
+    SPI1STATbits.SPIEN = 1;	// Enable SPI Module
+
+}
+
+void spi_slave_init(){
+
+    TRISAbits.TRISA3    = 0; // CS Output
+    LATAbits.LATA3      = 1; // Start CS High
+
+    TRISBbits.TRISB11   = 1; // SDI Input
+    TRISBbits.TRISB5    = 1; // SCK Input
+    TRISBbits.TRISB12   = 0; // SDO Output
+    _SDI1R              = 6; //      SDI  -> RP6
+    _SCK1R              = 5; // RP5  -> SCK
+    RPOR6bits.RP12R     = SDO1RP; // RP12 ->SDO
+
+    IFS0bits.SPI1IF = 0; // Clear the Interrupt Flag
+    IEC0bits.SPI1IE = 0; // Disable the Interrupt
+
+    SPI1CON1bits.DISSCK = 0; // Internal Serial Clock Disabled
+    SPI1CON1bits.DISSDO = 0;// SDO pin is controled by module
+    SPI1CON1bits.MODE16 = 0; // 8-bit mode
+    SPI1CON1bits.CKE    = 0; // Data Transistions on Idle to Active, Low->High, Leading
+    SPI1CON1bits.CKP    = 0; // Clock Idle LOW, Active HIGH
+    SPI1CON1bits.MSTEN  = 0; // Slave
+
+    SPI1STATbits.SPIROV = 0;
+
+    SPI1STATbits.SPIEN = 1;	// Enable SPI Module
+
+    IEC0bits.SPI1IE = 1; // Enable interrupt
+
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/spi.h
@@ -1,1 +1,18 @@
+#ifndef SPI_H
+#define	SPI_H
 
+#include <stdlib.h>
+#include <stdint.h>
+
+#include "main.h"
+
+#define SCK1RP 8
+#define SDO1RP 7
+
+uint8_t spi_transfer(uint8_t data);
+void spi_cs(uint8_t state);
+
+void spi_slave_init();
+void spi_master_init();
+
+#endif

 Binary files /dev/null and b/src/APRS_PIC.X/src/test/test differ
--- /dev/null
+++ b/src/APRS_PIC.X/src/test/test.c
@@ -1,1 +1,60 @@
+#include <stdio.h>
+#include <stdint.h>
 
+#include <ctype.h>
+#include <string.h>
+
+#include "../base64.h"
+
+const char test1[] = "gqCkpkBA4paIYK6OrGfwA1Rlc3Rpbmc67w==";
+
+const char test1_res[] =
+	{
+		0x82, 0xa0, 0xa4, 0xa6, '@', '@', 0xe2, 0x96, 0x88, 0x60, 
+		0xae, 0x8e ,0xac, 'g', 0xf0, 0x03, 'T', 'e', 's', 't',
+		'i', 'n', 'g', ':', 0xef
+	};
+
+void print_data(const char *buffer, uint16_t len){
+
+	int i = 0;
+        while(i < len){
+                int j;
+                for(j = 0; j < 20; j++){
+                        if(i < len){
+                                if(isprint(buffer[i])) putchar(buffer[i]);
+                                else printf(".");
+                        } else putchar(' ');
+                        i++;
+                }
+                i -= 20;
+                printf("  |  ");
+                for(j = 0; j < 20; j++){
+                        if(i < len){
+                                unsigned char val = buffer[i];
+                                printf(" %02X", (int)val);
+                                i++;
+                        }
+                }
+                putchar('\n');
+        }
+
+}
+
+void main(void){
+
+	char buffer[1000];
+
+	memcpy(buffer, test1, strlen(test1) + 1);
+
+	uint16_t len = base64_decode(buffer);
+
+	uint8_t res = memcmp(buffer, test1_res, len);
+	print_data(buffer, len);
+	print_data(test1_res, len);
+
+
+	printf("Test: %d\n", res);
+
+}
+

--- /dev/null
+++ b/src/APRS_PIC.X/src/transmit.c
@@ -1,1 +1,71 @@
+#include "transmit.h"
 
+static bool finished = false;
+
+void __attribute__((interrupt, no_auto_psv)) _DAC1LInterrupt(void){
+
+    IFS4bits.DAC1LIF = 0; // Clear Left Channel Interrupt Flag
+
+    int16_t sample =  AFSK_Modulator_next_sample();
+
+    if(sample == 0x0100){
+        transmit_stop();
+    } else {
+        DAC1LDAT = sample << 8;
+    }
+
+}
+
+void transmit_start(){
+    LATBbits.LATB8 = 1;
+    IFS4bits.DAC1LIF = 0;
+    IEC4bits.DAC1LIE = 1;
+    DAC1LDAT = 0;
+    finished = false;
+}
+
+void transmit_stop(){
+    IEC4bits.DAC1LIE = 0;
+    finished = true;
+    LATBbits.LATB8 = 0;
+}
+
+void transmit_setup(){
+
+    // PPT output
+    TRISBbits.TRISB8 = 0;
+    LATBbits.LATB8 = 0;
+
+    DAC1STATbits.LOEN = 1; // Enable left output
+    DAC1STATbits.LITYPE = 0; // Interrupt on FIFO not full
+
+    DAC1CONbits.AMPON = 0; /* Amplifier Disabled During Sleep and Idle Modes */
+    // Tuned from experimentation
+    DAC1CONbits.DACFDIV = 55; // 11025 sample rate
+    DAC1CONbits.FORM = 0b01; // Signed Integer input
+
+    DAC1DFLT = 0x0000; // Signed integer center value default
+
+    IFS4bits.DAC1LIF = 0; // Clear Left Channel Interrupt Flag
+    IEC4bits.DAC1LIE = 0; // Left Channel Interrupt Enabled
+
+    DAC1CONbits.DACEN = 1;
+
+}
+
+void transmit_send(char *base64data){
+
+    uint16_t len = strlen(base64data);
+    base64data[len - 1] = '\0';
+    len -= 2;
+    base64data++;
+
+    len = base64_decode(base64data);
+
+    AFSK_Modulator_init((uint8_t*)base64data, len, 1200, 1200, 2200, 50, 10);
+
+}
+
+bool transmit_process(){
+    return finished;
+}

--- /dev/null
+++ b/src/APRS_PIC.X/src/transmit.h
@@ -1,1 +1,13 @@
+#include <stdint.h>
+#include <stdbool.h>
 
+#include "config.h"
+
+#include "AFSK_Modulator.h"
+#include "base64.h"
+
+void transmit_start();
+void transmit_stop();
+void transmit_setup();
+void transmit_send();
+bool transmit_process();

--- a/src/BLE_TNC_ADC_DAC.X/.gitignore
+++ /dev/null
@@ -1,3 +1,1 @@
-dist
-bin
 

--- a/src/BLE_TNC_ADC_DAC.X/Makefile
+++ /dev/null
@@ -1,114 +1,1 @@
-#
-#  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
-

--- a/src/BLE_TNC_ADC_DAC.X/funclist
+++ /dev/null
@@ -1,4 +1,1 @@
-_main: CODE, 270 0 128
-__initialization: CODE, 251 0 15
-_isr: CODE, 4 0 245
-Total: 388
+

 Binary files a/src/BLE_TNC_ADC_DAC.X/l.obj and /dev/null differ
--- a/src/BLE_TNC_ADC_DAC.X/main.c
+++ /dev/null
@@ -1,336 +1,1 @@
-/* 
- * File:   main.c
- * Author: mike
- *
- * Created on July 31, 2014, 10:44 PM
- */
 
-#include <xc.h>
-
-// CONFIG1
-#pragma config FOSC = INTOSC    // Oscillator Selection Bits (INTOSC oscillator: I/O function on CLKIN pin)
-#pragma config WDTE = OFF       // Watchdog Timer Enable (WDT disabled)
-#pragma config PWRTE = OFF      // Power-up Timer Enable (PWRT disabled)
-#pragma config MCLRE = ON       // MCLR Pin Function Select (MCLR/VPP pin function is MCLR)
-#pragma config CP = OFF         // Flash Program Memory Code Protection (Program 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 = OFF       // Internal/External Switchover Mode (Internal/External Switchover Mode is disabled)
-#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 PPS1WAY = ON     // Peripheral Pin Select one-way control (The PPSLOCK bit cannot be cleared once it is set by software)
-#pragma config ZCDDIS = ON      // Zero-cross detect disable (Zero-cross detect circuit is disabled at POR)
-#pragma config PLLEN = ON       // Phase Lock Loop enable (4x PLL is always enabled)
-#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 LPBOR = ON       // Low-Power Brown Out Reset (Low-Power BOR is enabled)
-#pragma config LVP = ON         // Low-Voltage Programming Enable (Low-voltage programming enabled)
-
-#include <stdio.h>
-#include <stdint.h>
-#include <stdbool.h>
-#include <stdlib.h>
-
-#include <pic16lf1704.h>
-
-// DAC Mode
-#define BUFFER_OK    0x7E
-#define BUFFER_FULL  0x7F
-#define BUFFER_EMPTY_DAC_MODE 0x7D
-#define NULL_DATA 0x7E
-
-// ADC Mode
-#define BUFFER_EMPTY 0x7F
-#define BUFFER_EMPTY_M_1 0x7E
-
-#define SWITCH_ADC_MODE 0x7F
-#define SWITCH_DAC_MODE 0x7E
-
-#define ADC_MODE 0
-#define DAC_MODE 1
-
-uint8_t mode = ADC_MODE;
-
-bool dac_started = false;
-
-bool overflow = false;
-
-uint8_t data_buffer[256];
-uint8_t data_buffer_write_pos = 0;
-uint8_t data_buffer_read_pos = 0;
-
-void interrupt isr(void){
-
-    if(PIR1bits.SSP1IF){
-
-        uint8_t data = SSP1BUF;
-
-        if(mode == ADC_MODE){
-
-            if(data == SWITCH_DAC_MODE){
-
-                mode = DAC_MODE;
-
-                // Stop ADC
-                // Start DAC
-
-                // Reset buffer
-                data_buffer_write_pos = 0;
-                data_buffer_read_pos = 0;
-
-                dac_started = false;
-
-            } else {
-
-                if(data_buffer_write_pos != data_buffer_read_pos)
-                    SSP1BUF = data_buffer[data_buffer_read_pos++];
-                else
-                    SSP1BUF = BUFFER_EMPTY;
-
-            }
-
-        } else if(mode == DAC_MODE){
-
-            if(data == SWITCH_ADC_MODE){
-
-                mode = ADC_MODE;
-
-                // Stop DAC
-                DAC1CON1bits.DAC1R = 0x80;
-                // Start ADC
-
-                // Stop PTT
-                LATAbits.LATA2 = 0;
-
-                // Reset buffer
-                data_buffer_write_pos = 0;
-                data_buffer_read_pos = 0;
-
-            } else if(data != NULL_DATA){
-
-                if(data < 0x80) data += 0x80;
-                else data -= 0x80;
-
-                // Buffer data
-                data_buffer[data_buffer_write_pos++] = data;
-
-                if(!dac_started && data_buffer_write_pos > 200){
-
-                    dac_started = true;
-
-                    // Trigger PTT
-                    LATAbits.LATA2 = 1;
-
-                }
-
-                if(data_buffer_write_pos + 3 != data_buffer_read_pos)
-                    SSP1BUF = BUFFER_OK;
-                else
-                    SSP1BUF = BUFFER_FULL;
-
-                overflow = false;
-
-            } else {
-
-                if(overflow){
-                    SSP1BUF = BUFFER_EMPTY_DAC_MODE;
-                }
-
-            }
-
-        }
-
-        PIR1bits.SSP1IF = 0;
-
-    }
-    else if(PIR1bits.ADIF){
-
-        uint8_t adc_result = ADRESH;
-
-        // convert result to signed number
-        if(adc_result >= 0x80)
-            adc_result -= 0x80;
-        else
-            adc_result += 0x80;
-
-        if(adc_result == BUFFER_EMPTY)
-            data_buffer[data_buffer_write_pos++] = BUFFER_EMPTY_M_1;
-        else
-            data_buffer[data_buffer_write_pos++] = adc_result;
-
-        PIR1bits.ADIF = 0;
-
-    }
-    else if(INTCONbits.TMR0IF){
-
-        if(mode == ADC_MODE){
-
-            TMR0 = TMR0 + 0x4E; // 11025 Hz
-
-            // Take ADC Sample
-            ADCON0bits.GO = 1;
-
-        } else if(mode == DAC_MODE) {
-
-            TMR0 = TMR0 + 0x4E;//0xA7; // 22050 Hz
-
-            // TODO check for buffer overrun and shutdown if it happens
-            // Next output
-            if(!dac_started);
-            else if(data_buffer_read_pos == data_buffer_write_pos){
-
-                overflow = true;
-
-                mode = ADC_MODE;
-
-                // Stop DAC
-                DAC1CON1bits.DAC1R = 0x80;
-                // Start ADC
-
-                // Stop PTT
-                LATAbits.LATA2 = 0;
-
-                // Reset buffer
-                data_buffer_write_pos = 0;
-                data_buffer_read_pos = 0;
-
-            } else {
-
-                DAC1CON1bits.DAC1R = data_buffer[data_buffer_read_pos++];
-
-            }
-
-        }
-
-        INTCONbits.TMR0IF = 0;
-
-    }
-
-}
-
-void main(void) {
-
-    // Switch clock to 16 MHz
-    OSCCONbits.IRCF = 0b1111;
-    OSCCONbits.SCS = 0b10;
-
-    while(OSCSTATbits.HFIOFS == 0); // Wait for clock to stabalize
-
-    SLRCONAbits.SLRA2 = 0;
-    TRISAbits.TRISA2 = 0;
-    LATAbits.LATA2 = 0;
-
-    // Setup PPI
-    // Unlock PPS
-    GIE = 0; // Disable Interrupts, TODO remove this is init code its unnessisary
-    PPSLOCK = 0x55;
-    PPSLOCK = 0xAA;
-    PPSLOCK = 0x00;
-
-    // SPI PPI
-    RA5PPSbits.RA5PPS       = 0b10010; // SDO
-    SSPCLKPPSbits.SSPCLKPPS = 0b10000; // RC0
-    SSPDATPPSbits.SSPDATPPS = 0b10001; // RC1
-
-    // Lock PPS
-    PPSLOCK = 0x55;
-    PPSLOCK = 0xAA;
-    PPSLOCK = 0x01;
-
-    // Op-Amp Config
-    OPA2CONbits.OPA2SP = 0; // Low GBWP set
-    OPA2CONbits.OPA2UG = 0; // Unity gain off - to output
-    OPA2CONbits.OPA2PCH = 0b00; // Attached + to pin
-
-    OPA2CONbits.OPA2EN = 1;
-
-    OPA1CONbits.OPA1SP = 0; // Low GBWP set
-    OPA1CONbits.OPA1UG = 1; // Unity gain on
-    OPA1CONbits.OPA1PCH = 0b10; // Attached + to DAC Output
-
-    OPA1CONbits.OPA1EN = 1;
-
-    // ADC Config
-    TRISAbits.TRISA4 = 1; // Analog input on RA4
-
-    // Disable interrupt and clear flag
-    PIE1bits.ADIE = 0;
-    PIR1bits.ADIF = 0;
-
-    ANSELA = 0; // Disable all ANIN
-    ANSELC = 0;
-    ANSELAbits.ANSA4 = 1; // Enable RA4 as analog input
-
-    ADCON0bits.CHS = 0b00011; // AN3
-
-    ADCON1bits.ADFM = 0; // Align conversion left to get 8 high bits easily
-    ADCON1bits.ADCS = 0b111; // Clock Source is FRC 1-6 uS conversion Time
-    ADCON1bits.ADPREF = 0b00; // Vcc is AD references
-
-    ADCON2bits.TRIGSEL = 0x0000; // Auto conversion disabled
-
-    ADCON0bits.ADON = 1; // Enable ADC
-
-    PIE1bits.ADIE = 1; // Enabled ADC interrupt
-
-    // DAC Config
-    DAC1CON0bits.DAC1PSS = 0; // + ref VDD
-    DAC1CON0bits.DAC1NSS = 0; // - ref VSS
-
-    DAC1CON1bits.DAC1R = 0x80; // Default output Voltage VSS
-
-    DAC1CON0bits.DAC1EN = 1;
-
-    // PTT Config
-    TRISAbits.TRISA2 = 0;
-    LATAbits.LATA2 = 0; // PPT low by default
-
-    // Timer0 Config
-
-    // Disable interupt and clear flag
-    INTCONbits.TMR0IE = 0;
-    INTCONbits.TMR0IF = 0;
-
-    OPTION_REGbits.T0CS = 0; // Timer0 Fosc/4 clock
-    OPTION_REGbits.PSA = 0; // Prescaler assigned to timer 0
-    OPTION_REGbits.PS = 0b000; // Prescaller 1:2
-
-    INTCONbits.TMR0IE = 1; // Enable Timer 0 Interrupts
-
-    // SPI Config
-    // Configure IO Directions
-    TRISAbits.TRISA5 = 0;
-    TRISCbits.TRISC0 = 1;
-    TRISCbits.TRISC1 = 1;
-
-    // Clear and disable SPI interrupts
-    PIR1bits.SSP1IF = 0;
-    PIE1bits.SSP1IE = 0;
-
-    SSP1STATbits.CKE = 0; // Data Transistions on Idle to Active, Low->High, Leading
-    SSP1STATbits.SMP = 0; // Data sampling in middle of data output time
-
-    SSP1CON1bits.CKP = 0; // Clock Idle LOW, Active HIGH
-    SSP1CON1bits.SSPM = 0b0101; // SPI Slave mode SS disabled
-
-    SSP1CON3bits.BOEN = 1; // Ignore Buffer Overflows
-
-    while(PORTCbits.RC0 == 1); // Wait for clock to become idle
-
-    SSP1CON1bits.SSPEN = 1; // Enable SPI
-
-    PIE1bits.SSP1IE = 1; // Enable SPI Interrupts
-
-    // Enable all interrupts
-    INTCONbits.PEIE = 1; // Enable Peripheral Interrupts
-    INTCONbits.GIE = 1; // Enable Interrupts
-
-    // Load SPI buffer so its ready for first pull
-    SSP1BUF = 'A';
-
-    while(1){} // Run forever
-
-}
-

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Makefile-default.mk
+++ /dev/null
@@ -1,141 +1,1 @@
-#
-# 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=mkdir -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}/BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
-else
-IMAGE_TYPE=production
-OUTPUT_SUFFIX=hex
-DEBUGGABLE_SUFFIX=elf
-FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${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=main.c
-
-# Object Files Quoted if spaced
-OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/main.p1
-POSSIBLE_DEPFILES=${OBJECTDIR}/main.p1.d
-
-# Object Files
-OBJECTFILES=${OBJECTDIR}/main.p1
-
-# Source Files
-SOURCEFILES=main.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}  -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
-
-MP_PROCESSOR_OPTION=16LF1704
-# ------------------------------------------------------------------------------------
-# Rules for buildStep: compile
-ifeq ($(TYPE_IMAGE), DEBUG_RUN)
-${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}../  
-	
-else
-${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}../  
-	
-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}/BLE_TNC_ADC_DAC.X.${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}/BLE_TNC_ADC_DAC.X.${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: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"        -odist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX}  ${OBJECTFILES_QUOTED_IF_SPACED}     
-	@${RM} dist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.hex 
-	
-else
-dist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${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}/BLE_TNC_ADC_DAC.X.${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: (%n) %s" "--warnformat=%f:%l: warning: (%n) %s" "--msgformat=%f:%l: advisory: (%n) %s"     -odist/${CND_CONF}/${IMAGE_TYPE}/BLE_TNC_ADC_DAC.X.${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 "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
-ifneq (${DEPFILES},)
-include ${DEPFILES}
-endif
-

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Makefile-genesis.properties
+++ /dev/null
@@ -1,9 +1,1 @@
-#
-#Mon Aug 25 20:13:09 MDT 2014
-default.languagetoolchain.dir=/opt/microchip/xc8/v1.32/bin
-com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=1f98a0eed69cb2a45c12981fa9470927
-default.languagetoolchain.version=1.32
-host.platform=linux
-conf.ids=default
-default.com-microchip-mplab-nbide-toolchainXC8-XC8LanguageToolchain.md5=52258db7536b2d1fec300cefc7ed9230
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Makefile-impl.mk
+++ /dev/null
@@ -1,70 +1,1 @@
-#
-# 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=BLE_TNC_ADC_DAC.X
-
-# 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
-

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Makefile-local-default.mk
+++ /dev/null
@@ -1,37 +1,1 @@
-#
-# 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" ...  
-#
-PATH_TO_IDE_BIN=/opt/microchip/mplabx/mplab_ide/mplab_ide/modules/../../bin/
-# Adding MPLAB X bin directory to path.
-PATH:=/opt/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="/opt/microchip/mplabx/sys/java/jre1.7.0_25/bin/"
-OS_CURRENT="$(shell uname -s)"
-MP_CC="/opt/microchip/xc8/v1.32/bin/xc8"
-# 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 "/opt/microchip/mplabx/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" 
-MP_CC_DIR="/opt/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
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Makefile-variables.mk
+++ /dev/null
@@ -1,14 +1,1 @@
-#
-# Generated - do not edit!
-#
-# NOCDDL
-#
-CND_BASEDIR=`pwd`
-# default configuration
-CND_ARTIFACT_DIR_default=dist/default/production
-CND_ARTIFACT_NAME_default=BLE_TNC_ADC_DAC.X.production.hex
-CND_ARTIFACT_PATH_default=dist/default/production/BLE_TNC_ADC_DAC.X.production.hex
-CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
-CND_PACKAGE_NAME_default=bletncadcdac.x.tar
-CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/bletncadcdac.x.tar
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/Package-default.bash
+++ /dev/null
@@ -1,74 +1,1 @@
-#!/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}/BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
-OUTPUT_BASENAME=BLE_TNC_ADC_DAC.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
-PACKAGE_TOP_DIR=bletncadcdac.x/
-
-# 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}/bletncadcdac.x/bin
-copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
-
-
-# Generate tar file
-cd "${TOP}"
-rm -f ${CND_DISTDIR}/${CND_CONF}/package/bletncadcdac.x.tar
-cd ${TMPDIR}
-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/bletncadcdac.x.tar *
-checkReturnCode
-
-# Cleanup
-cd "${TOP}"
-rm -rf ${TMPDIR}
-

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/configurations.xml
+++ /dev/null
@@ -1,159 +1,1 @@
-<?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">
-    </logicalFolder>
-    <logicalFolder name="LinkerScript"
-                   displayName="Linker Files"
-                   projectFiles="true">
-    </logicalFolder>
-    <logicalFolder name="SourceFiles"
-                   displayName="Source Files"
-                   projectFiles="true">
-      <itemPath>main.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>PIC16LF1704</targetDevice>
-        <targetHeader></targetHeader>
-        <targetPluginBoard></targetPluginBoard>
-        <platformTool>PICkit3PlatformTool</platformTool>
-        <languageToolchain>XC8</languageToolchain>
-        <languageToolchainVersion>1.32</languageToolchainVersion>
-        <platform>2</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="false"/>
-        <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="0xfff"/>
-        <property key="memories.programmemory.start" value="0x0"/>
-        <property key="poweroptions.powerenable" value="true"/>
-        <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="0xfff"/>
-        <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>
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/private/configurations.xml
+++ /dev/null
@@ -1,26 +1,1 @@
-<?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>BUR114180848:=&lt;drv>x:=end</platformToolSN>
-      <languageToolchainDir>/opt/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>
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/private/private.properties
+++ /dev/null

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/private/private.xml
+++ /dev/null
@@ -1,4 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?><project-private xmlns="http://www.netbeans.org/ns/project-private/1">
-    <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
-</project-private>
 

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/project.properties
+++ /dev/null

--- a/src/BLE_TNC_ADC_DAC.X/nbproject/project.xml
+++ /dev/null
@@ -1,17 +1,1 @@
-<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://www.netbeans.org/ns/project/1">
-    <type>com.microchip.mplab.nbide.embedded.makeproject</type>
-    <configuration>
-        <data xmlns="http://www.netbeans.org/ns/make-project/1">
-            <name>BLE_TNC_ADC_DAC</name>
-            <creation-uuid>d4af753a-8899-4428-870b-63dcc201af75</creation-uuid>
-            <make-project-type>0</make-project-type>
-            <c-extensions>c</c-extensions>
-            <cpp-extensions/>
-            <header-extensions/>
-            <asminc-extensions/>
-            <sourceEncoding>ISO-8859-1</sourceEncoding>
-            <make-dep-projects/>
-        </data>
-    </configuration>
-</project>