This is the most recent version of the file.

This commit is contained in:
CJ Satnarine
2023-02-03 11:17:28 -05:00
committed by GitHub
commit 0d293b0d60
13 changed files with 2116 additions and 0 deletions

113
Neo-pixels Code/Makefile Normal file
View File

@@ -0,0 +1,113 @@
#
# There exist several targets which are by default empty and which can be
# used for execution of your targets. These targets are usually executed
# before and after some main targets. They are:
#
# .build-pre: called before 'build' target
# .build-post: called after 'build' target
# .clean-pre: called before 'clean' target
# .clean-post: called after 'clean' target
# .clobber-pre: called before 'clobber' target
# .clobber-post: called after 'clobber' target
# .all-pre: called before 'all' target
# .all-post: called after 'all' target
# .help-pre: called before 'help' target
# .help-post: called after 'help' target
#
# Targets beginning with '.' are not intended to be called on their own.
#
# Main targets can be executed directly, and they are:
#
# build build a specific configuration
# clean remove built files from a configuration
# clobber remove all built files
# all build all configurations
# help print help mesage
#
# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and
# .help-impl are implemented in nbproject/makefile-impl.mk.
#
# Available make variables:
#
# CND_BASEDIR base directory for relative paths
# CND_DISTDIR default top distribution directory (build artifacts)
# CND_BUILDDIR default top build directory (object files, ...)
# CONF name of current configuration
# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration)
# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration)
# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration)
# CND_PACKAGE_DIR_${CONF} directory of package (current configuration)
# CND_PACKAGE_NAME_${CONF} name of package (current configuration)
# CND_PACKAGE_PATH_${CONF} path to package (current configuration)
#
# NOCDDL
# Environment
MKDIR=mkdir
CP=cp
CCADMIN=CCadmin
RANLIB=ranlib
# build
build: .build-post
.build-pre:
# Add your pre 'build' code here...
.build-post: .build-impl
# Add your post 'build' code here...
# clean
clean: .clean-post
.clean-pre:
# Add your pre 'clean' code here...
# WARNING: the IDE does not call this target since it takes a long time to
# simply run make. Instead, the IDE removes the configuration directories
# under build and dist directly without calling make.
# This target is left here so people can do a clean when running a clean
# outside the IDE.
.clean-post: .clean-impl
# Add your post 'clean' code here...
# clobber
clobber: .clobber-post
.clobber-pre:
# Add your pre 'clobber' code here...
.clobber-post: .clobber-impl
# Add your post 'clobber' code here...
# all
all: .all-post
.all-pre:
# Add your pre 'all' code here...
.all-post: .all-impl
# Add your post 'all' code here...
# help
help: .help-post
.help-pre:
# Add your pre 'help' code here...
.help-post: .help-impl
# Add your post 'help' code here...
# include project implementation makefile
include nbproject/Makefile-impl.mk
# include project make variables
include nbproject/Makefile-variables.mk

223
Neo-pixels Code/NeoPixels.c Normal file
View File

@@ -0,0 +1,223 @@
/*==============================================================================
Project: NeoPixel-Starter
Date: June 8, 2022
This program demonstrates basic NeoPixel data transmission & colour adjustment.
==============================================================================*/
#include "xc.h" // Microchip XC8 compiler include file
#include "stdint.h" // Include integer definitions
#include "stdbool.h" // Include Boolean (true/false) definitions
#include "UBMP410.h" // Include UBMP4 constants and functions
// TODO Set linker ROM ranges to 'default,-0-7FF' under "Memory model" pull-down.
// TODO Set linker code offset to '800' under "Additional options" pull-down.
// Program constant definitions
#define LEDS 96
// Program variable definitions
unsigned char red = 10; // Starting colour or colour-adjusted output values, the maximum is 255.
unsigned char green = 10;
unsigned char blue = 10;
unsigned char redP[LEDS];
unsigned char greenP[LEDS];
unsigned char blueP[LEDS];
//Variables for waves
bool countUp = true;
bool patternUp = true;
unsigned char colourIndex = 0;
unsigned char colourIndexCopy;
unsigned char pix;
// Shift 8-bits of NeoPixel data
void neopixel_shift(unsigned char col)
{
for(unsigned char bits = 8; bits != 0; bits --)
{
H8OUT = 1;
if((col & 0b10000000) == 0)
{
H8OUT = 0;
}
NOP();
H8OUT = 0;
//NOP();
col = col << 1;
}
}
// Fill NeoPixel strip with raw colour from the red, green, and blue variables
void neopixel_fill(unsigned char leds)
{
for(leds; leds != 0; leds--)
{
neopixel_shift(green);
neopixel_shift(red);
neopixel_shift(blue);
}
}
void neopixel_array_fill(unsigned char leds)
{
for(pix = 0; pix != leds; pix++)
{
neopixel_shift(greenP[pix]);
neopixel_shift(redP[pix]);
neopixel_shift(blueP[pix]);
}
}
int main(void)
{
OSC_config(); // Configure internal oscillator for 48 MHz
UBMP4_config(); // Configure on-board UBMP4 I/O devices
//green = 0b10101010; // Timing test
//Makes a gradient thingy where red is on one side, blue is on the other and in the middle there is purple
// for(unsigned char pix = 0; pix != LEDS; pix++)
// {
// redP[pix] = pix * 2;
// greenP[pix] = 0;
// blueP[pix] = 192 - pix * 2;
// }
while(1)
{
neopixel_array_fill(LEDS);
neopixel_fill(LEDS);
__delay_ms(20);
// //Showing some colours when the button is pressed.
// if (SW2 == 0) //Cyan
// {
// green = 150;
// red = 0;
// blue = 150;
// }
// if (SW3 == 0) // Red
// {
// green = 0;
// red = 225;
// blue = 0;
// }
// if (SW4 == 0) // Yellow
// {
// green = 255;
// red = 255;
// blue = 0;
// }
// if (SW5 == 0) //Grey
// {
// green = 50;
// red = 50;
// blue = 50;
// }
colourIndexCopy = colourIndex;
//Making a moving pattern of purple if SW3 is pressed
// if (SW3 == 0)
// {
//This makes the pattern light brighter
for (pix = 0; pix != LEDS; pix++)
{
//redP[pix] = colourIndex;
//blueP[pix] = colourIndex;
greenP[pix] = colourIndex;
if (countUp)
{
colourIndex++;
if (colourIndex == 255)
{
countUp = false;
}
}
else
{
colourIndex--;
if (colourIndex == 0)
{
colourIndex = true;
}
}
//} //This one makes the code move up and down in one certain pattern
//This makes the pattern dim
if (patternUp)
{
colourIndex = colourIndexCopy + 1;
if (colourIndex == 254)
{
patternUp = false;
}
}
else
{
colourIndex = colourIndexCopy - 1;
if (colourIndex == 1)
{
patternUp = true;
}
}
} //This closing bracket makes the lights glow and dim
//If SW2 is pressed, then light in purple
// if (SW2 == 0)
// {
// for(unsigned char pixel = 0; pixel != LEDS; pixel++)
// {
// redP[pixel] = pixel;
// greenP[pixel] = 0;
// blueP[pixel] = pixel;
// }
// }
// //Makes some sort of pattern (I randomly did this and it made a pattern that blinks red while SW2 is pressed)
// for (unsigned int i = 0; i < 225; i++)
// {
// green = 0;
// red += i;
// blue = 100;
// }
// Activate bootloader if SW1 is pressed.
if(SW1 == 0)
{
RESET();
}
}
}
/* Learn More - Program Analysis Activities
*
* 1. Modify the UBMP4_config() function to allow output on the NeoPixel pin.
* Use the test pattern and an oscilloscope to measure the width of the 0 and
* 1 data bits transmitted for each colour byte, as well as the total bit
* period duration.
*
* 2. What do NOP(); operations do? There is also a _delay() function that will
* create a delay for the specified number of clock cycles. Replace the two
* NOP(); statements with: _delay(2);
* NOP operations does nothing while the code is being executed.
* Is the timing the same?
* I'm not sure but it seems the same.
* 3. Adjust the amount of delay, and the location of the delay code in the
* neopixel_shift() function to adjust the bit width and bit period to most
* closely match the values in the NeoPixel data sheet.
*
* 4. Determine the number of pulses required to create a start bit, a zero bit,
* and a one bit for the protocol that your remote control uses.
*
* 5. Complete the transmit_Sony() function by adding the code to transmit the
* 5-bit device address code after the command code.
*
* 6. Create the definitions and the functions required to transmit the protocol
* used by your IR device.
*/

View File

@@ -0,0 +1,46 @@
/*==============================================================================
File: PIC16F1459-config.c
Date: March 1, 2022
UBMP4.1 (PIC16F1459) configuration bit settings
Processor configuration bits determine processor operating characteristics as
well as processor-specific features. Refer to the processor datasheet for
details on specific configuration bit settings.
The settings below were generated by the Configuration Bits tool in MPLAB X,
accessed under: Window menu -> Target Memory Views -> Configuration Bits
==============================================================================*/
// TODO - Verify or modify configuration bits using the Configuration Bits tool.
// PIC16F1459 Configuration Bit settings generated for UBMP4 by MPLABX.
// These settings must exactly match those in the bootloader program if a
// bootloader will be used.
// CONFIG1
#pragma config FOSC = INTOSC // Oscillator Selection Bits (INTOSC oscillator: I/O function on CLKIN pin)
#pragma config WDTE = SWDTEN // Watchdog Timer Enable (WDT controlled by the SWDTEN bit in the WDTCON register)
#pragma config PWRTE = ON // Power-up Timer Enable (PWRT enabled)
#pragma config MCLRE = OFF // MCLR Pin Function Select (MCLR/VPP pin function is digital input)
#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
#pragma config BOREN = SBODEN // Brown-out Reset Enable (Brown-out Reset controlled by the SBOREN bit in the BORCON register)
#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 = OFF // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is disabled)
// CONFIG2
#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off)
#pragma config CPUDIV = NOCLKDIV// CPU System Clock Selection Bit (NO CPU system divide)
#pragma config USBLSCLK = 48MHz // USB Low SPeed Clock Selection bit (System clock expects 48 MHz, FS/LS USB CLKENs divide-by is set to 8.)
#pragma config PLLMULT = 3x // PLL Multipler Selection Bit (3x Output Frequency Selected)
#pragma config PLLEN = ENABLED // PLL Enable Bit (3x or 4x PLL Enabled)
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
#pragma config BORV = HI // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), high trip point selected.)
#pragma config LPBOR = OFF // Low-Power Brown Out Reset (Low-Power BOR is disabled)
#pragma config LVP = OFF // Low-Voltage Programming Enable (High-voltage on MCLR/VPP must be used for programming)
// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.
#include <xc.h>

94
Neo-pixels Code/UBMP410.c Normal file
View File

@@ -0,0 +1,94 @@
/*==============================================================================
File: UBMP410.c
Date: March 1, 2022
UBMP4.1 (PIC16F1459) hardware initialization functions
Initialization functions to configure the PIC16F1459 oscillator and on-board
UBMP4 devices. Include UMBP410.h in your main program to call these functions.
==============================================================================*/
#include "xc.h" // XC compiler general include file
#include "stdint.h" // Include integer definitions
#include "stdbool.h" // Include Boolean (true/false) definitions
#include "UBMP410.h" // Include UBMP4.1 constant and function definitions
// TODO Initialize oscillator, ports and other PIC/UBMP hardware features here:
// Configure oscillator for 48 MHz operation (required for USB bootloader).
void OSC_config(void)
{
OSCCON = 0xFC; // Set 16MHz HFINTOSC with 3x PLL enabled
ACTCON = 0x90; // Enable active clock tuning from USB clock
while(!PLLRDY); // Wait for PLL lock (disable for simulation)
}
// Configure hardware ports and peripherals for on-board UBMP4 I/O devices.
void UBMP4_config(void)
{
OPTION_REG = 0b01010111; // Enable port pull-ups, TMR0 internal, div-256
LATA = 0b00000000; // Clear Port A latches before configuring PORTA
TRISA = 0b00001111; // Set RUNLED and Beeper pins as outputs
ANSELA = 0b00000000; // Make all Port A pins digital
WPUA = 0b00001000; // Enable weak pull-up on SW1 input only
LATB = 0b00000000; // Clear Port B latches before configuring PORTB
TRISB = 0b11110000; // Enable pushbutton pins as inputs (SW2-SW5)
ANSELB = 0b00000000; // Make all Port B pins digital
WPUB = 0b11110000; // Enable weak pull-ups on pushbutton inputs
LATC = 0b00000000; // Clear Port C latches before configuring PORTC
TRISC = 0b00001110; // Set LED pins as outputs, H1-H4 pins as inputs
ANSELC = 0b00000000; // Make all Port C pins digital
// Enable interrupts here, if required.
}
// Configure ADC for 8-bit conversion from on-board phototransistor Q1 (AN7).
void ADC_config(void)
{
LATC = 0b00000000; // Clear Port C latches before configuring PORTC
// Configure RC3 for analog input. Enable additional or other inputs below:
TRISCbits.TRISC3 = 1; // Disable individual output drivers (TRISx.bit = 1)
ANSELC = 0b00001000; // Enable individual analog inputs (ANSELx.bit = 1)
// General ADC setup and configuration
ADCON0 = 0b00011100; // Set channel to AN7, leave A/D converter off
ADCON1 = 0b01100000; // Left justified result, FOSC/64 clock, +VDD ref
ADCON2 = 0b00000000; // Auto-conversion trigger disabled
}
// Enable ADC and switch the input mux to the specified channel (use channel
// constants defined in UBMP410.h header file - eg. ANQ1).
void ADC_select_channel(unsigned char channel)
{
ADON = 1; // Turn the A-D converter on
ADCON0 = (ADCON0 & 0b10000011); // Clear channel select (CHS) bits by ANDing
ADCON0 = (ADCON0 | channel); // Set channel by ORing with channel const.
}
// Convert currently selected channel and return 8-bit conversion result.
unsigned char ADC_read(void)
{
GO = 1; // Start the conversion by setting Go/~Done bit
while(GO) // Wait for the conversion to finish (GO==0)
; // Terminate the empty while loop
return (ADRESH); // Return the MSB (upper 8-bits) of the result
}
// Enable ADC, switch to specified channel, and return 8-bit conversion result.
// Use channel constants defined in UBMP410.h header file (eg. ANQ1).
unsigned char ADC_read_channel(unsigned char channel)
{
ADON = 1; // Turn the A-D converter on
ADCON0 = (ADCON0 & 0b10000011); // Clear channel select (CHS) bits by ANDing
ADCON0 = (ADCON0 | channel); // Set channel by ORing with chan. constant
__delay_us(5); // Allow input to settle (charges internal cap.)
GO = 1; // Start the conversion by setting Go/~Done bit
while(GO) // Wait for the conversion to finish (GO==0)
; // Terminate the empty while loop
ADON = 0; // Turn the A-D converter off
return (ADRESH); // Return the MSB (upper 8-bits) of the result
}

150
Neo-pixels Code/UBMP410.h Normal file
View File

@@ -0,0 +1,150 @@
/*==============================================================================
File: UBMP410.h
Date: March 1, 2022
UBMP4.1 (PIC16F1459) symbolic constant definitions and function prototypes
I/O pin definitions section:
Inputs read port registers (eg. RC0), and outputs write to port latches
(eg. LATC0). Use this file to create unique symbolic names for each input
and output device connected to the I/O pins of the PIC16F1459 in the UBMP4.1
ADC input channel definitions section:
Definitions representing ADCON0 channel select (CHS) bit for the ADC channels
available on the UMBP4.
Function prototypes section:
Functions in the UBMP410.c file need to be defined before use in the main user
program. This header file contains the function prototype definitions for the
functions in the UBMP410.c file.
==============================================================================*/
// TODO - Add/modify user constant definitions for UBMP hardware here.
// PORTA I/O pin definitions
#define SW1 PORTAbits.RA3 // S1/Reset pushbutton input
#define BEEPER LATAbits.LATA4 // Piezo beeper (LS1) output
#define LS1 LATAbits.LATA4 // Piezo beeper (LS1) output
#define D1 LATAbits.LATA5 // LED D1/Run LED output (active-low)
#define LED1 LATAbits.LATA5 // LED D1/Run LED output (active-low)
#define RUNLED LATAbits.LATA5 // LED D1/Run LED output (active-low)
// PORTB I/O pin definitions
#define SW2 PORTBbits.RB4 // Pushbutton SW2 input
#define SW3 PORTBbits.RB5 // Pushbutton SW3 input
#define SW4 PORTBbits.RB6 // Pushbutton SW4 input
#define SW5 PORTBbits.RB7 // Pushbutton SW5 input
// PORTC I/O pin definitions
#define H1IN PORTCbits.RC0 // External I/O header H1 input
#define H1OUT LATCbits.LATC0 // External I/O header H1 output
#define H2IN PORTCbits.RC1 // External I/O header H2 input
#define H2OUT LATCbits.LATC1 // External I/O header H2 output
#define H3IN PORTCbits.RC2 // External I/O header H3 input
#define H3OUT LATCbits.LATC2 // External I/O header H3 output
#define IR PORTCbits.RC2 // IR demodulator (U2) input
#define U2 PORTCbits.RC2 // IR demodulator (U2) input
#define H4IN PORTCbits.RC3 // External I/O header H4 input
#define H4OUT LATCbits.LATC3 // External I/O header H4 output
#define Q1 PORTCbits.RC3 // Phototransistor/ambient light sensor (Q1) input
#define H5IN PORTCbits.RC4 // External I/O header H5 input
#define H5OUT LATCbits.LATC4 // External I/O header H5 output
#define D3 LATCbits.LATC4 // LED D3 output
#define LED3 LATCbits.LATC4 // LED D3 output
#define H6IN PORTCbits.RC5 // External I/O header H6 input
#define H6OUT LATCbits.LATC5 // External I/O header H6 output
#define D4 LATCbits.LATC5 // LED D4 output
#define LED4 LATCbits.LATC5 // LED D4 output
#define D2 LATCbits.LATC5 // LED D2/IR LED output
#define LED2 LATCbits.LATC5 // LED D2/IR LED output
#define IRLED LATCbits.LATC5 // LED2/IR LED output
#define H7IN PORTCbits.RC6 // External I/O header H7 input
#define H7OUT LATCbits.LATC6 // External I/O header H7 output
#define D5 LATCbits.LATC6 // LED D5 output
#define LED5 LATCbits.LATC6 // LED D5 output
#define H8IN PORTCbits.RC7 // External I/O header H8 input
#define H8OUT LATCbits.LATC7 // External I/O header H8 output
#define D6 LATCbits.LATC7 // LED D6 output
#define LED6 LATCbits.LATC7 // LED D6 output
// ADC (A-D converter) input channel definitions for read_ADC() function
#define AN4 0b00010000 // A-D converter channel 4 input
#define ANH1 0b00010000 // External H1 header analogue input (Ch4))
#define AN5 0b00010100 // A-D converter channel 5 input
#define ANH2 0b00010100 // External H2 header analogue input (Ch5)
#define AN6 0b00011000 // A-D converter channel 6 input
#define ANH3 0b00011000 // External H3 header analogue input (Ch6)
#define AN7 0b00011100 // A-D converter channel 7 input
#define ANH4 0b00011100 // External H4 header analogue input (Ch7)
#define ANQ1 0b00011100 // Q1 phototransistor A-D input (Ch7)
#define AN8 0b00100000 // A-D converter channel 8 input
#define ANH7 0b00100000 // External H7 header analogue input (Ch8)
#define AN9 0b00100100 // A-D converter channel 9 input
#define ANH8 0b00100100 // External H8 header analogue input (Ch9)
#define AN10 0b00101000 // A-D converter channel 10 input (SW2)
#define AN11 0b00101100 // A-D converter channel 11 input (SW3)
#define ANTIM 0b01110100 // On-die temperature indicator module input
// Clock frequency for delay macros and simulation
#define _XTAL_FREQ 48000000 // Set clock frequency for time delays
// Prototypes for UBMP410.c functions:
/**
* Function: void OSC_config(void)
*
* Configure oscillator for 48 MHz operation (required for USB bootloader).
*/
void OSC_config(void);
/**
* Function: void UBMP4_config(void)
*
* Configure hardware ports and peripherals for on-board UBMP4 I/O devices.
*/
void UBMP4_config(void);
/**
* Function: void ADC_config(void)
*
* Configure ADC for 8-bit conversion from on-board phototransistor Q1 (AN7).
*/
void ADC_config(void);
/**
* Function: void ADC_select_channel(unsigned char channel)
*
* Enable ADC and switch input mux to specified channel based on the channel
* constants defined above.
*
* Example usage: ADC_select_channel(ANTIM);
*/
void ADC_select_channel(unsigned char);
/**
* Function: unsigned char ADC_read(void)
*
* Convert currently selected channel and return 8-bit conversion result.
*
* Example usage: light_level = ADC_read();
*/
unsigned char ADC_read(void);
/**
* Function: unsigned char ADC_read_channel(unsigned char channel)
*
* Enable ADC, switch to the channel specified by channel constants defined
* above, and return the 8-bit conversion result.
*
* Example usage: light_level = ADC_read_channel(ANQ1);
*/
unsigned char ADC_read_channel(unsigned char);
// TODO - Add additional function prototypes for new functions in UBMP410.c here

View File

@@ -0,0 +1,194 @@
#
# 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=${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
else
IMAGE_TYPE=production
OUTPUT_SUFFIX=hex
DEBUGGABLE_SUFFIX=elf
FINAL_IMAGE=${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
endif
ifeq ($(COMPARE_BUILD), true)
COMPARISON_BUILD=-mafrlcsj
else
COMPARISON_BUILD=
endif
ifdef SUB_IMAGE_ADDRESS
else
SUB_IMAGE_ADDRESS_COMMAND=
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=PIC16F1459-config.c UBMP410.c NeoPixels.c
# Object Files Quoted if spaced
OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/PIC16F1459-config.p1 ${OBJECTDIR}/UBMP410.p1 ${OBJECTDIR}/NeoPixels.p1
POSSIBLE_DEPFILES=${OBJECTDIR}/PIC16F1459-config.p1.d ${OBJECTDIR}/UBMP410.p1.d ${OBJECTDIR}/NeoPixels.p1.d
# Object Files
OBJECTFILES=${OBJECTDIR}/PIC16F1459-config.p1 ${OBJECTDIR}/UBMP410.p1 ${OBJECTDIR}/NeoPixels.p1
# Source Files
SOURCEFILES=PIC16F1459-config.c UBMP410.c NeoPixels.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}
ifneq ($(INFORMATION_MESSAGE), )
@echo $(INFORMATION_MESSAGE)
endif
${MAKE} -f nbproject/Makefile-default.mk ${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}
MP_PROCESSOR_OPTION=16F1459
# ------------------------------------------------------------------------------------
# Rules for buildStep: compile
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${OBJECTDIR}/PIC16F1459-config.p1: PIC16F1459-config.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/PIC16F1459-config.p1.d
@${RM} ${OBJECTDIR}/PIC16F1459-config.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=none -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/PIC16F1459-config.p1 PIC16F1459-config.c
@-${MV} ${OBJECTDIR}/PIC16F1459-config.d ${OBJECTDIR}/PIC16F1459-config.p1.d
@${FIXDEPS} ${OBJECTDIR}/PIC16F1459-config.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/UBMP410.p1: UBMP410.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/UBMP410.p1.d
@${RM} ${OBJECTDIR}/UBMP410.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=none -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/UBMP410.p1 UBMP410.c
@-${MV} ${OBJECTDIR}/UBMP410.d ${OBJECTDIR}/UBMP410.p1.d
@${FIXDEPS} ${OBJECTDIR}/UBMP410.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/NeoPixels.p1: NeoPixels.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/NeoPixels.p1.d
@${RM} ${OBJECTDIR}/NeoPixels.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -D__DEBUG=1 -mdebugger=none -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/NeoPixels.p1 NeoPixels.c
@-${MV} ${OBJECTDIR}/NeoPixels.d ${OBJECTDIR}/NeoPixels.p1.d
@${FIXDEPS} ${OBJECTDIR}/NeoPixels.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
else
${OBJECTDIR}/PIC16F1459-config.p1: PIC16F1459-config.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/PIC16F1459-config.p1.d
@${RM} ${OBJECTDIR}/PIC16F1459-config.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/PIC16F1459-config.p1 PIC16F1459-config.c
@-${MV} ${OBJECTDIR}/PIC16F1459-config.d ${OBJECTDIR}/PIC16F1459-config.p1.d
@${FIXDEPS} ${OBJECTDIR}/PIC16F1459-config.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/UBMP410.p1: UBMP410.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/UBMP410.p1.d
@${RM} ${OBJECTDIR}/UBMP410.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/UBMP410.p1 UBMP410.c
@-${MV} ${OBJECTDIR}/UBMP410.d ${OBJECTDIR}/UBMP410.p1.d
@${FIXDEPS} ${OBJECTDIR}/UBMP410.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
${OBJECTDIR}/NeoPixels.p1: NeoPixels.c nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} "${OBJECTDIR}"
@${RM} ${OBJECTDIR}/NeoPixels.p1.d
@${RM} ${OBJECTDIR}/NeoPixels.p1
${MP_CC} $(MP_EXTRA_CC_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -c -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -DXPRJ_default=$(CND_CONF) -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits $(COMPARISON_BUILD) -std=c99 -gdwarf-3 -mstack=compiled:auto:auto -o ${OBJECTDIR}/NeoPixels.p1 NeoPixels.c
@-${MV} ${OBJECTDIR}/NeoPixels.d ${OBJECTDIR}/NeoPixels.p1.d
@${FIXDEPS} ${OBJECTDIR}/NeoPixels.p1.d $(SILENT) -rsi ${MP_CC_DIR}../
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: assemble
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
else
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: assembleWithPreprocess
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
else
endif
# ------------------------------------------------------------------------------------
# Rules for buildStep: link
ifeq ($(TYPE_IMAGE), DEBUG_RUN)
${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.map -D__DEBUG=1 -mdebugger=none -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
@${RM} ${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.hex
else
${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
@${MKDIR} ${DISTDIR}
${MP_CC} $(MP_EXTRA_LD_PRE) -mcpu=$(MP_PROCESSOR_OPTION) -Wl,-Map=${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.map -DXPRJ_default=$(CND_CONF) -Wl,--defsym=__MPLAB_BUILD=1 -mdfp="${DFP_DIR}/xc8" -fno-short-double -fno-short-float -mrom=default,-0-7FF -O0 -fasmfile -maddrqual=ignore -xassembler-with-cpp -mwarn=-3 -Wa,-a -msummary=-psect,-class,+mem,-hex,-file -mcodeoffset=800 -ginhx32 -Wl,--data-init -mno-keep-startup -mno-osccal -mno-resetbits -mno-save-resetbits -mno-download -mno-stackcall -mdefault-config-bits -std=c99 -gdwarf-3 -mstack=compiled:auto:auto $(COMPARISON_BUILD) -Wl,--memorysummary,${DISTDIR}/memoryfile.xml -o ${DISTDIR}/UBMP410-Intro-1-Input-Output.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED}
endif
# Subprojects
.build-subprojects:
# Subprojects
.clean-subprojects:
# Clean Targets
.clean-conf: ${CLEAN_SUBPROJECTS}
${RM} -r ${OBJECTDIR}
${RM} -r ${DISTDIR}
# Enable dependency checking
.dep.inc: .depcheck-impl
DEPFILES=$(shell "${PATH_TO_IDE_BIN}"mplabwildcard ${POSSIBLE_DEPFILES})
ifneq (${DEPFILES},)
include ${DEPFILES}
endif

View File

@@ -0,0 +1,14 @@
#
#Fri Jun 17 18:32:58 GMT 2022
default.languagetoolchain.version=2.32
default.Pack.dfplocation=/home/lib/packs/Microchip/PIC12-16F1xxx_DFP/1.3.90
default.com-microchip-mplab-mdbcore-simulator-Simulator.md5=19e4dc0f223322f74cda227c3c12c71c
conf.ids=default
default.languagetoolchain.dir=/opt/microchip/xc8/v2.32/bin
host.id=37wn-iwor-wg
configurations-xml=41c39f30d13acc4d322e92e2dfe0e0e2
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=6e02ca5e9f5042ffd365b42ab82d3a9b
user-defined-mime-resolver-xml=none
default.com-microchip-mplab-nbide-toolchain-xc8-XC8LanguageToolchain.md5=ab1e0737b447a24f7366e9fd8fe5a2f0
proj.dir=/home/projects/UBMP4.1-Intro-1-Input-Output/UBMP410-Intro-1-Input-Output.X
host.platform=linux

View File

@@ -0,0 +1,69 @@
#
# Generated Makefile - do not edit!
#
# Edit the Makefile in the project folder instead (../Makefile). Each target
# has a pre- and a post- target defined where you can add customization code.
#
# This makefile implements macros and targets common to all configurations.
#
# NOCDDL
# Building and Cleaning subprojects are done by default, but can be controlled with the SUB
# macro. If SUB=no, subprojects will not be built or cleaned. The following macro
# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf
# and .clean-reqprojects-conf unless SUB has the value 'no'
SUB_no=NO
SUBPROJECTS=${SUB_${SUB}}
BUILD_SUBPROJECTS_=.build-subprojects
BUILD_SUBPROJECTS_NO=
BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}}
CLEAN_SUBPROJECTS_=.clean-subprojects
CLEAN_SUBPROJECTS_NO=
CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
# Project Name
PROJECTNAME=UBMP410-Intro-1-Input-Output.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

View File

@@ -0,0 +1,37 @@
#
# Generated Makefile - do not edit!
#
#
# This file contains information about the location of compilers and other tools.
# If you commmit this file into your revision control server, you will be able to
# to checkout the project and build it from the command line with make. However,
# if more than one person works on the same project, then this file might show
# conflicts since different users are bound to have compilers in different places.
# In that case you might choose to not commit this file and let MPLAB X recreate this file
# for each user. The disadvantage of not commiting this file is that you must run MPLAB X at
# least once so the file gets created and the project can be built. Finally, you can also
# avoid using this file at all if you are only building from the command line with make.
# You can invoke make with the values of the macros:
# $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ...
#
PATH_TO_IDE_BIN=/home/lib/mplab_platform/platform/../mplab_ide/modules/../../bin/
# Adding MPLAB X bin directory to path.
PATH:=/home/lib/mplab_platform/platform/../mplab_ide/modules/../../bin/:$(PATH)
# Path to java used to run MPLAB X when this makefile was created
MP_JAVA_PATH="/usr/lib/jvm/zulu8.54.0.21-ca-fx-jre8.0.292-linux_x64/bin/"
OS_CURRENT="$(shell uname -s)"
MP_CC="/opt/microchip/xc8/v2.32/bin/xc8-cc"
# MP_CPPC is not defined
# MP_BC is not defined
MP_AS="/opt/microchip/xc8/v2.32/bin/xc8-cc"
MP_LD="/opt/microchip/xc8/v2.32/bin/xc8-cc"
MP_AR="/opt/microchip/xc8/v2.32/bin/xc8-ar"
DEP_GEN=${MP_JAVA_PATH}java -jar "/home/lib/mplab_platform/platform/../mplab_ide/modules/../../bin/extractobjectdependencies.jar"
MP_CC_DIR="/opt/microchip/xc8/v2.32/bin"
# MP_CPPC_DIR is not defined
# MP_BC_DIR is not defined
MP_AS_DIR="/opt/microchip/xc8/v2.32/bin"
MP_LD_DIR="/opt/microchip/xc8/v2.32/bin"
MP_AR_DIR="/opt/microchip/xc8/v2.32/bin"
# MP_BC_DIR is not defined
DFP_DIR=/home/lib/packs/Microchip/PIC12-16F1xxx_DFP/1.3.90

View File

@@ -0,0 +1,10 @@
#
# Generated - do not edit!
#
# NOCDDL
#
CND_BASEDIR=`pwd`
# default configuration
CND_ARTIFACT_DIR_default=dist/default/production
CND_ARTIFACT_NAME_default=UBMP410-Intro-1-Input-Output.X.production.hex
CND_ARTIFACT_PATH_default=dist/default/production/UBMP410-Intro-1-Input-Output.X.production.hex

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<configurationDescriptor version="65">
<projectmakefile>Makefile</projectmakefile>
<defaultConf>0</defaultConf>
<confs>
<conf name="default" type="2">
<platformToolSN></platformToolSN>
<languageToolchainDir>/opt/microchip/xc8/v2.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>

View File

@@ -0,0 +1,27 @@
<?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>UBMP410-Intro-1-Input-Output</name>
<creation-uuid>3f3e6aa1-e07b-4176-842d-275485b6edd1</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/>
<sourceRootList/>
<confList>
<confElem>
<name>default</name>
<type>2</type>
</confElem>
</confList>
<formatting>
<project-formatting-style>false</project-formatting-style>
</formatting>
</data>
</configuration>
</project>