new homework
First section/17014_SPC Lab Manual.pdf
17014 SPC
16-bit Standard Peripheral Configuration
Bob Smith Microchip Technology Inc.
Lab Manual
17014 SPC
The Microchip name and logo, the Microchip logo, dsPIC, FlashFlex, KeeLoq, KeeLoq logo, MPLAB, PIC, PICmicro, PIC- START, PIC32 logo, rfPIC, SST, SST Logo, SuperFlash and UNI/O are registered trademarks of Microchip Technology Incor- porated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MTP, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A. Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries. Analog-for-the-Digital Age, Application Maestro, BodyCom, chipKIT, chipKIT logo, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In‑Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, rfLAB, Select Mode, SQI, Serial Quad I/O, Total Endurance, TSHARC, UniWin- Driver, WiperLock, ZENA and Z-Scale are trademarks of Microchip Technology Incorporated in the U.S.A. and other coun- tries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. GestIC and ULPP are registered trademarks of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries. All other trademarks mentioned herein are property of their respective companies.
© 2013, Microchip Technology Incorporated, All Rights Reserved.
17014 SPC
16-bit Standard Peripheral Configuration Lab Manual
Table of Contents
Lab Exercise 1: General Purpose I/O Ports ................................................................ 1-1 Lab Exercise 2: ADC .................................................................................................. 2-1 Lab Exercise 3: Timers ............................................................................................... 3-1 Lab Exercise 4: PWM (Pulse Width Modulation) ........................................................ 4-1 Lab Exercise 5: UART ................................................................................................ 5-1 16-bit Core Bonus Labs: Lab Exercise 1: Program Space Visibility (PSV) and Table Reads and Writes .......... 6-1 Lab Exercise 2: Working with Interrupts ..................................................................... 7-1 Appendix B: PIC24FJ64GA004 Pinout ....................................................................... B-1
17014 SPC
This page intentionally blank
17014 SPC
1-1
Lab 1
Objective
Lab Exercise 1 Using the General Purpose I/O Ports
Reinforce your knowledge of the GPIO Ports on Microchip’s 16 bit devices by observing working code and writ- ing your own.
This lab demonstrates how to configure the PIC24 general purpose I/O (GPIO) ports. A GPIO pin takes an input from a
switch (S4) on the Explorer 16 board and drives an output pin connected to an LED. The LED will be on when the switch
is pressed and off when not pressed.
The PIC exits RESET with all PORT pins configured as inputs. Output values are initialized with the output latch register
(LATx) before configuring pins as outputs with the data direction register (TRISx).
LED D6 is blinked at a 1/4 Hz rate. This is done using a
compiler "builtin" function and a "delay_ms" library
function.
Purpose
Requirements
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Lab1
Turn on LED with push button press
Push buttons
17014 SPC
1-2
Lab 1
Procedure
Open the project
Open the source file
Open the “Source Files” folder in the “Project” window and double click on the source file you want to open.
C:\Masters\17014\Lab1 Solution\Lab1_Solution.c
There are lots of comments in this code, so it shouldn’t be too hard to follow. Please focus your time on the code pertaining to the peripheral we are using in this lab. Pay special attention to the special function registers (SFRs) used to configure this peripheral. A function has been provided to debounce the switch. “SwitchPressed” receives a pointer to the “PORTx” reg- ister and a bit location in that register. This bit location corresponds with an input pin connected to a switch. “SwitchPressed” returns a “1” if the switch is pressed and returns a “0” if not pressed. Note a compiler “built-in” function is used to efficiently toggle an output pin connected to an LED. A compiler library function (__delay_ms()) is used to set the duration of the on/off time. Push switch S4 to turn on LED D3. Release the switch to turn it off.
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
Analyze the source code
Open the Lab1 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Lab1.X).
See Appendix A, Section 1 for more details
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
See Appendix A, Section 3 for more details
17014 SPC
1-3
Lab 1
Edit the code
Find this section of code in the Lab1.c file. Use the provided “SwitchPressed” function to debounce switch S5 and turn LED D5 on and off. SwitchPressed is described in step 3.
Exercise 1.1
Find this section of code in the Lab1.c file. Use the “TRISC” register to configure the pin connected to the switch as an input. See the following page for a description of this register.
Exercise 1.2
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
1-4
Lab 1
The description of this register in the device data sheet or PIC24F Family Reference Manual shows that all bits are set after a Power on Reset. Since RB0 is already configured as an input, setting this bit is redundant. We perform this step to demonstrate how to configure the PORT pins as inputs or outputs.
Find this section of code in the Lab1.c file. Configure the pin connected to LED D5 as an output.
Exercise 1.3
R = Programmer can Read this bit W = Programmer can Write this bit -x = bit is unknown at Power on Reset -0 = bit is clear at Power on Reset -1 = bit is set at Power on Reset
17014 SPC
1-5
Lab 1
Switch S5 should now control LED D5. If not, debug your code to find what is wrong. You can look at the solution in the “Lab1 Solution” folder if you get stuck.
Results
Conclusions
This first lab taught us how to configure and use the Port pins. Example code for debouncing a switch and blinking an LED
was also provided.
We also learned how to use the data sheet or PIC24F Family Reference Manual to determine what the Special Function
Register (SFR) values are after a Power On Reset.
Observe your code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
2-1
Lab 2
Lab Exercise 2 Working with the ADC
The purpose of this lab is to demonstrate your ability to use the ADC to acquire an analog signal.
This lab demonstrates how to configure the PIC24 ADC. An analog voltage is applied to one of the analog input pins via the potentiometer on the Explorer 16 evaluation board. The ADC continuously converts this voltage to a digital value and displays it on the LEDs. The ADC can also be configured to interface with the on-board temp sensor. The temp sensor value can also be displayed on the LEDs.
Purpose
Requirements
Objective
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Lab2
Potentiometer
Analog temperature sensor
Watch the LEDs display
the ADC output
17014 SPC
2-2
Lab 2
Procedure
Open the source file
Open the “Source Files” folder in the “Project” window and double click on the source file you want to open.
C:\Masters\17014\Lab2 Solution\Lab2_Solution.c
Analyze the source code
There are lots of comments in this code, so it shouldn’t be too hard to follow. Please focus your time on the code pertaining to the peripheral we are using in this lab. Pay special attention to the special function registers (SFRs) used to configure this peripheral. The “main” function configures the pins connected to LEDs as outputs and initializes the ADC to connect to the potentiometer on the Explorer 16 board. Interrupts are not used in this lab, but the ADC interrupt flag is moni- tored to see when an ADC interrupt event has occurred (interrupt flags are set even if interrupts are disabled). When the ADC interrupt flag is set (configured to set after acquiring 16 samples), the most recent 16 ADC sam- ples are averaged, scaled to 8 bits, and displayed on the on the LEDs. The “ADCInit” function configures the ADC. See the ADC special function registers on the following pages. Note many of the bits in these registers are left in their default state. Follow the steps to connect the ADC to the analog temperature sensor instead of the potentiometer. The same functions to average the ADC results and display them on the LEDs will be used.
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
Open the project
Open the Lab2 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Lab2.X).
See Appendix A, Section 1 for more details
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
See Appendix A, Section 3 for more details
17014 SPC
2-3
Lab 2
17014 SPC
2-4
Lab 2
17014 SPC
2-5
Lab 2
TAD = TCY
TCY is the instruction period and is equal to half the oscillator fre- quency (FOSC). TAD is the ADC conversion period.
The Auto-Sample time bits deter- mine how long the sample cap is charged for before disconnecting from the pin to be converted. The class slides show an example calculation for this time to be about 1us. The Auto-Sample time bits are configured for 4 TAD. With TAD configured to be equal to TCY, and TCY = 250ns, 4 TAD = 1us.
17014 SPC
2-6
Lab 2
Edit the code
Find this section of code in the Lab2.c file. Comment out the line shown to disconnect the potentiometer from the ADC.
Exercise 2.1
Find this section of code in the Lab2.c file. Insert code to connect the analog temperature sensor to the ADC using the “AD1CHS” special function register (SFR). This register is described in the data sheet and shown on the following page.
Exercise 2.2
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
2-7
Lab 2
The description of this register in the device data sheet shows the state of these bits after a Power on Reset and describes the functionality of each bit. Pin “AN6” on the Explorer 16 board is connected to the analog temperature sensor. Configure the “CH0SA” bits to use this pin as the input for MUX A.
R = Programmer can Read this bit W = Programmer can Write this bit -x = bit is unknown at Power on Reset -0 = bit is clear at Power on Reset -1 = bit is set at Power on Reset
17014 SPC
2-8
Lab 2
Temperature sensor data should be displayed on the LEDs. Touch the temp sensor and observe the LEDs change. If not, debug your code to find what is wrong or check your pulse to ensure you are still alive. You can look at the solution in the “Lab2 Solution” folder if you get stuck.
Results
Conclusions
This lab allowed us how to configure and use the ADC to convert an analog signal from the potentiometer and analog tem-
perature sensor. The ADC result was displayed on the LEDs.
Observe your code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
3-1
Lab 3
Lab Exercise 3 Working with Timers
Reinforce your knowledge of the Timers by observing working code and writing your own.
This labs uses a 32bit timer (Timer3:Timer2) to drive a stop watch application. The timer will be configured to generate an interrupt every tenth of a second. A function will keep track of how many times the interrupt has occurred and will use this information to drive the elapsed time on the display. Switch S3 (left side) on the Ex- plorer 16 is used to start and stop the stopwatch. This code has been initially configured to use the internal Fast RC oscillator running at 8MHz. You will change this to use the same oscillator running at 1MHz. Changing the oscillator clock frequency will require you to enter a new Timer2 period value to maintain a 1/10th second tick.
Purpose
Requirements
Objective
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Lab3
Display stopwatch
Start and stop with S3
17014 SPC
3-2
Lab 3
Procedure
Open the source file
Open the “Source Files” folder in the “Project” window and double click on the source file you want to open.
C:\Masters\17014\Lab3 Solution\Lab3_Solution.c
Analyze the source code
There are lots of comments in this code, so it shouldn’t be too hard to follow. Please focus your time on the code pertaining to the peripheral we are using in this lab. Pay special attention to the special function registers (SFRs) used to configure this peripheral. The “main” function initializes the LCD and a 32 bit Timer (Timer2 & Timer3), then runs the “StopWatch” func- tion. The “StopWatch” function is an endless loop that starts and stops the stopwatch and waits for Timer3 interrupts to occur. Interrupts are configured to happen every tenth of a second. The interrupt service routine (ISR) sets a flag that causes the stopwatch to increment every tenth of a second when running.
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
Open the project
Open the Lab3 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Lab3.X).
See Appendix A, Section 1 for more details
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
See Appendix A, Section 3 for more details
17014 SPC
3-3
Lab 3
17014 SPC
3-4
Lab 3
Edit the code
Find this section of code in the Lab3.c file. Comment out the line shown. These bits will be set to a different value in the next step.
Exercise 3.1
Find this section of code in the Lab3.c file. Configure the RC oscillator postscaler select bits to divide by eight. This register is described in the data sheet and shown on the following page.
Exercise 3.2
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
3-5
Lab 3
17014 SPC
3-6
Lab 3
Find this section of code in the Lab3.c file. Comment out the line shown. These bits will be set to a different value in the next step.
Exercise 3.3
Find this section of code in the Lab3.c file. Given an input clock of 1MHz (FCY = 500 KHz), configure the Timer3:Timer2 period registers to generate an interrupt 10 times per second.
Exercise 3.4
The 32 bit timer period register (PR3:PR2) needs to be loaded with a value that will enable “Timer3:Timer2” to gen- erate an interrupt 10 times per second. The Timer3 interrupt service routine runs 10 times per second and causes the stopwatch to increment by 1/10th of a second every interrupt.
Timer3:Timer2 Count Register
PR3:PR2 Period Register
32 bit Comparator
PR2 = ? PR3 = ?
Instruction Clock
FOSC/2 = 500KHz
Sets Timer2 Interrupt Flag Bit
Period Register = Output Clock
Instruction Clock
PR3:PR2 = 50,000 = 0x0C350
PR3:PR2 = 10 Hz
500 KHz
10 interrupts per second
17014 SPC
3-7
Lab 3
The stopwatch should operate exactly as it did before you changed the input clock from 4 MHz to 500KHz. You can look at the solution in the “Lab3 Solution” folder if you get stuck.
Results
Conclusions
This lab allowed us how to configure and use Timers 2 and 3 in 32 bit mode. We changed the input clock to the timer and
adjusted the period registers to maintain 10 interrupts per second.
Observe your code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
4-1
Lab 4
Lab Exercise 4 Generating a PWM (Pulse Width Modulated) Signal
Objective
Demonstrate your ability to configure the OC/PWM peripheral to drive an LED on the eval board with a PWM signal.
This lab demonstrates how to configure the PIC24 Output Compare peripheral in PWM mode. Timer2 is config- ured to supply a 1Hz period for the PWM waveform. The duty cycle register is configured to provide a 50% duty cycle. The Output Compare pin has been mapped (using PPS) to connect to the left-most LED on the Explorer 16 evaluation board (LED #D10). The PWM signal driving the LED will turn the LED on for half a second and turn it off for half a second. The PWM duty cycle can be modified by changing the PWM duty cycle register (OC1RS). The period will stay fixed at 1 second but the LED on/off time will change. Follow the instructions to modify the PWM waveform to dim the LED instead of blinking.
Purpose
Requirements
Output Compare pin
PWM with 50% Duty Cycle
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Lab4
LED D10 is driven by PWM
17014 SPC
4-2
Lab 4
Procedure
Open the source file
Open the “Source Files” folder in the “Project” window and double click on the source file you want to open.
C:\Masters\17014\Lab4 Solution\Lab4_Solution.c
Analyze the source code
There are lots of comments in this code, so it shouldn’t be too hard to follow. Please focus your time on the code pertaining to the peripheral we are using in this lab. Pay special attention to the special function registers (SFRs) used to configure this peripheral. The “main” function initializes the Port pins connected to the LEDs as outputs, maps the Output Compare pin (“OC1”) using Peripheral Pin Select (PPS) to the “RP22” (Remappable Pin) pin, configures the Output Compare peripheral for PWM mode, then drops into an infinite loop. The “OCInit()” function configures the output compare peripheral for PWM mode, sets the PWM duty cycle, selects Timer2 as the time base and calls the “Timer2Init()” function. The Timer2Init() function configures Timer2 to use the default clock source (instruction clock, FCY) and prescales (divides) this by 64. The Timer2 period register “PR2” controls the period of the PWM waveform. See the Output Compare and Timer2 control registers on the following pages. Observe what the bits in these registers control and their default settings.
Open the project
Open the Lab4 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Lab4.X).
See Appendix A, Section 1 for more details
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
17014 SPC
4-3
Lab 4
17014 SPC
3-4
Lab 3
17014 SPC
4-5
Lab 4
Timer2 Count Register
PR2 Period Register
16 bit Comparator
PR2 = ?
Instruction Clock
FCY = FOSC/2 = 4MHz
Clock to Output Compare peripheral
(PR2)
= Output Clock FCY
(64) PR2 = 1 Hz
Timer2 Prescaler
1 Hz
64
FCY
64 PR2 =
FCY
Timer2 Prescaler
PR2 = 0xF424
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
See Appendix A, Section 3 for more details
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
4-6
Lab 4
Find this section of code in the Lab4.c file. Using the Timer2 period register (PR2), set the PWM period above 60 Hz to eliminate LED flicker.
Exercise 4.4
Find this section of code in the Lab4.c file. Modify the PWM duty cycle to dim the LED using the “OC1RS” bits. Make sure the PWM duty cycle is less than or equal to the period register.
Exercise 4.2
Find this section of code in the Lab4.c file. Comment out this line of code. We will change the period register to a different value in the next step.
Exercise 4.3
Edit the code
Find this section of code in the Lab4.c file. Comment out the line shown.
Exercise 4.1
The XC16 divides by powers of 2. This dramatically improves code size and processing efficiency.
17014 SPC
4-7
Lab 4
The LED’s on/off time should be too short to see. The on time is controlled by the PWM duty cycle register. This value can be changed to dim the LED. A duty cycle value of 0 will turn the LED off. You can look at the solution in the “Lab4 Solution” folder if you get stuck.
Results
Observe your code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
Conclusions
We observed how to configure the Output Compare peripheral in PWM mode. The PWM period and duty cycle were
modified to dim an LED instead of blinking it.
17014 SPC
5-1
Lab 5
Lab Exercise 5 Serial Communications with the UART
Objective
Reinforce your knowledge of the UART by observing working code and writing your own.
Purpose
Requirements
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Lab5
This lab will transmit and receive characters and strings over the UART at 9600 baud. Example code that trans- mits the characters and strings is provided. Example code for receiving characters is also provided. Typing a character in Tera Term or HyperTerm win- dows will send a character to the PIC24. The PIC24 will add one to the ASCII value received, and then transmit this new character back to the terminal. In other words, if you transmit the letter “c” to the PIC, the PIC will turn the "c" into a "d" and send it back to the terminal. Using the UART2 Status and Control Register (U2STA), configure UART2 to interrupt after 4 characters have been received (default is every character). The interrupt service routine (ISR) will echo all 4 characters without being modified.
17014 SPC
5-2
Lab 5
Procedure
Open the source file
Open the “Source Files” folder in the “Project” window and double click on the source file you want to open.
C:\Masters\17014\Lab5 Solution\Lab5_Solution.c
Analyze the source code
There are lots of comments in this code, so it shouldn’t be too hard to follow. Please focus your time on the code pertaining to the peripheral we are using in this lab. Pay special attention to the special function registers (SFRs) used to configure this peripheral. The “main” function connects the PIC24 UART Tx and Rx pins to the Tx and Rx lines on the Explorer 16 board using Peripheral Pin Select (PPS). The UART is configured and UART receive interrupts are enabled. main() calls three functions then waits for receive interrupts to be generated. The first function transmits a single character on the UART (“putCharU2()”). The letter to transmit is defined above in the “Global Variable Declarations” section. Feel free to change this. The second function transmits a string using a user defined function (“putStrU2()”). The string to transmit is defined above in the “Global Variable Declarations” section. Feel free to change this. The third function transmits a string using the “printf()” library function. This sends the string passed to this function out UART1 by default. The example code uses UART2. Note how UART2 can be used with printf() using the compiler configuration statement on the line before printf(). The UART2 receive interrupt service routine (ISR) has been provided for you. The example code has configured UART2 to generate an interrupt after every character is received. It adds one to the ASCII value received from the terminal application (HyperTerm or Terra Term running on the PC) then transmit this new value. In other words, if a “c” is received, a “d” will be transmitted and displayed in the terminal application. Follow the instructions to configure UART2 to generate an interrupt after every 4 characters received. These charac- ters will be sent back to the terminal application without being modified.
Open the project
Open the Lab5 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Lab5.X).
See Appendix A, Section 1 for more details
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
17014 SPC
5-3
Lab 5
17014 SPC
5-4
Lab 5
17014 SPC
5-5
Lab 5
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
Edit the code
Find this section of code in the Lab5.c file. Use the “UART2 Status and Control Register” (U2STA) to configure the UART to generate an interrupt after receiving 4 characters.
Exercise 5.1
If a physical Explorer 16 eval board is used, an RS232 to USB converter is needed to interface the board to the termi- nal application (Hyperterm or Terra Term) running on the PC. Select the COM port assigned to this interface and configure the serial port as follows: Baud Rate:……...9600 Data Bits:……………...8 Parity:……………..none Stop Bits: ……………...1 Flow Control:.….none Type characters into the terminal application and watch how the PIC24 echoes the following character (typing an “A” will echo a “B”).
See Appendix A, Section 3 for more details
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
The Terra Term program is included with the class materials. Find it in the “Tools” directory.
17014 SPC
5-6
Lab 5
A single character and two strings should be displayed per the example code. Typing characters into the terminal application will transmit these characters to the PIC24. They will not be displayed in the terminal window until the PIC receives four characters. Once the PIC receives four characters, the UART2 ISR will transmit all four received characters (without modification) back to the terminal application. Typing “1234” will return “1234” as soon as the “4” is typed.
Results
Conclusions
We observed how to configure the UART to transmit and receive characters and strings. We also learned how to gen-
erate fewer UART interrupts by buffering 4 characters before each ISR.
Observe your code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
6-1
16-bit Core Lab 1
Objective
16-bit Core Lab Exercise 1
Program Space Visibility (PSV) and Table Read & Table Write
Reinforce your knowledge of Program Space Visibility (PSV) and Table Read and Write features by observing and generating code to store and access constants in program memory.
This lab demonstrates how to configure and use the Program Space Visibility (PSV) and the Table Read and Write features
in Microchip's 16-bit MCU architecture. PSV enables constants stored in program memory to be accessed as if they were
located in Data Memory. Table Read and Write functions will also be used to read from and write to program memory.
Main code initializes the LCD display and PSV, then sends a user defined string to the "LCDPut()" function. The
"LCDPut()" function displays the string on the Explorer 16's LCD display. Proper syntax for storing a string in Program
memory is also provided.
The Table Read feature is used to read an array stored in
program memory. The contents of this array are dis-
played on the LEDs. The contents of this array are then
erased and a new value is written into the first element of
the array.
Students have the opportunity to generate code that
configures and executes table read instructions to read an
array from program memory.
Purpose
Requirements
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Core\Lab1
String and arrays stored in program
memory and displayed on the LCD and LEDs
17014 SPC
6-2
16-bit Core Lab 1
Open the Lab1 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Core\Lab1.X).
Procedure
Open the project
Open the source file
Expand the “Source Files” folder in the “Project” window and double click on the “Lab1.c” source file.
C:\Masters\17014\Core\Lab1 Solution\Lab1_Solution.c
There are several ways to use Program Space Visibility (PSV). The simplest way is Auto PSV. In this mode, the C com- piler does most of the work for us. It is up to the programmer to declare constants that should be stored in program memory with the “const” directive.
The compiler takes it from there: 1) It stores the constants in program memory 2) Enables PSV by setting the “PSV” bit in the “CORCON” register 3) Loads the PSV Page register (“PSVPAG”) with the page where the constants are stored (“.const” section in PM) Now that the constants have been stored in PM, and PSV has been set up, we can access this data exactly like any other variable stored in data memory. The string is sent to be displayed on the LCD with the “LCDPut()” function and each element of the array “myArray” is read and displayed on the LEDs with the “register_to_LEDs()” function.
Analyze the source code
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
See Appendix A, Section 1 for more details
PSV:
17014 SPC
6-3
16-bit Core Lab 1
The following arrays are declared with the "space(psv)" attribute. This forces the compiler to create a new section in program memory for user managed constants stored in PM, including those managed with table reads and writes. The “PM_write_table” array will be used to write data to program memory. This new section needs to be aligned on a 1KB boundary due to the flash block erase process which requires that a minimum of 512 instructions (1K ad- dresses) be erased. A block erase is required before any write to flash. Be sure to allocate enough space for the block erase operation and save and restore any data (or instructions!) that should not be erased.
Analyze the source code (continued)
Table Reads:
Now that our arrays are stored in PM, it’s time to set up Table Reads and read the array. Compiler “built-in” func- tions have been created to simplify this process.
“__builtin_tblpage()” returns page where array “PM_table” lives. This is assigned to the “TBLPAG” Special Function Register (SFR).
“__builtin_tbloffset()” returns the offset from the start of the page where array “PM_table” lives. This info is needed for the TBLRDL as- sembly instruction.
After setting the Table Page register and obtaining the offset for PM_table, we can use another “built-in” function to read this array.
“__builtin_tblrdl()” uses the “TBLRDL” assem- bly instruction to return the data located at the offset in the page indicated by “TBLPAG”.
The lower 8 bits of this array are copied into “data” and sent to the “register_to_LEDs()” function to be displayed on the LEDs. This data will light one LED at a time starting at the D3 LED and moving through all LEDs ending at the D10 LED.
17014 SPC
6-4
16-bit Core Lab 1
Before we can write to the Flash program memory, we must erase it first. The minimum block erase possible is 512 instructions (1024 addresses). The Non-Volatile Memory Control register (“NVMCON”) needs to be configured to allow writes to PM and to perform a page erase when PM is unlocked. The “built-in” functions are used as before to set the TBLPAG and offset. The “__builtin_tblwtl()” function is used to write data to program memory. In this case, we are erasing the Flash, so 0xFFFFFF will be written to every 24 bit word in the page.
Analyze the source code (continued)
Table Writes:
The “unlockWrite()” function performs the steps needed to unlock the Flash before writing to it. This step is needed to ensure program memory isn’t accidentally corrupted by errant writes. The “__builtin_write_NVM()” function is used to generate the assembly code required for this. A specific data pattern (0x55, 0xAA) is required to be written to the “NVMKEY” register. As soon as this pattern is written, the hardware sets the Write Control bit (“WR”) in “NVMCON”, and starts the write process. Writing to flash requires that specific timing be followed, and therefore can not be interrupted. When the write process is complete, the hardware clears the “WR” bit which allows a return from “__builtin_write_NVM()” .
17014 SPC
6-5
16-bit Core Lab 1
17014 SPC
6-6
16-bit Core Lab 1
With the erase process completed, it’s time to write data to program memory. The Non-Volatile Memory Control register needs to be configured for a word write operation. The “ERASE” bit is cleared and the Non-Volatile Memory Operation bits (“NVMOP”) are programmed to indicate a word write. The “TBLPAG” register and offset have already been initialized in the “erasePage()” function.
Analyze the source code (continued)
Table Writes (continued):
Table write instructions do not write directly to program memory. These instructions write data to holding latches. After the latches are loaded, the programming operation can be unlocked and started with "__builtin_write_NVM()".
“__builtin_tblwtl()” will write data (0x0055 in this case) to the holding latches.
After writing to program memory, this same location is read with a Table Read command. This value is then displayed on the LEDs.
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
See Appendix A, Section 3 for more details
17014 SPC
6-7
16-bit Core Lab 1
Edit the code
Find this section of code in the Lab1.c file. Set the table page (TBLPAG) register to point to the page where "myArray" is stored in program memory. Use the "__builtin_tblpage" function.
Exercise 1.1
Get the offset from the start of the page where myArray is stored and save it in "PM_offset". Use the “__builtin_tbloffset()" function.
Exercise 1.2
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
6-8
16-bit Core Lab 1
Find this section of code in the Lab1.c file. Read the lower 16 bits at myArray's address with the table read low "built-in" function (__builtin_tblrdl()) and PM_offset obtained in the previous step. Store these bits in the "data16" variable.
Exercise 1.3
Find this section of code in the Lab1.c file and uncomment it.
Exercise 1.4
17014 SPC
6-9
16-bit Core Lab 1
Build and Run the Project with the Debugger
The LEDs will show the same pattern as before with the first pattern (0-15 count) repeated at the end due to the code added in the exercises.
Results
Conclusions
This first lab taught us how to configure and use the PSV and Table Read and Table Write features of the 16-bit core.
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
7-1
16-bit Core Lab 2
16-bit Core Lab Exercise 2
Working with Interrupts
The purpose of this lab is to demonstrate your ability to use the interrupts on Microchip’s 16-bit core.
This lab demonstrates how to configure and use interrupts in Microchip's 16-bit MCU architecture. Main code initializes the LEDs, Timer3 & 5, then continuously updates the Timer3, Timer5 and core interrupt priority levels based on the switches that are pressed. Interrupt priorities are listed in order of priority (highest to lowest) de- pending on the switch that was pressed: Switch 3 (S3):...Timer3, Timer5, core Switch 5 (S5):...Timer5, Timer3, core Switch 6 (S6):...Timer3, core, Timer5 LEDs on the Explorer 16 evaluation board keep track of which process is currently running: LED D4:….Timer3 Interrupt Service Routine (ISR) LED D5:….Timer5 ISR LED D6:….main code (no interrupts running) Timer3 ISR turns LED D4 on, waits one second, turns the LED off, then leaves the ISR. Timer5 ISR turns LED D5 on, waits 250ms, turns the LED off, then leaves the ISR.
Purpose
Requirements
Objective
Development Environment: MPLAB X IDE (v1.8 or later) with MPLAB XC16 Compiler (v1.11 or later) Hardware Tools: Explorer 16 eval board with PIC24FJ64GA004 In Circuit Debugger/Programmer (i.e. ICD3, PICkit 3) Lab files on class PC: C:\Masters\17014\Core\Lab2
Push switches to change interrupt priority level
17014 SPC
7-2
16-bit Core Lab 2
Procedure
C:\Masters\17014\Core\Lab2 Solution\Lab2_Solution.c
Analyze the source code
If you have trouble with any of the following exercises please ask for help or open the solution code for some hints.
Main code starts by initializing the PORT pins. Pins connected to switches remain as inputs and pins con- nected to LEDs are configured as outputs. Timer3 is configured to have a period of 2 seconds. This generates an interrupt every 2 seconds. Timer5 is configured to have a period of 500ms which generates an interrupt every 500ms. Both timers are config- ured with interrupts enabled, but with priority levels at 0 (disabled). These priority levels will be changed in response to switch presses.
Open the Lab2 project in the MPLAB® X IDE.
Start MPLAB X and open the project by selecting from the menu: File Open Project
Navigate to the class folder and double click on the project’s directory (C:\Masters\17014\Core\Lab2.X).
Open the project
Open the source file
Expand the “Source Files” folder in the “Project” window and double click on the “Lab2.c” source file.
See Appendix A, Section 1 for more details
17014 SPC
7-3
16-bit Core Lab 2
Analyze the source code (continued)
After initializing the timers, the switches are read and the “sw” variable is set to indicate the last switch pressed. This variable is passed into a switch statement which sets the interrupt priority levels. Note an interrupt should be disabled before changing its priority level.
LED D4 on = Timer3 ISR code processing
LED D5 on = Timer5 ISR code processing
LED D6 on = main code processing
Timer5 Interrupt Preempted by Timer3
2 seconds If S3 is pressed:
Attention
Note two Timer5 interrupt events occurred while the Timer3 ISR was running. These events were never seen by the core. This is a very bad thing. Time spent processing ISRs should be minimized to ensure this never happens. If a lot of time is required to process an interrupt, set a flag inside the ISR, and complete processing outside the ISR (“if(flag)”).
17014 SPC
7-4
16-bit Core Lab 2
Analyze the source code (continued)
The Timer3 ISR clears its interrupt flag, saves the current values of LED D5 & D6 (context save), sets LED D4, waits one second, turns it off, restores LED D5 & D6 values, then exits the ISR. The Timer3 interrupt flag will be set again after one more second per the Timer3 period (2 seconds total). The Timer5 ISR works the same way but with a 250ms delay.
Enable Your Debug Tool of Choice
The ICD3 is selected by default. To use another programmer/debugger like the Real ICE or PICkit 3 instead, select it per the instructions in the appendix.
See Appendix A, Section 3 for more details
17014 SPC
7-5
16-bit Core Lab 2
Edit the code
Find this section of code in the Lab2.c file. Comment out the line below. We will change the core's priority bits in the next step.
Exercise 2.1
Find this section of code in the Lab2.c file. Set the core's priority bits to be above Timer3 and below Timer5. This effectively disables the Timer3 interrupt.
Exercise 2.2
When switch “S5” is pressed, is any “main()” code processed? Could this have an affect on the application? How could you prevent this from happening? Feel free to modify this source code to allow main code to be processed.
Observe the example code running on the Explorer 16 eval board
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
7-6
16-bit Core Lab 2
After reset, no interrupts are enabled, and LED D6 is on indicating main code is being processed. Main is monitoring the state of the switches. If S3 is pressed, LED D4 will be on for 1 second then off for one second before the Timer3 ISR starts again (tuning the LED on). While D4 is off, we can see the LED indicating Timer5 ISR activity on for 250ms than off for 250ms. While both LED D4 and D5 are off, D6 will be on (no ISRs in process). Note the Timer3 ISR has priority over Timer5 and main code. Modifying the code to raise the core priority level above Timer3 effectively disables the Timer3 interrupt. After pressing S5, LED D4 will never go on. LED D5 and D6 (Timer5 ISR and main code) will toggle on and off every 250ms.
Results
Conclusions
This lab allowed us to configure and use the interrupts on Microchip’s 16 bit core. Interrupt priority levels were ad-
justed based on switch presses. The LEDs indicated if Timer3 ISR, Timer5 ISR or main code was being processed.
Build and Run the Project with the Debugger
Build and Run the project with the debugger. Click on the “Debug Main Project” icon to build, program and run the code on the device or simulator
See Appendix A, Section 2 for more details
17014 SPC
B-1
Appendix B
Appendix B PIC24FJ64GA004 Pinout
Table of Contents PIC24FJ64GA004 Pinout…………. ........................................................................................................ A-3
page A-1
17014 SPC
B-2
Appendix B
PIC24FJ64GA004 Device Pinout (44 pin TQFP)
First section/Core/Lab1.X/build/default/production/Lab1.o
First section/Core/Lab1.X/build/default/production/Lab1.o.d
build/default/production/Lab1.o: \ Lab1.c \ explorer16_GPIO_map.h
First section/Core/Lab1.X/build/default/production/lcd.o
First section/Core/Lab1.X/build/default/production/lcd.o.d
build/default/production/lcd.o: \ lcd.c
First section/Core/Lab1.X/dist/default/production/Lab1.X.production.elf
First section/Core/Lab1.X/dist/default/production/Lab1.X.production.hex
:020000040000fa :080000000002040000000000f2 :020000040000fa :1000080090020000900200009002000090020000a0 :100018009002000090020000900200009002000090 :100028009002000090020000900200009002000080 :100038009002000090020000900200009002000070 :100048009002000090020000900200009002000060 :100058009002000090020000900200009002000050 :100068009002000090020000900200009002000040 :100078009002000090020000900200009002000030 :100088009002000090020000900200009002000020 :100098009002000090020000900200009002000010 :1000a8009002000090020000900200009002000000 :1000b80090020000900200009002000090020000f0 :1000c80090020000900200009002000090020000e0 :1000d80090020000900200009002000090020000d0 :1000e80090020000900200009002000090020000c0 :1000f80090020000900200009002000090020000b0 :10010800900200009002000090020000900200009f :10011800900200009002000090020000900200008f :10012800900200009002000090020000900200007f :10013800900200009002000090020000900200006f :10014800900200009002000090020000900200005f :10015800900200009002000090020000900200004f :10016800900200009002000090020000900200003f :10017800900200009002000090020000900200002f :10018800900200009002000090020000900200001f :10019800900200009002000090020000900200000f :1001a80090020000900200009002000090020000ff :1001b80090020000900200009002000090020000ef :1001c80090020000900200009002000090020000df :1001d80090020000900200009002000090020000cf :1001e80090020000900200009002000090020000bf :0801f8009002000090020000db :020000040000fa :10020800900200009002000090020000900200009e :10021800900200009002000090020000900200008e :10022800900200009002000090020000900200007e :10023800900200009002000090020000900200006e :10024800900200009002000090020000900200005e :10025800900200009002000090020000900200004e :10026800900200009002000090020000900200003e :10027800900200009002000090020000900200002e :10028800900200009002000090020000900200001e :10029800900200009002000090020000900200000e :1002a80090020000900200009002000090020000fe :1002b80090020000900200009002000090020000ee :1002c80090020000900200009002000090020000de :1002d80090020000900200009002000090020000ce :1002e80090020000900200009002000090020000be :1002f80090020000900200009002000090020000ae :10030800900200009002000090020000900200009d :10031800900200009002000090020000900200008d :10032800900200009002000090020000900200007d :10033800900200009002000090020000900200006d :10034800900200009002000090020000900200005d :10035800900200009002000090020000900200004d :10036800900200009002000090020000900200003d :10037800900200009002000090020000900200002d :10038800900200009002000090020000900200001d :10039800900200009002000090020000900200000d :1003a80090020000900200009002000090020000fd :1003b80090020000900200009002000090020000ed :1003c80090020000900200009002000090020000dd :1003d80090020000900200009002000090020000cd :1003e80090020000900200009002000090020000bd :0803f8009002000090020000d9 :020000040000fa :100400004f8020000e7f22000e01880000000000b7 :100410000c00070000a520000100200011000700cb :10042000000020000000e000020032000000020096 :100430000000000000080200000000000040da0098 :100440000000fe004440a900c00120000000e000c0 :100450000300320000002000a00188004440a800f2 :100460000000060091018800800078000000eb0089 :1004700015003700e280400032a0b4009101ba00bc :10048000e280400032a0b4009102ba00e280400055 :1004900032a0b4000002eb00472bde00f507b200eb :1004a000602ce10004003a000059eb008301e900f0 :1004b000fdff3e00040037006128e100010032002a :1004c0000082eb00040007001101ba000200e00006 :1004d000e8ff3a00000006003159ba008301e90044 :1004e0000c0032002159ba008301e90008003200f3 :1004f0000400e00003003a00e280400032a0b400b3 :10050000f5ff370011d9ba008301e900faff3a007c :100510008100e800e180400032a0b4000000060045 :080520000040da000000fe00bb :020000040000fa :10052800486500006c6c00006f200000576f0000e9 :10053800726c00006400000000010000020300006b :100548000405000006070000080900000a0b000067 :080558000c0d00000e0f000065 :020000040000fa :10056000010000000200000004000000080000007c :10057000100000002000000040000000800000008b :020000040000fa :100580000000fa00f03f20001030880030302800d2 :1005900000308800100020006030880000352c00fa :1005a00010408800104080007d00070020032000dc :1005b00010408800800320004030880010408000f8 :1005c0007700070000352c001040880010408000a4 :1005d000730007002003200010408800c0002000a6 :1005e00040308800104080006d00070000352c006e :1005f000104088001040800069000700006420005f :10060000104088001000200040308800104080001a :100610006300070000352c00104088001040800067 :100620005f00070000642000104088006000200088 :100630004030880010408000590007003300070058 :10064000020007000080fa00000006000000fa0027 :1006500000642000104088000000eb00203088007b :100660002000200040308800030037001040800048 :100670000000e9001040880010408000e00f5000aa :10068000faff3a000080fa00000006000000fa00bd :1006900000642000104088000000eb00203088003b :1006a0000008200040308800030037001040800020 :1006b0000000e9001040880010408000e00f50006a :1006c000faff3a000080fa00000006000000fa007d :1006d00000642000104088000000eb0020308800fb :1006e000000c2000403088000300370010408000dc :1006f0000000e9001040880010408000e00f50002a :10070000faff3a000080fa00000006000000fa003c :1007100000642000104088000000eb0020308800ba :100720001000200040308800030037001040800097 :100730000000e9001040880010408000e00f5000e9 :10074000faff3a000080fa00000006000200fa00fa :10075000004f780020032000104088001000200087 :10076000203088001e00fb00403088000300370066 :10077000104080000000e900104088001040800018 :10078000e00f5000faff3a000000000000000000f7 :1007900000000000000000000080fa0000000600d9 :1007a0000200fa00000f7800010037001e0fe90078 :1007b0001e007800e00f5000fcff3a000080fa00b5 :0407c000000006002f :020000040000fa :1007c400f03fb1000180b10006003500ee030900de :1007d40000000000403fb1000180b100fbff3d007c :1007e4001000b000203fb000020035000080090076 :0807f4000000000000000600f7 :020000040000fa :1008000000000000000000000000000000000000e8 :1008100000000000000000000000000000000000d8 :1008200000000000000000000000000000000000c8 :1008300000000000000000000000000000000000b8 :1008400000000000000000000000000000000000a8 :100850000000000000000000000000000000000098 :100860000000000000000000000000000000000088 :100870000000000000000000000000000000000078 :100880000000000000000000000000000000000068 :100890000000000000000000000000000000000058 :1008a0000000000000000000000000000000000048 :1008b0000000000000000000000000000000000038 :1008c0000000000000000000000000000000000028 :1008d0000000000000000000000000000000000018 :1008e0000000000000000000000000000000000008 :1008f00000000000000000000000000000000000f8 :1009000000000000000000000000000000000000e7 :1009100000000000000000000000000000000000d7 :1009200000000000000000000000000000000000c7 :1009300000000000000000000000000000000000b7 :1009400000000000000000000000000000000000a7 :100950000000000000000000000000000000000097 :100960000000000000000000000000000000000087 :100970000000000000000000000000000000000077 :100980000000000000000000000000000000000067 :100990000000000000000000000000000000000057 :1009a0000000000000000000000000000000000047 :1009b0000000000000000000000000000000000037 :1009c0000000000000000000000000000000000027 :1009d0000000000000000000000000000000000017 :1009e0000000000000000000000000000000000007 :1009f00000000000000000000000000000000000f7 :100a000000000000000000000000000000000000e6 :100a100000000000000000000000000000000000d6 :100a200000000000000000000000000000000000c6 :100a300000000000000000000000000000000000b6 :100a400000000000000000000000000000000000a6 :100a50000000000000000000000000000000000096 :100a60000000000000000000000000000000000086 :100a70000000000000000000000000000000000076 :100a80000000000000000000000000000000000066 :100a90000000000000000000000000000000000056 :100aa0000000000000000000000000000000000046 :100ab0000000000000000000000000000000000036 :100ac0000000000000000000000000000000000026 :100ad0000000000000000000000000000000000016 :100ae0000000000000000000000000000000000006 :100af00000000000000000000000000000000000f6 :100b000000000000000000000000000000000000e5 :100b100000000000000000000000000000000000d5 :100b200000000000000000000000000000000000c5 :100b300000000000000000000000000000000000b5 :100b400000000000000000000000000000000000a5 :100b50000000000000000000000000000000000095 :100b60000000000000000000000000000000000085 :100b70000000000000000000000000000000000075 :100b80000000000000000000000000000000000065 :100b90000000000000000000000000000000000055 :100ba0000000000000000000000000000000000045 :100bb0000000000000000000000000000000000035 :100bc0000000000000000000000000000000000025 :100bd0000000000000000000000000000000000015 :100be0000000000000000000000000000000000005 :100bf00000000000000000000000000000000000f5 :100c000000000000000000000000000000000000e4 :100c100000000000000000000000000000000000d4 :100c200000000000000000000000000000000000c4 :100c300000000000000000000000000000000000b4 :100c400000000000000000000000000000000000a4 :100c50000000000000000000000000000000000094 :100c60000000000000000000000000000000000084 :100c70000000000000000000000000000000000074 :100c80000000000000000000000000000000000064 :100c90000000000000000000000000000000000054 :100ca0000000000000000000000000000000000044 :100cb0000000000000000000000000000000000034 :100cc0000000000000000000000000000000000024 :100cd0000000000000000000000000000000000014 :100ce0000000000000000000000000000000000004 :100cf00000000000000000000000000000000000f4 :100d000000000000000000000000000000000000e3 :100d100000000000000000000000000000000000d3 :100d200000000000000000000000000000000000c3 :100d300000000000000000000000000000000000b3 :100d400000000000000000000000000000000000a3 :100d50000000000000000000000000000000000093 :100d60000000000000000000000000000000000083 :100d70000000000000000000000000000000000073 :100d80000000000000000000000000000000000063 :100d90000000000000000000000000000000000053 :100da0000000000000000000000000000000000043 :100db0000000000000000000000000000000000033 :100dc0000000000000000000000000000000000023 :100dd0000000000000000000000000000000000013 :100de0000000000000000000000000000000000003 :100df00000000000000000000000000000000000f3 :100e000000000000000000000000000000000000e2 :100e100000000000000000000000000000000000d2 :100e200000000000000000000000000000000000c2 :100e300000000000000000000000000000000000b2 :100e400000000000000000000000000000000000a2 :100e50000000000000000000000000000000000092 :100e60000000000000000000000000000000000082 :100e70000000000000000000000000000000000072 :100e80000000000000000000000000000000000062 :100e90000000000000000000000000000000000052 :100ea0000000000000000000000000000000000042 :100eb0000000000000000000000000000000000032 :100ec0000000000000000000000000000000000022 :100ed0000000000000000000000000000000000012 :100ee0000000000000000000000000000000000002 :100ef00000000000000000000000000000000000f2 :100f000000000000000000000000000000000000e1 :100f100000000000000000000000000000000000d1 :100f200000000000000000000000000000000000c1 :100f300000000000000000000000000000000000b1 :100f400000000000000000000000000000000000a1 :100f50000000000000000000000000000000000091 :100f60000000000000000000000000000000000081 :100f70000000000000000000000000000000000071 :100f80000000000000000000000000000000000061 :100f90000000000000000000000000000000000051 :100fa0000000000000000000000000000000000041 :100fb0000000000000000000000000000000000031 :100fc0000000000000000000000000000000000021 :100fd0000000000000000000000000000000000011 :100fe0000000000000000000000000000000000001 :100ff00000000000000000000000000000000000f1 :020000040000fa :101000000000fa00130107005dfd0700040007005f :10101000220007003c00070055000700ffff3700d3 :101020000200fa000000eb00000f78000500370016 :10103000402928001e00400010407800c3fd070032 :101040001e0fe800402928001e00400010407800d4 :10105000e04f5000f6ff3a0001e6a9000000eb0067 :10106000000f780008003700002a28001e0040000a :10107000104078008400070000242400f1002000c4 :10108000d0fd07001e0fe8001e007800ef0f500093 :10109000f5ff34000080fa00000006000400fa00aa :1010a000000020000040780032e0b700002b200054 :1010b000100798000000eb00000f78000d003700cb :1010c0001e0090001000ba000040780000e8b70051 :1010d0001e0090000080e8001007980000c8bf00c4 :1010e0006900070000242400f1002000b5fd07007e :1010f0001e0fe8001e007800e70f5000f0ff3400dc :101100000080fa00000006000200fa00220007003a :1011100061c7a80060c7a900013b800000ff2f0045 :10112000008060003000b300003b880000402000d9 :10113000000f78001e007800510520000108bb0058 :10114000270007001e0078001000ba000040780059 :1011500000e8b70000c8bf004b0007000090200067 :10116000d103200097fd07000080fa000000060070 :101170000200fa000000eb00000f780001003700c9 :101180001e0fe8001e007800e70f5000fcff34003f :101190000080fa00000006000200fa0061c7a80003 :1011a00060c7a800013b800000ff2f0000806000a6 :1011b0000010a000003b88000000200000407800e4 :1011c00032e0b70000402000000f78001e007800d9 :1011d0001e08bb00020007000080fa0000000600a5 :1011e0000600fa00100280004500de006740600043 :1011f0000080fb00000f780090028000100798002c :10120000ff3ffc0011028000000e200000807000f3 :10121000100288001e0090009002880000008800e4 :1012200050052000303b8800a00a2000303b880099 :1012300061e7a800000000000000000090028000ac :1012400020079800ff3ffc001e0078000040780057 :10125000674060000080fb00670060004500dd0023 :1012600012028000f1f12f00810061000080700007 :10127000100288002e009000900288000000880074 :101280000080fa00000006000200fa00004f78001b :101290009e4078000180fb004700de00004078009f :1012a000614060000080fb00610060004600dd00de :1012b000a2168000f1fb2f00810061000080700009 :1012c000a01688001e4078008080fb0000042000eb :1012d000008060004680de000040780061406000d1 :1012e0000080fb00610060004c00dd0062168000a1 :1012f000f1ff2e0081006100008070006016880000 :101300001e4078008080fb0000022000008060000a :101310004580de0000407800614060000080fb00f6 :10132000610060004800dd0022168000f1ef2f0010 :101330008100610000807000201688009e407800c7 :101340000180fb00700060004480de0000407800f7 :10135000614060000080fb00610060004900dd002a :1013600022168000f1df2f008100610000807000f4 :10137000201688009e4078000180fb006800600015 :101380004380de0000407800614060000080fb0088 :10139000610060004900dd0062168000f1df2f006f :1013a0008100610000807000601688009e40780017 :1013b0000180fb00640060004280de000040780095 :1013c000614060000080fb00610060004800dd00bb :1013d00062168000f1ef2f00810061000080700034 :1013e000601688009e4078000180fb00620060006b :1013f0000080d10000407800614060000080fb0068 :10140000610060004700dd0022168000f1f72f0028 :101410008100610000807000201688009e407800e6 :1014200061c0600061406000614060000080fb00be :10143000610060004a00dd0022168000f1bf2f002d :101440008100610000807000201688000080fa0092 :10145000000006000000fa00d4c2a900d0c2a90012 :10146000cd82a900c982a900c502a900c102a900b4 :10147000c522a900c122a900cd22a900c922a90024 :10148000cd02a900c902a900c4e2a900c0e2a900d6 :10149000c542a900c142a9000080fa000000060070 :020000040000fa :1014a0000008000002000000000000000208000028 :0c14b0000200000000000000000000002e :020000040000fa :020000040001f9 :0457f800fefa0000b5 :020000040000fa :020000040001f9 :0457fc007f3f0000eb :00000001FF
First section/Core/Lab1.X/dist/default/production/Lab1.X.production.map
Microchip Technology Inc, vv1_11 (A) “ Tool Name: c:\program files\microchip\xc16\v1.11\bin\bin\..\bin/elf-ld.exe Command: -p24FJ64GA004 \ -o \ dist/default/production/Lab1.X.production.elf \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/.. \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24E \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24E/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24F/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24H \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24H/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC30F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC30F/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC33E \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC33E/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC33F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC33F/gld \ build/default/production/Lab1.o \ build/default/production/lcd.o \ --defsym=__MPLAB_BUILD=1 \ -Tp24FJ64GA004.gld.00 \ --check-sections \ --data-init \ --pack-data \ --handles \ --isr \ --no-gc-sections \ --fill-upper=0 \ --stackguard=16 \ --library-path=../../MCU3101 MPLAB8/Lab1 \ --no-force-link \ --smart-io \ -Map=dist/default/production/Lab1.X.production.map \ --report-mem \ -start-group \ --library=pic30-elf \ --library=m-elf \ --library=c-elf \ -end-group \ Archive member included because of file (symbol) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) (__resetPRI) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) (__data_init_standard) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(delay32.eo) build/default/production/Lab1.o (___delay32) Program Memory [Origin = 0x200, Length = 0xa9fa] section address length (PC units) length (bytes) (dec) ------- ------- ----------------- -------------------- .text 0x200 0x94 0xde (222) .const 0x294 0x1c 0x2a (42) _025FFD805192492d 0x2b0 0x10 0x18 (24) .text 0x2c0 0x122 0x1b3 (435) .init.delay32 0x3e2 0x1c 0x2a (42) _025FFCC05192492d 0x400 0x400 0x600 (1536) .text 0x800 0x250 0x378 (888) .dinit 0xa50 0xe 0x15 (21) Total program memory used (bytes): 0xc8a (3210) 4% Data Memory [Origin = 0x800, Length = 0x2000] section address alignment gaps total length (dec) ------- ------- -------------- ------------------- .nbss 0x800 0 0x4 (4) Total data memory used (bytes): 0x4 (4) <1% Dynamic Memory Usage region address maximum length (dec) ------ ------- --------------------- heap 0 0 (0) stack 0x804 0x1ffc (8188) Maximum dynamic memory (bytes): 0x1ffc (8188) External Symbols in Data Memory (by address): 0x0800 _data 0x0802 __uLCDloops External Symbols in Data Memory (by name): 0x0802 __uLCDloops 0x0800 _data External Symbols in Program Memory (by address): 0x000200 __resetPRI 0x000222 __psv_init 0x000232 __data_init_standard 0x000232 __data_init 0x000290 __DefaultInterrupt 0x000294 _myString 0x0002a0 _myArray 0x0002b0 _PM_read_table 0x0002c0 _LCDInit 0x000326 _LCDHome 0x000346 _LCDL1Home 0x000366 _LCDL2Home 0x000386 _LCDClear 0x0003a6 _LCDPut 0x0003d0 _Wait 0x0003e2 ___delay32 0x000400 _PM_write_table 0x000800 _main 0x000810 _PSV_read 0x00084e _table_read 0x000884 _table_write 0x0008b8 _table_read_myArray 0x0008cc _erasePage 0x0008f0 _unlockWrite 0x000944 _register_to_LEDs 0x000a2a _LED_init External Symbols in Program Memory (by name): 0x000386 _LCDClear 0x000326 _LCDHome 0x0002c0 _LCDInit 0x000346 _LCDL1Home 0x000366 _LCDL2Home 0x0003a6 _LCDPut 0x000a2a _LED_init 0x0002b0 _PM_read_table 0x000400 _PM_write_table 0x000810 _PSV_read 0x0003d0 _Wait 0x000290 __DefaultInterrupt 0x0003e2 ___delay32 0x000232 __data_init 0x000232 __data_init_standard 0x000222 __psv_init 0x000200 __resetPRI 0x0008cc _erasePage 0x000800 _main 0x0002a0 _myArray 0x000294 _myString 0x000944 _register_to_LEDs 0x00084e _table_read 0x0008b8 _table_read_myArray 0x000884 _table_write 0x0008f0 _unlockWrite Memory Configuration Name Origin Length Attributes data 0x000800 0x002000 a !xr reset 0x000000 0x000004 ivt 0x000004 0x0000fc _reserved 0x000100 0x000004 aivt 0x000104 0x0000fc program 0x000200 0x00a9fa xr CONFIG2 0x00abfc 0x000002 CONFIG1 0x00abfe 0x000002 *default* 0x000000 0xffffffff Linker script and memory map LOAD build/default/production/Lab1.o LOAD build/default/production/lcd.o 0x0001 __MPLAB_BUILD = 0x1 LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24F\libpPIC24Fxxx-elf.a 0xabfc __CONFIG2 = 0xabfc 0xabfe __CONFIG1 = 0xabfe 0x0001 __NO_HANDLES = 0x1 0x0004 __IVT_BASE = 0x4 0x0104 __AIVT_BASE = 0x104 0x0800 __DATA_BASE = 0x800 0x2000 __DATA_LENGTH = 0x2000 0x0200 __CODE_BASE = 0x200 0xa9fc __CODE_LENGTH = 0xa9fc .reset 0x000000 0x4 0x000000 0x2 SHORT 0x200 ABSOLUTE (__reset) 0x000001 0x2 SHORT 0x4 0x000002 0x2 SHORT 0x0 ((ABSOLUTE (__reset) >> 0x10) & 0x7f) 0x000003 0x2 SHORT 0x0 .text 0x000200 0x94 *(.init) .init 0x000200 0x32 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) 0x000200 __resetPRI 0x000200 __reset 0x000222 __psv_init .init 0x000232 0x5e c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) 0x000232 __data_init_standard 0x000232 __data_init *(.user_init) *(.handle) *(.isr*) .isr 0x000290 0x4 default_isr 0x000290 __DefaultInterrupt *(.libc) *(.libm) *(.libdsp) *(.lib*) usercode *(usercode) __CONFIG2 0x00abfc 0x2 *(__CONFIG2.sec*) __CONFIG2.sec 0x00abfc 0x2 build/default/production/Lab1.o __CONFIG1 0x00abfe 0x2 *(__CONFIG1.sec*) __CONFIG1.sec 0x00abfe 0x2 build/default/production/Lab1.o .comment *(.comment) .debug_info 0x000000 0x123c *(.debug_info) .debug_info 0x000000 0x1019 build/default/production/Lab1.o .debug_info 0x001019 0x223 build/default/production/lcd.o *(.gnu.linkonce.wi.*) .debug_abbrev 0x000000 0x2bb *(.debug_abbrev) .debug_abbrev 0x000000 0x227 build/default/production/Lab1.o .debug_abbrev 0x000227 0x94 build/default/production/lcd.o .debug_line 0x000000 0x6d0 *(.debug_line) .debug_line 0x000000 0x3a6 build/default/production/Lab1.o .debug_line 0x0003a6 0x32a build/default/production/lcd.o .debug_frame 0x000000 0x128 *(.debug_frame) .debug_frame 0x000000 0xa4 build/default/production/Lab1.o .debug_frame 0x0000a4 0x84 build/default/production/lcd.o .debug_str 0x000000 0x93 *(.debug_str) .debug_str 0x000000 0x88 build/default/production/Lab1.o .debug_str 0x000088 0xb build/default/production/lcd.o .debug_loc *(.debug_loc) .debug_macinfo *(.debug_macinfo) .debug_pubnames 0x000000 0x175 *(.debug_pubnames) .debug_pubnames 0x000000 0xff build/default/production/Lab1.o .debug_pubnames 0x0000ff 0x76 build/default/production/lcd.o .debug_ranges *(.debug_ranges) .debug_aranges 0x000000 0x30 *(.debug_aranges) .debug_aranges 0x000000 0x18 build/default/production/Lab1.o .debug_aranges 0x000018 0x18 build/default/production/lcd.o .ivt 0x000004 0xfc 0x000004 0x4 LONG 0x290 DEFINED (__ReservedTrap0)?ABSOLUTE (__ReservedTrap0):ABSOLUTE (__DefaultInterrupt) 0x000006 0x4 LONG 0x290 DEFINED (__OscillatorFail)?ABSOLUTE (__OscillatorFail):ABSOLUTE (__DefaultInterrupt) 0x000008 0x4 LONG 0x290 DEFINED (__AddressError)?ABSOLUTE (__AddressError):ABSOLUTE (__DefaultInterrupt) 0x00000a 0x4 LONG 0x290 DEFINED (__StackError)?ABSOLUTE (__StackError):ABSOLUTE (__DefaultInterrupt) 0x00000c 0x4 LONG 0x290 DEFINED (__MathError)?ABSOLUTE (__MathError):ABSOLUTE (__DefaultInterrupt) 0x00000e 0x4 LONG 0x290 DEFINED (__ReservedTrap5)?ABSOLUTE (__ReservedTrap5):ABSOLUTE (__DefaultInterrupt) 0x000010 0x4 LONG 0x290 DEFINED (__ReservedTrap6)?ABSOLUTE (__ReservedTrap6):ABSOLUTE (__DefaultInterrupt) 0x000012 0x4 LONG 0x290 DEFINED (__ReservedTrap7)?ABSOLUTE (__ReservedTrap7):ABSOLUTE (__DefaultInterrupt) 0x000014 0x4 LONG 0x290 DEFINED (__INT0Interrupt)?ABSOLUTE (__INT0Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000016 0x4 LONG 0x290 DEFINED (__IC1Interrupt)?ABSOLUTE (__IC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000018 0x4 LONG 0x290 DEFINED (__OC1Interrupt)?ABSOLUTE (__OC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00001a 0x4 LONG 0x290 DEFINED (__T1Interrupt)?ABSOLUTE (__T1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00001c 0x4 LONG 0x290 DEFINED (__Interrupt4)?ABSOLUTE (__Interrupt4):ABSOLUTE (__DefaultInterrupt) 0x00001e 0x4 LONG 0x290 DEFINED (__IC2Interrupt)?ABSOLUTE (__IC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000020 0x4 LONG 0x290 DEFINED (__OC2Interrupt)?ABSOLUTE (__OC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000022 0x4 LONG 0x290 DEFINED (__T2Interrupt)?ABSOLUTE (__T2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000024 0x4 LONG 0x290 DEFINED (__T3Interrupt)?ABSOLUTE (__T3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000026 0x4 LONG 0x290 DEFINED (__SPI1ErrInterrupt)?ABSOLUTE (__SPI1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000028 0x4 LONG 0x290 DEFINED (__SPI1Interrupt)?ABSOLUTE (__SPI1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00002a 0x4 LONG 0x290 DEFINED (__U1RXInterrupt)?ABSOLUTE (__U1RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00002c 0x4 LONG 0x290 DEFINED (__U1TXInterrupt)?ABSOLUTE (__U1TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00002e 0x4 LONG 0x290 DEFINED (__ADC1Interrupt)?ABSOLUTE (__ADC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000030 0x4 LONG 0x290 DEFINED (__Interrupt14)?ABSOLUTE (__Interrupt14):ABSOLUTE (__DefaultInterrupt) 0x000032 0x4 LONG 0x290 DEFINED (__Interrupt15)?ABSOLUTE (__Interrupt15):ABSOLUTE (__DefaultInterrupt) 0x000034 0x4 LONG 0x290 DEFINED (__SI2C1Interrupt)?ABSOLUTE (__SI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000036 0x4 LONG 0x290 DEFINED (__MI2C1Interrupt)?ABSOLUTE (__MI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000038 0x4 LONG 0x290 DEFINED (__CompInterrupt)?ABSOLUTE (__CompInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00003a 0x4 LONG 0x290 DEFINED (__CNInterrupt)?ABSOLUTE (__CNInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00003c 0x4 LONG 0x290 DEFINED (__INT1Interrupt)?ABSOLUTE (__INT1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00003e 0x4 LONG 0x290 DEFINED (__Interrupt21)?ABSOLUTE (__Interrupt21):ABSOLUTE (__DefaultInterrupt) 0x000040 0x4 LONG 0x290 DEFINED (__Interrupt22)?ABSOLUTE (__Interrupt22):ABSOLUTE (__DefaultInterrupt) 0x000042 0x4 LONG 0x290 DEFINED (__Interrupt23)?ABSOLUTE (__Interrupt23):ABSOLUTE (__DefaultInterrupt) 0x000044 0x4 LONG 0x290 DEFINED (__Interrupt24)?ABSOLUTE (__Interrupt24):ABSOLUTE (__DefaultInterrupt) 0x000046 0x4 LONG 0x290 DEFINED (__OC3Interrupt)?ABSOLUTE (__OC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000048 0x4 LONG 0x290 DEFINED (__OC4Interrupt)?ABSOLUTE (__OC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004a 0x4 LONG 0x290 DEFINED (__T4Interrupt)?ABSOLUTE (__T4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004c 0x4 LONG 0x290 DEFINED (__T5Interrupt)?ABSOLUTE (__T5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004e 0x4 LONG 0x290 DEFINED (__INT2Interrupt)?ABSOLUTE (__INT2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000050 0x4 LONG 0x290 DEFINED (__U2RXInterrupt)?ABSOLUTE (__U2RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000052 0x4 LONG 0x290 DEFINED (__U2TXInterrupt)?ABSOLUTE (__U2TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000054 0x4 LONG 0x290 DEFINED (__SPI2ErrInterrupt)?ABSOLUTE (__SPI2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000056 0x4 LONG 0x290 DEFINED (__SPI2Interrupt)?ABSOLUTE (__SPI2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000058 0x4 LONG 0x290 DEFINED (__Interrupt34)?ABSOLUTE (__Interrupt34):ABSOLUTE (__DefaultInterrupt) 0x00005a 0x4 LONG 0x290 DEFINED (__Interrupt35)?ABSOLUTE (__Interrupt35):ABSOLUTE (__DefaultInterrupt) 0x00005c 0x4 LONG 0x290 DEFINED (__Interrupt36)?ABSOLUTE (__Interrupt36):ABSOLUTE (__DefaultInterrupt) 0x00005e 0x4 LONG 0x290 DEFINED (__IC3Interrupt)?ABSOLUTE (__IC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000060 0x4 LONG 0x290 DEFINED (__IC4Interrupt)?ABSOLUTE (__IC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000062 0x4 LONG 0x290 DEFINED (__IC5Interrupt)?ABSOLUTE (__IC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000064 0x4 LONG 0x290 DEFINED (__Interrupt40)?ABSOLUTE (__Interrupt40):ABSOLUTE (__DefaultInterrupt) 0x000066 0x4 LONG 0x290 DEFINED (__OC5Interrupt)?ABSOLUTE (__OC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000068 0x4 LONG 0x290 DEFINED (__Interrupt42)?ABSOLUTE (__Interrupt42):ABSOLUTE (__DefaultInterrupt) 0x00006a 0x4 LONG 0x290 DEFINED (__Interrupt43)?ABSOLUTE (__Interrupt43):ABSOLUTE (__DefaultInterrupt) 0x00006c 0x4 LONG 0x290 DEFINED (__Interrupt44)?ABSOLUTE (__Interrupt44):ABSOLUTE (__DefaultInterrupt) 0x00006e 0x4 LONG 0x290 DEFINED (__PMPInterrupt)?ABSOLUTE (__PMPInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000070 0x4 LONG 0x290 DEFINED (__Interrupt46)?ABSOLUTE (__Interrupt46):ABSOLUTE (__DefaultInterrupt) 0x000072 0x4 LONG 0x290 DEFINED (__Interrupt47)?ABSOLUTE (__Interrupt47):ABSOLUTE (__DefaultInterrupt) 0x000074 0x4 LONG 0x290 DEFINED (__Interrupt48)?ABSOLUTE (__Interrupt48):ABSOLUTE (__DefaultInterrupt) 0x000076 0x4 LONG 0x290 DEFINED (__SI2C2Interrupt)?ABSOLUTE (__SI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000078 0x4 LONG 0x290 DEFINED (__MI2C2Interrupt)?ABSOLUTE (__MI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00007a 0x4 LONG 0x290 DEFINED (__Interrupt51)?ABSOLUTE (__Interrupt51):ABSOLUTE (__DefaultInterrupt) 0x00007c 0x4 LONG 0x290 DEFINED (__Interrupt52)?ABSOLUTE (__Interrupt52):ABSOLUTE (__DefaultInterrupt) 0x00007e 0x4 LONG 0x290 DEFINED (__Interrupt53)?ABSOLUTE (__Interrupt53):ABSOLUTE (__DefaultInterrupt) 0x000080 0x4 LONG 0x290 DEFINED (__Interrupt54)?ABSOLUTE (__Interrupt54):ABSOLUTE (__DefaultInterrupt) 0x000082 0x4 LONG 0x290 DEFINED (__Interrupt55)?ABSOLUTE (__Interrupt55):ABSOLUTE (__DefaultInterrupt) 0x000084 0x4 LONG 0x290 DEFINED (__Interrupt56)?ABSOLUTE (__Interrupt56):ABSOLUTE (__DefaultInterrupt) 0x000086 0x4 LONG 0x290 DEFINED (__Interrupt57)?ABSOLUTE (__Interrupt57):ABSOLUTE (__DefaultInterrupt) 0x000088 0x4 LONG 0x290 DEFINED (__Interrupt58)?ABSOLUTE (__Interrupt58):ABSOLUTE (__DefaultInterrupt) 0x00008a 0x4 LONG 0x290 DEFINED (__Interrupt59)?ABSOLUTE (__Interrupt59):ABSOLUTE (__DefaultInterrupt) 0x00008c 0x4 LONG 0x290 DEFINED (__Interrupt60)?ABSOLUTE (__Interrupt60):ABSOLUTE (__DefaultInterrupt) 0x00008e 0x4 LONG 0x290 DEFINED (__Interrupt61)?ABSOLUTE (__Interrupt61):ABSOLUTE (__DefaultInterrupt) 0x000090 0x4 LONG 0x290 DEFINED (__RTCCInterrupt)?ABSOLUTE (__RTCCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000092 0x4 LONG 0x290 DEFINED (__Interrupt63)?ABSOLUTE (__Interrupt63):ABSOLUTE (__DefaultInterrupt) 0x000094 0x4 LONG 0x290 DEFINED (__Interrupt64)?ABSOLUTE (__Interrupt64):ABSOLUTE (__DefaultInterrupt) 0x000096 0x4 LONG 0x290 DEFINED (__U1ErrInterrupt)?ABSOLUTE (__U1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000098 0x4 LONG 0x290 DEFINED (__U2ErrInterrupt)?ABSOLUTE (__U2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00009a 0x4 LONG 0x290 DEFINED (__CRCInterrupt)?ABSOLUTE (__CRCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00009c 0x4 LONG 0x290 DEFINED (__Interrupt68)?ABSOLUTE (__Interrupt68):ABSOLUTE (__DefaultInterrupt) 0x00009e 0x4 LONG 0x290 DEFINED (__Interrupt69)?ABSOLUTE (__Interrupt69):ABSOLUTE (__DefaultInterrupt) 0x0000a0 0x4 LONG 0x290 DEFINED (__Interrupt70)?ABSOLUTE (__Interrupt70):ABSOLUTE (__DefaultInterrupt) 0x0000a2 0x4 LONG 0x290 DEFINED (__Interrupt71)?ABSOLUTE (__Interrupt71):ABSOLUTE (__DefaultInterrupt) 0x0000a4 0x4 LONG 0x290 DEFINED (__LVDInterrupt)?ABSOLUTE (__LVDInterrupt):ABSOLUTE (__DefaultInterrupt) 0x0000a6 0x4 LONG 0x290 DEFINED (__Interrupt73)?ABSOLUTE (__Interrupt73):ABSOLUTE (__DefaultInterrupt) 0x0000a8 0x4 LONG 0x290 DEFINED (__Interrupt74)?ABSOLUTE (__Interrupt74):ABSOLUTE (__DefaultInterrupt) 0x0000aa 0x4 LONG 0x290 DEFINED (__Interrupt75)?ABSOLUTE (__Interrupt75):ABSOLUTE (__DefaultInterrupt) 0x0000ac 0x4 LONG 0x290 DEFINED (__Interrupt76)?ABSOLUTE (__Interrupt76):ABSOLUTE (__DefaultInterrupt) 0x0000ae 0x4 LONG 0x290 DEFINED (__Interrupt77)?ABSOLUTE (__Interrupt77):ABSOLUTE (__DefaultInterrupt) 0x0000b0 0x4 LONG 0x290 DEFINED (__Interrupt78)?ABSOLUTE (__Interrupt78):ABSOLUTE (__DefaultInterrupt) 0x0000b2 0x4 LONG 0x290 DEFINED (__Interrupt79)?ABSOLUTE (__Interrupt79):ABSOLUTE (__DefaultInterrupt) 0x0000b4 0x4 LONG 0x290 DEFINED (__Interrupt80)?ABSOLUTE (__Interrupt80):ABSOLUTE (__DefaultInterrupt) 0x0000b6 0x4 LONG 0x290 DEFINED (__Interrupt81)?ABSOLUTE (__Interrupt81):ABSOLUTE (__DefaultInterrupt) 0x0000b8 0x4 LONG 0x290 DEFINED (__Interrupt82)?ABSOLUTE (__Interrupt82):ABSOLUTE (__DefaultInterrupt) 0x0000ba 0x4 LONG 0x290 DEFINED (__Interrupt83)?ABSOLUTE (__Interrupt83):ABSOLUTE (__DefaultInterrupt) 0x0000bc 0x4 LONG 0x290 DEFINED (__Interrupt84)?ABSOLUTE (__Interrupt84):ABSOLUTE (__DefaultInterrupt) 0x0000be 0x4 LONG 0x290 DEFINED (__Interrupt85)?ABSOLUTE (__Interrupt85):ABSOLUTE (__DefaultInterrupt) 0x0000c0 0x4 LONG 0x290 DEFINED (__Interrupt86)?ABSOLUTE (__Interrupt86):ABSOLUTE (__DefaultInterrupt) 0x0000c2 0x4 LONG 0x290 DEFINED (__Interrupt87)?ABSOLUTE (__Interrupt87):ABSOLUTE (__DefaultInterrupt) 0x0000c4 0x4 LONG 0x290 DEFINED (__Interrupt88)?ABSOLUTE (__Interrupt88):ABSOLUTE (__DefaultInterrupt) 0x0000c6 0x4 LONG 0x290 DEFINED (__Interrupt89)?ABSOLUTE (__Interrupt89):ABSOLUTE (__DefaultInterrupt) 0x0000c8 0x4 LONG 0x290 DEFINED (__Interrupt90)?ABSOLUTE (__Interrupt90):ABSOLUTE (__DefaultInterrupt) 0x0000ca 0x4 LONG 0x290 DEFINED (__Interrupt91)?ABSOLUTE (__Interrupt91):ABSOLUTE (__DefaultInterrupt) 0x0000cc 0x4 LONG 0x290 DEFINED (__Interrupt92)?ABSOLUTE (__Interrupt92):ABSOLUTE (__DefaultInterrupt) 0x0000ce 0x4 LONG 0x290 DEFINED (__Interrupt93)?ABSOLUTE (__Interrupt93):ABSOLUTE (__DefaultInterrupt) 0x0000d0 0x4 LONG 0x290 DEFINED (__Interrupt94)?ABSOLUTE (__Interrupt94):ABSOLUTE (__DefaultInterrupt) 0x0000d2 0x4 LONG 0x290 DEFINED (__Interrupt95)?ABSOLUTE (__Interrupt95):ABSOLUTE (__DefaultInterrupt) 0x0000d4 0x4 LONG 0x290 DEFINED (__Interrupt96)?ABSOLUTE (__Interrupt96):ABSOLUTE (__DefaultInterrupt) 0x0000d6 0x4 LONG 0x290 DEFINED (__Interrupt97)?ABSOLUTE (__Interrupt97):ABSOLUTE (__DefaultInterrupt) 0x0000d8 0x4 LONG 0x290 DEFINED (__Interrupt98)?ABSOLUTE (__Interrupt98):ABSOLUTE (__DefaultInterrupt) 0x0000da 0x4 LONG 0x290 DEFINED (__Interrupt99)?ABSOLUTE (__Interrupt99):ABSOLUTE (__DefaultInterrupt) 0x0000dc 0x4 LONG 0x290 DEFINED (__Interrupt100)?ABSOLUTE (__Interrupt100):ABSOLUTE (__DefaultInterrupt) 0x0000de 0x4 LONG 0x290 DEFINED (__Interrupt101)?ABSOLUTE (__Interrupt101):ABSOLUTE (__DefaultInterrupt) 0x0000e0 0x4 LONG 0x290 DEFINED (__Interrupt102)?ABSOLUTE (__Interrupt102):ABSOLUTE (__DefaultInterrupt) 0x0000e2 0x4 LONG 0x290 DEFINED (__Interrupt103)?ABSOLUTE (__Interrupt103):ABSOLUTE (__DefaultInterrupt) 0x0000e4 0x4 LONG 0x290 DEFINED (__Interrupt104)?ABSOLUTE (__Interrupt104):ABSOLUTE (__DefaultInterrupt) 0x0000e6 0x4 LONG 0x290 DEFINED (__Interrupt105)?ABSOLUTE (__Interrupt105):ABSOLUTE (__DefaultInterrupt) 0x0000e8 0x4 LONG 0x290 DEFINED (__Interrupt106)?ABSOLUTE (__Interrupt106):ABSOLUTE (__DefaultInterrupt) 0x0000ea 0x4 LONG 0x290 DEFINED (__Interrupt107)?ABSOLUTE (__Interrupt107):ABSOLUTE (__DefaultInterrupt) 0x0000ec 0x4 LONG 0x290 DEFINED (__Interrupt108)?ABSOLUTE (__Interrupt108):ABSOLUTE (__DefaultInterrupt) 0x0000ee 0x4 LONG 0x290 DEFINED (__Interrupt109)?ABSOLUTE (__Interrupt109):ABSOLUTE (__DefaultInterrupt) 0x0000f0 0x4 LONG 0x290 DEFINED (__Interrupt110)?ABSOLUTE (__Interrupt110):ABSOLUTE (__DefaultInterrupt) 0x0000f2 0x4 LONG 0x290 DEFINED (__Interrupt111)?ABSOLUTE (__Interrupt111):ABSOLUTE (__DefaultInterrupt) 0x0000f4 0x4 LONG 0x290 DEFINED (__Interrupt112)?ABSOLUTE (__Interrupt112):ABSOLUTE (__DefaultInterrupt) 0x0000f6 0x4 LONG 0x290 DEFINED (__Interrupt113)?ABSOLUTE (__Interrupt113):ABSOLUTE (__DefaultInterrupt) 0x0000f8 0x4 LONG 0x290 DEFINED (__Interrupt114)?ABSOLUTE (__Interrupt114):ABSOLUTE (__DefaultInterrupt) 0x0000fa 0x4 LONG 0x290 DEFINED (__Interrupt115)?ABSOLUTE (__Interrupt115):ABSOLUTE (__DefaultInterrupt) 0x0000fc 0x4 LONG 0x290 DEFINED (__Interrupt116)?ABSOLUTE (__Interrupt116):ABSOLUTE (__DefaultInterrupt) 0x0000fe 0x4 LONG 0x290 DEFINED (__Interrupt117)?ABSOLUTE (__Interrupt117):ABSOLUTE (__DefaultInterrupt) .aivt 0x000104 0xfc 0x000104 0x4 LONG 0x290 DEFINED (__AltReservedTrap0)?ABSOLUTE (__AltReservedTrap0):DEFINED (__ReservedTrap0)?ABSOLUTE (__ReservedTrap0):ABSOLUTE (__DefaultInterrupt) 0x000106 0x4 LONG 0x290 DEFINED (__AltOscillatorFail)?ABSOLUTE (__AltOscillatorFail):DEFINED (__OscillatorFail)?ABSOLUTE (__OscillatorFail):ABSOLUTE (__DefaultInterrupt) 0x000108 0x4 LONG 0x290 DEFINED (__AltAddressError)?ABSOLUTE (__AltAddressError):DEFINED (__AddressError)?ABSOLUTE (__AddressError):ABSOLUTE (__DefaultInterrupt) 0x00010a 0x4 LONG 0x290 DEFINED (__AltStackError)?ABSOLUTE (__AltStackError):DEFINED (__StackError)?ABSOLUTE (__StackError):ABSOLUTE (__DefaultInterrupt) 0x00010c 0x4 LONG 0x290 DEFINED (__AltMathError)?ABSOLUTE (__AltMathError):DEFINED (__MathError)?ABSOLUTE (__MathError):ABSOLUTE (__DefaultInterrupt) 0x00010e 0x4 LONG 0x290 DEFINED (__AltReservedTrap5)?ABSOLUTE (__AltReservedTrap5):DEFINED (__ReservedTrap5)?ABSOLUTE (__ReservedTrap5):ABSOLUTE (__DefaultInterrupt) 0x000110 0x4 LONG 0x290 DEFINED (__AltReservedTrap6)?ABSOLUTE (__AltReservedTrap6):DEFINED (__ReservedTrap6)?ABSOLUTE (__ReservedTrap6):ABSOLUTE (__DefaultInterrupt) 0x000112 0x4 LONG 0x290 DEFINED (__AltReservedTrap7)?ABSOLUTE (__AltReservedTrap7):DEFINED (__ReservedTrap7)?ABSOLUTE (__ReservedTrap7):ABSOLUTE (__DefaultInterrupt) 0x000114 0x4 LONG 0x290 DEFINED (__AltINT0Interrupt)?ABSOLUTE (__AltINT0Interrupt):DEFINED (__INT0Interrupt)?ABSOLUTE (__INT0Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000116 0x4 LONG 0x290 DEFINED (__AltIC1Interrupt)?ABSOLUTE (__AltIC1Interrupt):DEFINED (__IC1Interrupt)?ABSOLUTE (__IC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000118 0x4 LONG 0x290 DEFINED (__AltOC1Interrupt)?ABSOLUTE (__AltOC1Interrupt):DEFINED (__OC1Interrupt)?ABSOLUTE (__OC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00011a 0x4 LONG 0x290 DEFINED (__AltT1Interrupt)?ABSOLUTE (__AltT1Interrupt):DEFINED (__T1Interrupt)?ABSOLUTE (__T1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00011c 0x4 LONG 0x290 DEFINED (__AltInterrupt4)?ABSOLUTE (__AltInterrupt4):DEFINED (__Interrupt4)?ABSOLUTE (__Interrupt4):ABSOLUTE (__DefaultInterrupt) 0x00011e 0x4 LONG 0x290 DEFINED (__AltIC2Interrupt)?ABSOLUTE (__AltIC2Interrupt):DEFINED (__IC2Interrupt)?ABSOLUTE (__IC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000120 0x4 LONG 0x290 DEFINED (__AltOC2Interrupt)?ABSOLUTE (__AltOC2Interrupt):DEFINED (__OC2Interrupt)?ABSOLUTE (__OC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000122 0x4 LONG 0x290 DEFINED (__AltT2Interrupt)?ABSOLUTE (__AltT2Interrupt):DEFINED (__T2Interrupt)?ABSOLUTE (__T2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000124 0x4 LONG 0x290 DEFINED (__AltT3Interrupt)?ABSOLUTE (__AltT3Interrupt):DEFINED (__T3Interrupt)?ABSOLUTE (__T3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000126 0x4 LONG 0x290 DEFINED (__AltSPI1ErrInterrupt)?ABSOLUTE (__AltSPI1ErrInterrupt):DEFINED (__SPI1ErrInterrupt)?ABSOLUTE (__SPI1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000128 0x4 LONG 0x290 DEFINED (__AltSPI1Interrupt)?ABSOLUTE (__AltSPI1Interrupt):DEFINED (__SPI1Interrupt)?ABSOLUTE (__SPI1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00012a 0x4 LONG 0x290 DEFINED (__AltU1RXInterrupt)?ABSOLUTE (__AltU1RXInterrupt):DEFINED (__U1RXInterrupt)?ABSOLUTE (__U1RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00012c 0x4 LONG 0x290 DEFINED (__AltU1TXInterrupt)?ABSOLUTE (__AltU1TXInterrupt):DEFINED (__U1TXInterrupt)?ABSOLUTE (__U1TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00012e 0x4 LONG 0x290 DEFINED (__AltADC1Interrupt)?ABSOLUTE (__AltADC1Interrupt):DEFINED (__ADC1Interrupt)?ABSOLUTE (__ADC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000130 0x4 LONG 0x290 DEFINED (__AltInterrupt14)?ABSOLUTE (__AltInterrupt14):DEFINED (__Interrupt14)?ABSOLUTE (__Interrupt14):ABSOLUTE (__DefaultInterrupt) 0x000132 0x4 LONG 0x290 DEFINED (__AltInterrupt15)?ABSOLUTE (__AltInterrupt15):DEFINED (__Interrupt15)?ABSOLUTE (__Interrupt15):ABSOLUTE (__DefaultInterrupt) 0x000134 0x4 LONG 0x290 DEFINED (__AltSI2C1Interrupt)?ABSOLUTE (__AltSI2C1Interrupt):DEFINED (__SI2C1Interrupt)?ABSOLUTE (__SI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000136 0x4 LONG 0x290 DEFINED (__AltMI2C1Interrupt)?ABSOLUTE (__AltMI2C1Interrupt):DEFINED (__MI2C1Interrupt)?ABSOLUTE (__MI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000138 0x4 LONG 0x290 DEFINED (__AltCompInterrupt)?ABSOLUTE (__AltCompInterrupt):DEFINED (__CompInterrupt)?ABSOLUTE (__CompInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00013a 0x4 LONG 0x290 DEFINED (__AltCNInterrupt)?ABSOLUTE (__AltCNInterrupt):DEFINED (__CNInterrupt)?ABSOLUTE (__CNInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00013c 0x4 LONG 0x290 DEFINED (__AltINT1Interrupt)?ABSOLUTE (__AltINT1Interrupt):DEFINED (__INT1Interrupt)?ABSOLUTE (__INT1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00013e 0x4 LONG 0x290 DEFINED (__AltInterrupt21)?ABSOLUTE (__AltInterrupt21):DEFINED (__Interrupt21)?ABSOLUTE (__Interrupt21):ABSOLUTE (__DefaultInterrupt) 0x000140 0x4 LONG 0x290 DEFINED (__AltInterrupt22)?ABSOLUTE (__AltInterrupt22):DEFINED (__Interrupt22)?ABSOLUTE (__Interrupt22):ABSOLUTE (__DefaultInterrupt) 0x000142 0x4 LONG 0x290 DEFINED (__AltInterrupt23)?ABSOLUTE (__AltInterrupt23):DEFINED (__Interrupt23)?ABSOLUTE (__Interrupt23):ABSOLUTE (__DefaultInterrupt) 0x000144 0x4 LONG 0x290 DEFINED (__AltInterrupt24)?ABSOLUTE (__AltInterrupt24):DEFINED (__Interrupt24)?ABSOLUTE (__Interrupt24):ABSOLUTE (__DefaultInterrupt) 0x000146 0x4 LONG 0x290 DEFINED (__AltOC3Interrupt)?ABSOLUTE (__AltOC3Interrupt):DEFINED (__OC3Interrupt)?ABSOLUTE (__OC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000148 0x4 LONG 0x290 DEFINED (__AltOC4Interrupt)?ABSOLUTE (__AltOC4Interrupt):DEFINED (__OC4Interrupt)?ABSOLUTE (__OC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014a 0x4 LONG 0x290 DEFINED (__AltT4Interrupt)?ABSOLUTE (__AltT4Interrupt):DEFINED (__T4Interrupt)?ABSOLUTE (__T4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014c 0x4 LONG 0x290 DEFINED (__AltT5Interrupt)?ABSOLUTE (__AltT5Interrupt):DEFINED (__T5Interrupt)?ABSOLUTE (__T5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014e 0x4 LONG 0x290 DEFINED (__AltINT2Interrupt)?ABSOLUTE (__AltINT2Interrupt):DEFINED (__INT2Interrupt)?ABSOLUTE (__INT2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000150 0x4 LONG 0x290 DEFINED (__AltU2RXInterrupt)?ABSOLUTE (__AltU2RXInterrupt):DEFINED (__U2RXInterrupt)?ABSOLUTE (__U2RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000152 0x4 LONG 0x290 DEFINED (__AltU2TXInterrupt)?ABSOLUTE (__AltU2TXInterrupt):DEFINED (__U2TXInterrupt)?ABSOLUTE (__U2TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000154 0x4 LONG 0x290 DEFINED (__AltSPI2ErrInterrupt)?ABSOLUTE (__AltSPI2ErrInterrupt):DEFINED (__SPI2ErrInterrupt)?ABSOLUTE (__SPI2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000156 0x4 LONG 0x290 DEFINED (__AltSPI2Interrupt)?ABSOLUTE (__AltSPI2Interrupt):DEFINED (__SPI2Interrupt)?ABSOLUTE (__SPI2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000158 0x4 LONG 0x290 DEFINED (__AltInterrupt34)?ABSOLUTE (__AltInterrupt34):DEFINED (__Interrupt34)?ABSOLUTE (__Interrupt34):ABSOLUTE (__DefaultInterrupt) 0x00015a 0x4 LONG 0x290 DEFINED (__AltInterrupt35)?ABSOLUTE (__AltInterrupt35):DEFINED (__Interrupt35)?ABSOLUTE (__Interrupt35):ABSOLUTE (__DefaultInterrupt) 0x00015c 0x4 LONG 0x290 DEFINED (__AltInterrupt36)?ABSOLUTE (__AltInterrupt36):DEFINED (__Interrupt36)?ABSOLUTE (__Interrupt36):ABSOLUTE (__DefaultInterrupt) 0x00015e 0x4 LONG 0x290 DEFINED (__AltIC3Interrupt)?ABSOLUTE (__AltIC3Interrupt):DEFINED (__IC3Interrupt)?ABSOLUTE (__IC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000160 0x4 LONG 0x290 DEFINED (__AltIC4Interrupt)?ABSOLUTE (__AltIC4Interrupt):DEFINED (__IC4Interrupt)?ABSOLUTE (__IC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000162 0x4 LONG 0x290 DEFINED (__AltIC5Interrupt)?ABSOLUTE (__AltIC5Interrupt):DEFINED (__IC5Interrupt)?ABSOLUTE (__IC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000164 0x4 LONG 0x290 DEFINED (__AltInterrupt40)?ABSOLUTE (__AltInterrupt40):DEFINED (__Interrupt40)?ABSOLUTE (__Interrupt40):ABSOLUTE (__DefaultInterrupt) 0x000166 0x4 LONG 0x290 DEFINED (__AltOC5Interrupt)?ABSOLUTE (__AltOC5Interrupt):DEFINED (__OC5Interrupt)?ABSOLUTE (__OC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000168 0x4 LONG 0x290 DEFINED (__AltInterrupt42)?ABSOLUTE (__AltInterrupt42):DEFINED (__Interrupt42)?ABSOLUTE (__Interrupt42):ABSOLUTE (__DefaultInterrupt) 0x00016a 0x4 LONG 0x290 DEFINED (__AltInterrupt43)?ABSOLUTE (__AltInterrupt43):DEFINED (__Interrupt43)?ABSOLUTE (__Interrupt43):ABSOLUTE (__DefaultInterrupt) 0x00016c 0x4 LONG 0x290 DEFINED (__AltInterrupt44)?ABSOLUTE (__AltInterrupt44):DEFINED (__Interrupt44)?ABSOLUTE (__Interrupt44):ABSOLUTE (__DefaultInterrupt) 0x00016e 0x4 LONG 0x290 DEFINED (__AltPMPInterrupt)?ABSOLUTE (__AltPMPInterrupt):DEFINED (__PMPInterrupt)?ABSOLUTE (__PMPInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000170 0x4 LONG 0x290 DEFINED (__AltInterrupt46)?ABSOLUTE (__AltInterrupt46):DEFINED (__Interrupt46)?ABSOLUTE (__Interrupt46):ABSOLUTE (__DefaultInterrupt) 0x000172 0x4 LONG 0x290 DEFINED (__AltInterrupt47)?ABSOLUTE (__AltInterrupt47):DEFINED (__Interrupt47)?ABSOLUTE (__Interrupt47):ABSOLUTE (__DefaultInterrupt) 0x000174 0x4 LONG 0x290 DEFINED (__AltInterrupt48)?ABSOLUTE (__AltInterrupt48):DEFINED (__Interrupt48)?ABSOLUTE (__Interrupt48):ABSOLUTE (__DefaultInterrupt) 0x000176 0x4 LONG 0x290 DEFINED (__AltSI2C2Interrupt)?ABSOLUTE (__AltSI2C2Interrupt):DEFINED (__SI2C2Interrupt)?ABSOLUTE (__SI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000178 0x4 LONG 0x290 DEFINED (__AltMI2C2Interrupt)?ABSOLUTE (__AltMI2C2Interrupt):DEFINED (__MI2C2Interrupt)?ABSOLUTE (__MI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00017a 0x4 LONG 0x290 DEFINED (__AltInterrupt51)?ABSOLUTE (__AltInterrupt51):DEFINED (__Interrupt51)?ABSOLUTE (__Interrupt51):ABSOLUTE (__DefaultInterrupt) 0x00017c 0x4 LONG 0x290 DEFINED (__AltInterrupt52)?ABSOLUTE (__AltInterrupt52):DEFINED (__Interrupt52)?ABSOLUTE (__Interrupt52):ABSOLUTE (__DefaultInterrupt) 0x00017e 0x4 LONG 0x290 DEFINED (__AltInterrupt53)?ABSOLUTE (__AltInterrupt53):DEFINED (__Interrupt53)?ABSOLUTE (__Interrupt53):ABSOLUTE (__DefaultInterrupt) 0x000180 0x4 LONG 0x290 DEFINED (__AltInterrupt54)?ABSOLUTE (__AltInterrupt54):DEFINED (__Interrupt54)?ABSOLUTE (__Interrupt54):ABSOLUTE (__DefaultInterrupt) 0x000182 0x4 LONG 0x290 DEFINED (__AltInterrupt55)?ABSOLUTE (__AltInterrupt55):DEFINED (__Interrupt55)?ABSOLUTE (__Interrupt55):ABSOLUTE (__DefaultInterrupt) 0x000184 0x4 LONG 0x290 DEFINED (__AltInterrupt56)?ABSOLUTE (__AltInterrupt56):DEFINED (__Interrupt56)?ABSOLUTE (__Interrupt56):ABSOLUTE (__DefaultInterrupt) 0x000186 0x4 LONG 0x290 DEFINED (__AltInterrupt57)?ABSOLUTE (__AltInterrupt57):DEFINED (__Interrupt57)?ABSOLUTE (__Interrupt57):ABSOLUTE (__DefaultInterrupt) 0x000188 0x4 LONG 0x290 DEFINED (__AltInterrupt58)?ABSOLUTE (__AltInterrupt58):DEFINED (__Interrupt58)?ABSOLUTE (__Interrupt58):ABSOLUTE (__DefaultInterrupt) 0x00018a 0x4 LONG 0x290 DEFINED (__AltInterrupt59)?ABSOLUTE (__AltInterrupt59):DEFINED (__Interrupt59)?ABSOLUTE (__Interrupt59):ABSOLUTE (__DefaultInterrupt) 0x00018c 0x4 LONG 0x290 DEFINED (__AltInterrupt60)?ABSOLUTE (__AltInterrupt60):DEFINED (__Interrupt60)?ABSOLUTE (__Interrupt60):ABSOLUTE (__DefaultInterrupt) 0x00018e 0x4 LONG 0x290 DEFINED (__AltInterrupt61)?ABSOLUTE (__AltInterrupt61):DEFINED (__Interrupt61)?ABSOLUTE (__Interrupt61):ABSOLUTE (__DefaultInterrupt) 0x000190 0x4 LONG 0x290 DEFINED (__AltRTCCInterrupt)?ABSOLUTE (__AltRTCCInterrupt):DEFINED (__RTCCInterrupt)?ABSOLUTE (__RTCCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000192 0x4 LONG 0x290 DEFINED (__AltInterrupt63)?ABSOLUTE (__AltInterrupt63):DEFINED (__Interrupt63)?ABSOLUTE (__Interrupt63):ABSOLUTE (__DefaultInterrupt) 0x000194 0x4 LONG 0x290 DEFINED (__AltInterrupt64)?ABSOLUTE (__AltInterrupt64):DEFINED (__Interrupt64)?ABSOLUTE (__Interrupt64):ABSOLUTE (__DefaultInterrupt) 0x000196 0x4 LONG 0x290 DEFINED (__AltU1ErrInterrupt)?ABSOLUTE (__AltU1ErrInterrupt):DEFINED (__U1ErrInterrupt)?ABSOLUTE (__U1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000198 0x4 LONG 0x290 DEFINED (__AltU2ErrInterrupt)?ABSOLUTE (__AltU2ErrInterrupt):DEFINED (__U2ErrInterrupt)?ABSOLUTE (__U2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00019a 0x4 LONG 0x290 DEFINED (__AltCRCInterrupt)?ABSOLUTE (__AltCRCInterrupt):DEFINED (__CRCInterrupt)?ABSOLUTE (__CRCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00019c 0x4 LONG 0x290 DEFINED (__AltInterrupt68)?ABSOLUTE (__AltInterrupt68):DEFINED (__Interrupt68)?ABSOLUTE (__Interrupt68):ABSOLUTE (__DefaultInterrupt) 0x00019e 0x4 LONG 0x290 DEFINED (__AltInterrupt69)?ABSOLUTE (__AltInterrupt69):DEFINED (__Interrupt69)?ABSOLUTE (__Interrupt69):ABSOLUTE (__DefaultInterrupt) 0x0001a0 0x4 LONG 0x290 DEFINED (__AltInterrupt70)?ABSOLUTE (__AltInterrupt70):DEFINED (__Interrupt70)?ABSOLUTE (__Interrupt70):ABSOLUTE (__DefaultInterrupt) 0x0001a2 0x4 LONG 0x290 DEFINED (__AltInterrupt71)?ABSOLUTE (__AltInterrupt71):DEFINED (__Interrupt71)?ABSOLUTE (__Interrupt71):ABSOLUTE (__DefaultInterrupt) 0x0001a4 0x4 LONG 0x290 DEFINED (__AltLVDInterrupt)?ABSOLUTE (__AltLVDInterrupt):DEFINED (__LVDInterrupt)?ABSOLUTE (__LVDInterrupt):ABSOLUTE (__DefaultInterrupt) 0x0001a6 0x4 LONG 0x290 DEFINED (__AltInterrupt73)?ABSOLUTE (__AltInterrupt73):DEFINED (__Interrupt73)?ABSOLUTE (__Interrupt73):ABSOLUTE (__DefaultInterrupt) 0x0001a8 0x4 LONG 0x290 DEFINED (__AltInterrupt74)?ABSOLUTE (__AltInterrupt74):DEFINED (__Interrupt74)?ABSOLUTE (__Interrupt74):ABSOLUTE (__DefaultInterrupt) 0x0001aa 0x4 LONG 0x290 DEFINED (__AltInterrupt75)?ABSOLUTE (__AltInterrupt75):DEFINED (__Interrupt75)?ABSOLUTE (__Interrupt75):ABSOLUTE (__DefaultInterrupt) 0x0001ac 0x4 LONG 0x290 DEFINED (__AltInterrupt76)?ABSOLUTE (__AltInterrupt76):DEFINED (__Interrupt76)?ABSOLUTE (__Interrupt76):ABSOLUTE (__DefaultInterrupt) 0x0001ae 0x4 LONG 0x290 DEFINED (__AltInterrupt77)?ABSOLUTE (__AltInterrupt77):DEFINED (__Interrupt77)?ABSOLUTE (__Interrupt77):ABSOLUTE (__DefaultInterrupt) 0x0001b0 0x4 LONG 0x290 DEFINED (__AltInterrupt78)?ABSOLUTE (__AltInterrupt78):DEFINED (__Interrupt78)?ABSOLUTE (__Interrupt78):ABSOLUTE (__DefaultInterrupt) 0x0001b2 0x4 LONG 0x290 DEFINED (__AltInterrupt79)?ABSOLUTE (__AltInterrupt79):DEFINED (__Interrupt79)?ABSOLUTE (__Interrupt79):ABSOLUTE (__DefaultInterrupt) 0x0001b4 0x4 LONG 0x290 DEFINED (__AltInterrupt80)?ABSOLUTE (__AltInterrupt80):DEFINED (__Interrupt80)?ABSOLUTE (__Interrupt80):ABSOLUTE (__DefaultInterrupt) 0x0001b6 0x4 LONG 0x290 DEFINED (__AltInterrupt81)?ABSOLUTE (__AltInterrupt81):DEFINED (__Interrupt81)?ABSOLUTE (__Interrupt81):ABSOLUTE (__DefaultInterrupt) 0x0001b8 0x4 LONG 0x290 DEFINED (__AltInterrupt82)?ABSOLUTE (__AltInterrupt82):DEFINED (__Interrupt82)?ABSOLUTE (__Interrupt82):ABSOLUTE (__DefaultInterrupt) 0x0001ba 0x4 LONG 0x290 DEFINED (__AltInterrupt83)?ABSOLUTE (__AltInterrupt83):DEFINED (__Interrupt83)?ABSOLUTE (__Interrupt83):ABSOLUTE (__DefaultInterrupt) 0x0001bc 0x4 LONG 0x290 DEFINED (__AltInterrupt84)?ABSOLUTE (__AltInterrupt84):DEFINED (__Interrupt84)?ABSOLUTE (__Interrupt84):ABSOLUTE (__DefaultInterrupt) 0x0001be 0x4 LONG 0x290 DEFINED (__AltInterrupt85)?ABSOLUTE (__AltInterrupt85):DEFINED (__Interrupt85)?ABSOLUTE (__Interrupt85):ABSOLUTE (__DefaultInterrupt) 0x0001c0 0x4 LONG 0x290 DEFINED (__AltInterrupt86)?ABSOLUTE (__AltInterrupt86):DEFINED (__Interrupt86)?ABSOLUTE (__Interrupt86):ABSOLUTE (__DefaultInterrupt) 0x0001c2 0x4 LONG 0x290 DEFINED (__AltInterrupt87)?ABSOLUTE (__AltInterrupt87):DEFINED (__Interrupt87)?ABSOLUTE (__Interrupt87):ABSOLUTE (__DefaultInterrupt) 0x0001c4 0x4 LONG 0x290 DEFINED (__AltInterrupt88)?ABSOLUTE (__AltInterrupt88):DEFINED (__Interrupt88)?ABSOLUTE (__Interrupt88):ABSOLUTE (__DefaultInterrupt) 0x0001c6 0x4 LONG 0x290 DEFINED (__AltInterrupt89)?ABSOLUTE (__AltInterrupt89):DEFINED (__Interrupt89)?ABSOLUTE (__Interrupt89):ABSOLUTE (__DefaultInterrupt) 0x0001c8 0x4 LONG 0x290 DEFINED (__AltInterrupt90)?ABSOLUTE (__AltInterrupt90):DEFINED (__Interrupt90)?ABSOLUTE (__Interrupt90):ABSOLUTE (__DefaultInterrupt) 0x0001ca 0x4 LONG 0x290 DEFINED (__AltInterrupt91)?ABSOLUTE (__AltInterrupt91):DEFINED (__Interrupt91)?ABSOLUTE (__Interrupt91):ABSOLUTE (__DefaultInterrupt) 0x0001cc 0x4 LONG 0x290 DEFINED (__AltInterrupt92)?ABSOLUTE (__AltInterrupt92):DEFINED (__Interrupt92)?ABSOLUTE (__Interrupt92):ABSOLUTE (__DefaultInterrupt) 0x0001ce 0x4 LONG 0x290 DEFINED (__AltInterrupt93)?ABSOLUTE (__AltInterrupt93):DEFINED (__Interrupt93)?ABSOLUTE (__Interrupt93):ABSOLUTE (__DefaultInterrupt) 0x0001d0 0x4 LONG 0x290 DEFINED (__AltInterrupt94)?ABSOLUTE (__AltInterrupt94):DEFINED (__Interrupt94)?ABSOLUTE (__Interrupt94):ABSOLUTE (__DefaultInterrupt) 0x0001d2 0x4 LONG 0x290 DEFINED (__AltInterrupt95)?ABSOLUTE (__AltInterrupt95):DEFINED (__Interrupt95)?ABSOLUTE (__Interrupt95):ABSOLUTE (__DefaultInterrupt) 0x0001d4 0x4 LONG 0x290 DEFINED (__AltInterrupt96)?ABSOLUTE (__AltInterrupt96):DEFINED (__Interrupt96)?ABSOLUTE (__Interrupt96):ABSOLUTE (__DefaultInterrupt) 0x0001d6 0x4 LONG 0x290 DEFINED (__AltInterrupt97)?ABSOLUTE (__AltInterrupt97):DEFINED (__Interrupt97)?ABSOLUTE (__Interrupt97):ABSOLUTE (__DefaultInterrupt) 0x0001d8 0x4 LONG 0x290 DEFINED (__AltInterrupt98)?ABSOLUTE (__AltInterrupt98):DEFINED (__Interrupt98)?ABSOLUTE (__Interrupt98):ABSOLUTE (__DefaultInterrupt) 0x0001da 0x4 LONG 0x290 DEFINED (__AltInterrupt99)?ABSOLUTE (__AltInterrupt99):DEFINED (__Interrupt99)?ABSOLUTE (__Interrupt99):ABSOLUTE (__DefaultInterrupt) 0x0001dc 0x4 LONG 0x290 DEFINED (__AltInterrupt100)?ABSOLUTE (__AltInterrupt100):DEFINED (__Interrupt100)?ABSOLUTE (__Interrupt100):ABSOLUTE (__DefaultInterrupt) 0x0001de 0x4 LONG 0x290 DEFINED (__AltInterrupt101)?ABSOLUTE (__AltInterrupt101):DEFINED (__Interrupt101)?ABSOLUTE (__Interrupt101):ABSOLUTE (__DefaultInterrupt) 0x0001e0 0x4 LONG 0x290 DEFINED (__AltInterrupt102)?ABSOLUTE (__AltInterrupt102):DEFINED (__Interrupt102)?ABSOLUTE (__Interrupt102):ABSOLUTE (__DefaultInterrupt) 0x0001e2 0x4 LONG 0x290 DEFINED (__AltInterrupt103)?ABSOLUTE (__AltInterrupt103):DEFINED (__Interrupt103)?ABSOLUTE (__Interrupt103):ABSOLUTE (__DefaultInterrupt) 0x0001e4 0x4 LONG 0x290 DEFINED (__AltInterrupt104)?ABSOLUTE (__AltInterrupt104):DEFINED (__Interrupt104)?ABSOLUTE (__Interrupt104):ABSOLUTE (__DefaultInterrupt) 0x0001e6 0x4 LONG 0x290 DEFINED (__AltInterrupt105)?ABSOLUTE (__AltInterrupt105):DEFINED (__Interrupt105)?ABSOLUTE (__Interrupt105):ABSOLUTE (__DefaultInterrupt) 0x0001e8 0x4 LONG 0x290 DEFINED (__AltInterrupt106)?ABSOLUTE (__AltInterrupt106):DEFINED (__Interrupt106)?ABSOLUTE (__Interrupt106):ABSOLUTE (__DefaultInterrupt) 0x0001ea 0x4 LONG 0x290 DEFINED (__AltInterrupt107)?ABSOLUTE (__AltInterrupt107):DEFINED (__Interrupt107)?ABSOLUTE (__Interrupt107):ABSOLUTE (__DefaultInterrupt) 0x0001ec 0x4 LONG 0x290 DEFINED (__AltInterrupt108)?ABSOLUTE (__AltInterrupt108):DEFINED (__Interrupt108)?ABSOLUTE (__Interrupt108):ABSOLUTE (__DefaultInterrupt) 0x0001ee 0x4 LONG 0x290 DEFINED (__AltInterrupt109)?ABSOLUTE (__AltInterrupt109):DEFINED (__Interrupt109)?ABSOLUTE (__Interrupt109):ABSOLUTE (__DefaultInterrupt) 0x0001f0 0x4 LONG 0x290 DEFINED (__AltInterrupt110)?ABSOLUTE (__AltInterrupt110):DEFINED (__Interrupt110)?ABSOLUTE (__Interrupt110):ABSOLUTE (__DefaultInterrupt) 0x0001f2 0x4 LONG 0x290 DEFINED (__AltInterrupt111)?ABSOLUTE (__AltInterrupt111):DEFINED (__Interrupt111)?ABSOLUTE (__Interrupt111):ABSOLUTE (__DefaultInterrupt) 0x0001f4 0x4 LONG 0x290 DEFINED (__AltInterrupt112)?ABSOLUTE (__AltInterrupt112):DEFINED (__Interrupt112)?ABSOLUTE (__Interrupt112):ABSOLUTE (__DefaultInterrupt) 0x0001f6 0x4 LONG 0x290 DEFINED (__AltInterrupt113)?ABSOLUTE (__AltInterrupt113):DEFINED (__Interrupt113)?ABSOLUTE (__Interrupt113):ABSOLUTE (__DefaultInterrupt) 0x0001f8 0x4 LONG 0x290 DEFINED (__AltInterrupt114)?ABSOLUTE (__AltInterrupt114):DEFINED (__Interrupt114)?ABSOLUTE (__Interrupt114):ABSOLUTE (__DefaultInterrupt) 0x0001fa 0x4 LONG 0x290 DEFINED (__AltInterrupt115)?ABSOLUTE (__AltInterrupt115):DEFINED (__Interrupt115)?ABSOLUTE (__Interrupt115):ABSOLUTE (__DefaultInterrupt) 0x0001fc 0x4 LONG 0x290 DEFINED (__AltInterrupt116)?ABSOLUTE (__AltInterrupt116):DEFINED (__Interrupt116)?ABSOLUTE (__Interrupt116):ABSOLUTE (__DefaultInterrupt) 0x0001fe 0x4 LONG 0x290 DEFINED (__AltInterrupt117)?ABSOLUTE (__AltInterrupt117):DEFINED (__Interrupt117)?ABSOLUTE (__Interrupt117):ABSOLUTE (__DefaultInterrupt) 0x0000 WREG0 = 0x0 0x0000 _WREG0 = 0x0 0x0002 WREG1 = 0x2 0x0002 _WREG1 = 0x2 0x0004 WREG2 = 0x4 0x0004 _WREG2 = 0x4 0x0006 WREG3 = 0x6 0x0006 _WREG3 = 0x6 0x0008 WREG4 = 0x8 0x0008 _WREG4 = 0x8 0x000a WREG5 = 0xa 0x000a _WREG5 = 0xa 0x000c WREG6 = 0xc 0x000c _WREG6 = 0xc 0x000e WREG7 = 0xe 0x000e _WREG7 = 0xe 0x0010 WREG8 = 0x10 0x0010 _WREG8 = 0x10 0x0012 WREG9 = 0x12 0x0012 _WREG9 = 0x12 0x0014 WREG10 = 0x14 0x0014 _WREG10 = 0x14 0x0016 WREG11 = 0x16 0x0016 _WREG11 = 0x16 0x0018 WREG12 = 0x18 0x0018 _WREG12 = 0x18 0x001a WREG13 = 0x1a 0x001a _WREG13 = 0x1a 0x001c WREG14 = 0x1c 0x001c _WREG14 = 0x1c 0x001e WREG15 = 0x1e 0x001e _WREG15 = 0x1e 0x0020 SPLIM = 0x20 0x0020 _SPLIM = 0x20 0x002e PCL = 0x2e 0x002e _PCL = 0x2e 0x0030 PCH = 0x30 0x0030 _PCH = 0x30 0x0032 TBLPAG = 0x32 0x0032 _TBLPAG = 0x32 0x0034 PSVPAG = 0x34 0x0034 _PSVPAG = 0x34 0x0036 RCOUNT = 0x36 0x0036 _RCOUNT = 0x36 0x0042 SR = 0x42 0x0042 _SR = 0x42 0x0042 _SRbits = 0x42 0x0044 CORCON = 0x44 0x0044 _CORCON = 0x44 0x0044 _CORCONbits = 0x44 0x0052 DISICNT = 0x52 0x0052 _DISICNT = 0x52 0x0060 CNEN1 = 0x60 0x0060 _CNEN1 = 0x60 0x0060 _CNEN1bits = 0x60 0x0062 CNEN2 = 0x62 0x0062 _CNEN2 = 0x62 0x0062 _CNEN2bits = 0x62 0x0068 CNPU1 = 0x68 0x0068 _CNPU1 = 0x68 0x0068 _CNPU1bits = 0x68 0x006a CNPU2 = 0x6a 0x006a _CNPU2 = 0x6a 0x006a _CNPU2bits = 0x6a 0x0080 INTCON1 = 0x80 0x0080 _INTCON1 = 0x80 0x0080 _INTCON1bits = 0x80 0x0082 INTCON2 = 0x82 0x0082 _INTCON2 = 0x82 0x0082 _INTCON2bits = 0x82 0x0084 IFS0 = 0x84 0x0084 _IFS0 = 0x84 0x0084 _IFS0bits = 0x84 0x0086 IFS1 = 0x86 0x0086 _IFS1 = 0x86 0x0086 _IFS1bits = 0x86 0x0088 IFS2 = 0x88 0x0088 _IFS2 = 0x88 0x0088 _IFS2bits = 0x88 0x008a IFS3 = 0x8a 0x008a _IFS3 = 0x8a 0x008a _IFS3bits = 0x8a 0x008c IFS4 = 0x8c 0x008c _IFS4 = 0x8c 0x008c _IFS4bits = 0x8c 0x0094 IEC0 = 0x94 0x0094 _IEC0 = 0x94 0x0094 _IEC0bits = 0x94 0x0096 IEC1 = 0x96 0x0096 _IEC1 = 0x96 0x0096 _IEC1bits = 0x96 0x0098 IEC2 = 0x98 0x0098 _IEC2 = 0x98 0x0098 _IEC2bits = 0x98 0x009a IEC3 = 0x9a 0x009a _IEC3 = 0x9a 0x009a _IEC3bits = 0x9a 0x009c IEC4 = 0x9c 0x009c _IEC4 = 0x9c 0x009c _IEC4bits = 0x9c 0x00a4 IPC0 = 0xa4 0x00a4 _IPC0 = 0xa4 0x00a4 _IPC0bits = 0xa4 0x00a6 IPC1 = 0xa6 0x00a6 _IPC1 = 0xa6 0x00a6 _IPC1bits = 0xa6 0x00a8 IPC2 = 0xa8 0x00a8 _IPC2 = 0xa8 0x00a8 _IPC2bits = 0xa8 0x00aa IPC3 = 0xaa 0x00aa _IPC3 = 0xaa 0x00aa _IPC3bits = 0xaa 0x00ac IPC4 = 0xac 0x00ac _IPC4 = 0xac 0x00ac _IPC4bits = 0xac 0x00ae IPC5 = 0xae 0x00ae _IPC5 = 0xae 0x00ae _IPC5bits = 0xae 0x00b0 IPC6 = 0xb0 0x00b0 _IPC6 = 0xb0 0x00b0 _IPC6bits = 0xb0 0x00b2 IPC7 = 0xb2 0x00b2 _IPC7 = 0xb2 0x00b2 _IPC7bits = 0xb2 0x00b4 IPC8 = 0xb4 0x00b4 _IPC8 = 0xb4 0x00b4 _IPC8bits = 0xb4 0x00b6 IPC9 = 0xb6 0x00b6 _IPC9 = 0xb6 0x00b6 _IPC9bits = 0xb6 0x00b8 IPC10 = 0xb8 0x00b8 _IPC10 = 0xb8 0x00b8 _IPC10bits = 0xb8 0x00ba IPC11 = 0xba 0x00ba _IPC11 = 0xba 0x00ba _IPC11bits = 0xba 0x00bc IPC12 = 0xbc 0x00bc _IPC12 = 0xbc 0x00bc _IPC12bits = 0xbc 0x00c2 IPC15 = 0xc2 0x00c2 _IPC15 = 0xc2 0x00c2 _IPC15bits = 0xc2 0x00c4 IPC16 = 0xc4 0x00c4 _IPC16 = 0xc4 0x00c4 _IPC16bits = 0xc4 0x00c8 IPC18 = 0xc8 0x00c8 _IPC18 = 0xc8 0x00c8 _IPC18bits = 0xc8 0x0100 TMR1 = 0x100 0x0100 _TMR1 = 0x100 0x0102 PR1 = 0x102 0x0102 _PR1 = 0x102 0x0104 T1CON = 0x104 0x0104 _T1CON = 0x104 0x0104 _T1CONbits = 0x104 0x0106 TMR2 = 0x106 0x0106 _TMR2 = 0x106 0x0108 TMR3HLD = 0x108 0x0108 _TMR3HLD = 0x108 0x010a TMR3 = 0x10a 0x010a _TMR3 = 0x10a 0x010c PR2 = 0x10c 0x010c _PR2 = 0x10c 0x010e PR3 = 0x10e 0x010e _PR3 = 0x10e 0x0110 T2CON = 0x110 0x0110 _T2CON = 0x110 0x0110 _T2CONbits = 0x110 0x0112 T3CON = 0x112 0x0112 _T3CON = 0x112 0x0112 _T3CONbits = 0x112 0x0114 TMR4 = 0x114 0x0114 _TMR4 = 0x114 0x0116 TMR5HLD = 0x116 0x0116 _TMR5HLD = 0x116 0x0118 TMR5 = 0x118 0x0118 _TMR5 = 0x118 0x011a PR4 = 0x11a 0x011a _PR4 = 0x11a 0x011c PR5 = 0x11c 0x011c _PR5 = 0x11c 0x011e T4CON = 0x11e 0x011e _T4CON = 0x11e 0x011e _T4CONbits = 0x11e 0x0120 T5CON = 0x120 0x0120 _T5CON = 0x120 0x0120 _T5CONbits = 0x120 0x0140 IC1BUF = 0x140 0x0140 _IC1BUF = 0x140 0x0142 IC1CON = 0x142 0x0142 _IC1CON = 0x142 0x0142 _IC1CONbits = 0x142 0x0144 IC2BUF = 0x144 0x0144 _IC2BUF = 0x144 0x0146 IC2CON = 0x146 0x0146 _IC2CON = 0x146 0x0146 _IC2CONbits = 0x146 0x0148 IC3BUF = 0x148 0x0148 _IC3BUF = 0x148 0x014a IC3CON = 0x14a 0x014a _IC3CON = 0x14a 0x014a _IC3CONbits = 0x14a 0x014c IC4BUF = 0x14c 0x014c _IC4BUF = 0x14c 0x014e IC4CON = 0x14e 0x014e _IC4CON = 0x14e 0x014e _IC4CONbits = 0x14e 0x0150 IC5BUF = 0x150 0x0150 _IC5BUF = 0x150 0x0152 IC5CON = 0x152 0x0152 _IC5CON = 0x152 0x0152 _IC5CONbits = 0x152 0x0180 OC1RS = 0x180 0x0180 _OC1RS = 0x180 0x0182 OC1R = 0x182 0x0182 _OC1R = 0x182 0x0184 OC1CON = 0x184 0x0184 _OC1CON = 0x184 0x0184 _OC1CONbits = 0x184 0x0186 OC2RS = 0x186 0x0186 _OC2RS = 0x186 0x0188 OC2R = 0x188 0x0188 _OC2R = 0x188 0x018a OC2CON = 0x18a 0x018a _OC2CON = 0x18a 0x018a _OC2CONbits = 0x18a 0x018c OC3RS = 0x18c 0x018c _OC3RS = 0x18c 0x018e OC3R = 0x18e 0x018e _OC3R = 0x18e 0x0190 OC3CON = 0x190 0x0190 _OC3CON = 0x190 0x0190 _OC3CONbits = 0x190 0x0192 OC4RS = 0x192 0x0192 _OC4RS = 0x192 0x0194 OC4R = 0x194 0x0194 _OC4R = 0x194 0x0196 OC4CON = 0x196 0x0196 _OC4CON = 0x196 0x0196 _OC4CONbits = 0x196 0x0198 OC5RS = 0x198 0x0198 _OC5RS = 0x198 0x019a OC5R = 0x19a 0x019a _OC5R = 0x19a 0x019c OC5CON = 0x19c 0x019c _OC5CON = 0x19c 0x019c _OC5CONbits = 0x19c 0x0200 I2C1RCV = 0x200 0x0200 _I2C1RCV = 0x200 0x0202 I2C1TRN = 0x202 0x0202 _I2C1TRN = 0x202 0x0204 I2C1BRG = 0x204 0x0204 _I2C1BRG = 0x204 0x0206 I2C1CON = 0x206 0x0206 _I2C1CON = 0x206 0x0206 _I2C1CONbits = 0x206 0x0208 I2C1STAT = 0x208 0x0208 _I2C1STAT = 0x208 0x0208 _I2C1STATbits = 0x208 0x020a I2C1ADD = 0x20a 0x020a _I2C1ADD = 0x20a 0x020c I2C1MSK = 0x20c 0x020c _I2C1MSK = 0x20c 0x0210 I2C2RCV = 0x210 0x0210 _I2C2RCV = 0x210 0x0212 I2C2TRN = 0x212 0x0212 _I2C2TRN = 0x212 0x0214 I2C2BRG = 0x214 0x0214 _I2C2BRG = 0x214 0x0216 I2C2CON = 0x216 0x0216 _I2C2CON = 0x216 0x0216 _I2C2CONbits = 0x216 0x0218 I2C2STAT = 0x218 0x0218 _I2C2STAT = 0x218 0x0218 _I2C2STATbits = 0x218 0x021a I2C2ADD = 0x21a 0x021a _I2C2ADD = 0x21a 0x021c I2C2MSK = 0x21c 0x021c _I2C2MSK = 0x21c 0x0220 U1MODE = 0x220 0x0220 _U1MODE = 0x220 0x0220 _U1MODEbits = 0x220 0x0222 U1STA = 0x222 0x0222 _U1STA = 0x222 0x0222 _U1STAbits = 0x222 0x0224 U1TXREG = 0x224 0x0224 _U1TXREG = 0x224 0x0226 U1RXREG = 0x226 0x0226 _U1RXREG = 0x226 0x0228 U1BRG = 0x228 0x0228 _U1BRG = 0x228 0x0230 U2MODE = 0x230 0x0230 _U2MODE = 0x230 0x0230 _U2MODEbits = 0x230 0x0232 U2STA = 0x232 0x0232 _U2STA = 0x232 0x0232 _U2STAbits = 0x232 0x0234 U2TXREG = 0x234 0x0234 _U2TXREG = 0x234 0x0236 U2RXREG = 0x236 0x0236 _U2RXREG = 0x236 0x0238 U2BRG = 0x238 0x0238 _U2BRG = 0x238 0x0240 SPI1STAT = 0x240 0x0240 _SPI1STAT = 0x240 0x0240 _SPI1STATbits = 0x240 0x0242 SPI1CON1 = 0x242 0x0242 _SPI1CON1 = 0x242 0x0242 _SPI1CON1bits = 0x242 0x0244 SPI1CON2 = 0x244 0x0244 _SPI1CON2 = 0x244 0x0244 _SPI1CON2bits = 0x244 0x0248 SPI1BUF = 0x248 0x0248 _SPI1BUF = 0x248 0x0260 SPI2STAT = 0x260 0x0260 _SPI2STAT = 0x260 0x0260 _SPI2STATbits = 0x260 0x0262 SPI2CON1 = 0x262 0x0262 _SPI2CON1 = 0x262 0x0262 _SPI2CON1bits = 0x262 0x0264 SPI2CON2 = 0x264 0x0264 _SPI2CON2 = 0x264 0x0264 _SPI2CON2bits = 0x264 0x0268 SPI2BUF = 0x268 0x0268 _SPI2BUF = 0x268 0x02c0 TRISA = 0x2c0 0x02c0 _TRISA = 0x2c0 0x02c0 _TRISAbits = 0x2c0 0x02c2 PORTA = 0x2c2 0x02c2 _PORTA = 0x2c2 0x02c2 _PORTAbits = 0x2c2 0x02c4 LATA = 0x2c4 0x02c4 _LATA = 0x2c4 0x02c4 _LATAbits = 0x2c4 0x02c6 ODCA = 0x2c6 0x02c6 _ODCA = 0x2c6 0x02c6 _ODCAbits = 0x2c6 0x02c8 TRISB = 0x2c8 0x02c8 _TRISB = 0x2c8 0x02c8 _TRISBbits = 0x2c8 0x02ca PORTB = 0x2ca 0x02ca _PORTB = 0x2ca 0x02ca _PORTBbits = 0x2ca 0x02cc LATB = 0x2cc 0x02cc _LATB = 0x2cc 0x02cc _LATBbits = 0x2cc 0x02ce ODCB = 0x2ce 0x02ce _ODCB = 0x2ce 0x02ce _ODCBbits = 0x2ce 0x02d0 TRISC = 0x2d0 0x02d0 _TRISC = 0x2d0 0x02d0 _TRISCbits = 0x2d0 0x02d2 PORTC = 0x2d2 0x02d2 _PORTC = 0x2d2 0x02d2 _PORTCbits = 0x2d2 0x02d4 LATC = 0x2d4 0x02d4 _LATC = 0x2d4 0x02d4 _LATCbits = 0x2d4 0x02d6 ODCC = 0x2d6 0x02d6 _ODCC = 0x2d6 0x02d6 _ODCCbits = 0x2d6 0x02fc PADCFG1 = 0x2fc 0x02fc _PADCFG1 = 0x2fc 0x02fc _PADCFG1bits = 0x2fc 0x0300 ADC1BUF0 = 0x300 0x0300 _ADC1BUF0 = 0x300 0x0302 ADC1BUF1 = 0x302 0x0302 _ADC1BUF1 = 0x302 0x0304 ADC1BUF2 = 0x304 0x0304 _ADC1BUF2 = 0x304 0x0306 ADC1BUF3 = 0x306 0x0306 _ADC1BUF3 = 0x306 0x0308 ADC1BUF4 = 0x308 0x0308 _ADC1BUF4 = 0x308 0x030a ADC1BUF5 = 0x30a 0x030a _ADC1BUF5 = 0x30a 0x030c ADC1BUF6 = 0x30c 0x030c _ADC1BUF6 = 0x30c 0x030e ADC1BUF7 = 0x30e 0x030e _ADC1BUF7 = 0x30e 0x0310 ADC1BUF8 = 0x310 0x0310 _ADC1BUF8 = 0x310 0x0312 ADC1BUF9 = 0x312 0x0312 _ADC1BUF9 = 0x312 0x0314 ADC1BUFA = 0x314 0x0314 _ADC1BUFA = 0x314 0x0316 ADC1BUFB = 0x316 0x0316 _ADC1BUFB = 0x316 0x0318 ADC1BUFC = 0x318 0x0318 _ADC1BUFC = 0x318 0x031a ADC1BUFD = 0x31a 0x031a _ADC1BUFD = 0x31a 0x031c ADC1BUFE = 0x31c 0x031c _ADC1BUFE = 0x31c 0x031e ADC1BUFF = 0x31e 0x031e _ADC1BUFF = 0x31e 0x0320 AD1CON1 = 0x320 0x0320 _AD1CON1 = 0x320 0x0320 _AD1CON1bits = 0x320 0x0322 AD1CON2 = 0x322 0x0322 _AD1CON2 = 0x322 0x0322 _AD1CON2bits = 0x322 0x0324 AD1CON3 = 0x324 0x0324 _AD1CON3 = 0x324 0x0324 _AD1CON3bits = 0x324 0x0328 AD1CHS = 0x328 0x0328 _AD1CHS = 0x328 0x0328 _AD1CHSbits = 0x328 0x032c AD1PCFG = 0x32c 0x032c _AD1PCFG = 0x32c 0x032c _AD1PCFGbits = 0x32c 0x0330 AD1CSSL = 0x330 0x0330 _AD1CSSL = 0x330 0x0330 _AD1CSSLbits = 0x330 0x0600 PMCON = 0x600 0x0600 _PMCON = 0x600 0x0600 _PMCONbits = 0x600 0x0602 PMMODE = 0x602 0x0602 _PMMODE = 0x602 0x0602 _PMMODEbits = 0x602 0x0604 PMADDR = 0x604 0x0604 _PMADDR = 0x604 0x0604 _PMADDRbits = 0x604 0x0604 PMDOUT1 = 0x604 0x0604 _PMDOUT1 = 0x604 0x0604 _PMDOUT1bits = 0x604 0x0606 PMDOUT2 = 0x606 0x0606 _PMDOUT2 = 0x606 0x0608 PMDIN1 = 0x608 0x0608 _PMDIN1 = 0x608 0x060a PMDIN2 = 0x60a 0x060a _PMDIN2 = 0x60a 0x060c PMAEN = 0x60c 0x060c _PMAEN = 0x60c 0x060c _PMAENbits = 0x60c 0x060e PMSTAT = 0x60e 0x060e _PMSTAT = 0x60e 0x060e _PMSTATbits = 0x60e 0x0620 ALRMVAL = 0x620 0x0620 _ALRMVAL = 0x620 0x0622 ALCFGRPT = 0x622 0x0622 _ALCFGRPT = 0x622 0x0622 _ALCFGRPTbits = 0x622 0x0624 RTCVAL = 0x624 0x0624 _RTCVAL = 0x624 0x0626 RCFGCAL = 0x626 0x0626 _RCFGCAL = 0x626 0x0626 _RCFGCALbits = 0x626 0x0630 CMCON = 0x630 0x0630 _CMCON = 0x630 0x0630 _CMCONbits = 0x630 0x0632 CVRCON = 0x632 0x0632 _CVRCON = 0x632 0x0632 _CVRCONbits = 0x632 0x0640 CRCCON = 0x640 0x0640 _CRCCON = 0x640 0x0640 _CRCCONbits = 0x640 0x0642 CRCXOR = 0x642 0x0642 _CRCXOR = 0x642 0x0642 _CRCXORbits = 0x642 0x0644 CRCDAT = 0x644 0x0644 _CRCDAT = 0x644 0x0646 CRCWDAT = 0x646 0x0646 _CRCWDAT = 0x646 0x0680 RPINR0 = 0x680 0x0680 _RPINR0 = 0x680 0x0680 _RPINR0bits = 0x680 0x0682 RPINR1 = 0x682 0x0682 _RPINR1 = 0x682 0x0682 _RPINR1bits = 0x682 0x0686 RPINR3 = 0x686 0x0686 _RPINR3 = 0x686 0x0686 _RPINR3bits = 0x686 0x0688 RPINR4 = 0x688 0x0688 _RPINR4 = 0x688 0x0688 _RPINR4bits = 0x688 0x068e RPINR7 = 0x68e 0x068e _RPINR7 = 0x68e 0x068e _RPINR7bits = 0x68e 0x0690 RPINR8 = 0x690 0x0690 _RPINR8 = 0x690 0x0690 _RPINR8bits = 0x690 0x0692 RPINR9 = 0x692 0x0692 _RPINR9 = 0x692 0x0692 _RPINR9bits = 0x692 0x0696 RPINR11 = 0x696 0x0696 _RPINR11 = 0x696 0x0696 _RPINR11bits = 0x696 0x06a4 RPINR18 = 0x6a4 0x06a4 _RPINR18 = 0x6a4 0x06a4 _RPINR18bits = 0x6a4 0x06a6 RPINR19 = 0x6a6 0x06a6 _RPINR19 = 0x6a6 0x06a6 _RPINR19bits = 0x6a6 0x06a8 RPINR20 = 0x6a8 0x06a8 _RPINR20 = 0x6a8 0x06a8 _RPINR20bits = 0x6a8 0x06aa RPINR21 = 0x6aa 0x06aa _RPINR21 = 0x6aa 0x06aa _RPINR21bits = 0x6aa 0x06ac RPINR22 = 0x6ac 0x06ac _RPINR22 = 0x6ac 0x06ac _RPINR22bits = 0x6ac 0x06ae RPINR23 = 0x6ae 0x06ae _RPINR23 = 0x6ae 0x06ae _RPINR23bits = 0x6ae 0x06c0 RPOR0 = 0x6c0 0x06c0 _RPOR0 = 0x6c0 0x06c0 _RPOR0bits = 0x6c0 0x06c2 RPOR1 = 0x6c2 0x06c2 _RPOR1 = 0x6c2 0x06c2 _RPOR1bits = 0x6c2 0x06c4 RPOR2 = 0x6c4 0x06c4 _RPOR2 = 0x6c4 0x06c4 _RPOR2bits = 0x6c4 0x06c6 RPOR3 = 0x6c6 0x06c6 _RPOR3 = 0x6c6 0x06c6 _RPOR3bits = 0x6c6 0x06c8 RPOR4 = 0x6c8 0x06c8 _RPOR4 = 0x6c8 0x06c8 _RPOR4bits = 0x6c8 0x06ca RPOR5 = 0x6ca 0x06ca _RPOR5 = 0x6ca 0x06ca _RPOR5bits = 0x6ca 0x06cc RPOR6 = 0x6cc 0x06cc _RPOR6 = 0x6cc 0x06cc _RPOR6bits = 0x6cc 0x06ce RPOR7 = 0x6ce 0x06ce _RPOR7 = 0x6ce 0x06ce _RPOR7bits = 0x6ce 0x06d0 RPOR8 = 0x6d0 0x06d0 _RPOR8 = 0x6d0 0x06d0 _RPOR8bits = 0x6d0 0x06d2 RPOR9 = 0x6d2 0x06d2 _RPOR9 = 0x6d2 0x06d2 _RPOR9bits = 0x6d2 0x06d4 RPOR10 = 0x6d4 0x06d4 _RPOR10 = 0x6d4 0x06d4 _RPOR10bits = 0x6d4 0x06d6 RPOR11 = 0x6d6 0x06d6 _RPOR11 = 0x6d6 0x06d6 _RPOR11bits = 0x6d6 0x06d8 RPOR12 = 0x6d8 0x06d8 _RPOR12 = 0x6d8 0x06d8 _RPOR12bits = 0x6d8 0x0740 RCON = 0x740 0x0740 _RCON = 0x740 0x0740 _RCONbits = 0x740 0x0742 OSCCON = 0x742 0x0742 _OSCCON = 0x742 0x0742 _OSCCONbits = 0x742 0x0742 OSCCONL = 0x742 0x0742 _OSCCONL = 0x742 0x0743 OSCCONH = 0x743 0x0743 _OSCCONH = 0x743 0x0744 CLKDIV = 0x744 0x0744 _CLKDIV = 0x744 0x0744 _CLKDIVbits = 0x744 0x0748 OSCTUN = 0x748 0x0748 _OSCTUN = 0x748 0x0748 _OSCTUNbits = 0x748 0x0760 NVMCON = 0x760 0x0760 _NVMCON = 0x760 0x0760 _NVMCONbits = 0x760 0x0766 NVMKEY = 0x766 0x0766 _NVMKEY = 0x766 0x0770 PMD1 = 0x770 0x0770 _PMD1 = 0x770 0x0770 _PMD1bits = 0x770 0x0772 PMD2 = 0x772 0x0772 _PMD2 = 0x772 0x0772 _PMD2bits = 0x772 0x0774 PMD3 = 0x774 0x0774 _PMD3 = 0x774 0x0774 _PMD3bits = 0x774 0x0140 IC1 = 0x140 0x0140 _IC1 = 0x140 0x0144 IC2 = 0x144 0x0144 _IC2 = 0x144 0x0148 IC3 = 0x148 0x0148 _IC3 = 0x148 0x014c IC4 = 0x14c 0x014c _IC4 = 0x14c 0x0150 IC5 = 0x150 0x0150 _IC5 = 0x150 0x0180 OC1 = 0x180 0x0180 _OC1 = 0x180 0x0186 OC2 = 0x186 0x0186 _OC2 = 0x186 0x018c OC3 = 0x18c 0x018c _OC3 = 0x18c 0x0192 OC4 = 0x192 0x0192 _OC4 = 0x192 0x0198 OC5 = 0x198 0x0198 _OC5 = 0x198 0x0240 SPI1 = 0x240 0x0240 _SPI1 = 0x240 0x0260 SPI2 = 0x260 0x0260 _SPI2 = 0x260 0x0220 UART1 = 0x220 0x0220 _UART1 = 0x220 0x0230 UART2 = 0x230 0x0230 _UART2 = 0x230 START GROUP LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libm-elf.a LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libc-elf.a END GROUP OUTPUT(dist/default/production/Lab1.X.production.elf elf32-pic30) LOAD default_isr LOAD data_init .debug_pubtypes 0x000030 0x131 .debug_pubtypes 0x000030 0x11f build/default/production/Lab1.o .debug_pubtypes 0x00014f 0x12 build/default/production/lcd.o __c30_signature 0x000162 0x1e __c30_signature 0x000162 0x6 build/default/production/Lab1.o __c30_signature 0x000168 0x6 build/default/production/lcd.o __c30_signature 0x00016e 0x6 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) __c30_signature 0x000174 0x6 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) __c30_signature 0x00017a 0x6 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(delay32.eo) .nbss 0x0800 0x4 .nbss 0x0800 0x2 build/default/production/Lab1.o 0x0800 _data .nbss 0x0802 0x2 build/default/production/lcd.o 0x0802 __uLCDloops _025FFCC05192492d 0x8400 0x400 load address 0x000400 _025FFCC05192492d 0x8400 0x400 build/default/production/Lab1.o 0x8400 _PM_write_table .const 0x8294 0x1c load address 0x000294 .const 0x8294 0x1c build/default/production/Lab1.o 0x8294 _myString 0x82a0 _myArray _025FFD805192492d 0x82b0 0x10 load address 0x0002b0 _025FFD805192492d 0x82b0 0x10 build/default/production/Lab1.o 0x82b0 _PM_read_table .text 0x000800 0x250 .text 0x000800 0x250 build/default/production/Lab1.o 0x000800 _main 0x000810 _PSV_read 0x00084e _table_read 0x000884 _table_write 0x0008b8 _table_read_myArray 0x0008cc _erasePage 0x0008f0 _unlockWrite 0x000944 _register_to_LEDs 0x000a2a _LED_init .text 0x0002c0 0x122 .text 0x0002c0 0x122 build/default/production/lcd.o 0x0002c0 _LCDInit 0x000326 _LCDHome 0x000346 _LCDL1Home 0x000366 _LCDL2Home 0x000386 _LCDClear 0x0003a6 _LCDPut 0x0003d0 _Wait .init.delay32 0x0003e2 0x1c .init.delay32 0x0003e2 0x1c c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(delay32.eo) 0x0003e2 ___delay32 .dinit 0x000a50 0xe .dinit 0x000a50 0xe data_init
First section/Core/Lab1.X/explorer16_GPIO_map.h
// Explorer 16 evaluation board // MAP switches and LEDs to GPIO pins on the PIM: //PIM = PIC24FJ64GA004 #define S4 PORTAbits.RA7 // Explorer 16 switch s4 (right-most switch) #define S5 PORTCbits.RC6 // Explorer 16 switch s5 #define S6 PORTAbits.RA9 // Explorer 16 switch s6 #define S3 PORTAbits.RA10 // Explorer 16 switch s3 (left-most switch) #define LED_D3 LATAbits.LATA10 // Explorer 16 LED D3 (right-most LED) #define LED_D4 LATAbits.LATA7 // Explorer 16 LED D4 #define LED_D5 LATBbits.LATB8 // Explorer 16 LED D5 #define LED_D6 LATBbits.LATB9 // Explorer 16 LED D6 #define LED_D7 LATAbits.LATA9 // Explorer 16 LED D7 #define LED_D8 LATAbits.LATA8 // Explorer 16 LED D8 #define LED_D9 LATBbits.LATB12 // Explorer 16 LED D9 #define LED_D10 LATCbits.LATC6 // Explorer 16 LED D10 (left-most LED)
First section/Core/Lab1.X/Lab1.c
//****************************************************************************** // CLASS: MCU3101 - Getting Started with Microchip's 16-bit MCU // PROGRAM: Lab1.c // AUTHOR: Bob Smith // DATE: 1/6/2012 // DESCRIPTION: This lab demonstrates how to configure and use the Program // Space Visibility (PSV) and the Table Read and Write features // in Microchip's 16-bit MCU architecture. // PSV enables constants stored in program memory to be accessed // as if they were located in Data Memory. // Table Read and Write functions enable constants to be read // from and written to program memory. // // Main code initializes the LCD display and PSV, then sends a // user defined string to the "LCDPut()" function. The // "LCDPut()" function displays the string on the Explorer 16's // LCD display. // // Proper syntax for storing a string in Program memory is also // provided. // // The Table Read feature is used to read an array stored in // program memory. The contents of this array are displayed on // the LEDs. The contents of this array are then erased and a // new value is written into the first element of the array. // // Students have the opportunity to generate code that // configures and executes table read instructions to read an // array from program memory. // // The Purpose of the following code is to demonstrate how // Microchip's core and peripherals function. It is not meant // to be an example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // 2/2012 Bob Smith // Changed PM_table array to PM_read_table and created new // PM_write_table array. Previous version used one array for both // reading and writing. Also reduced delay times to accomodate // difference between Proteus simulator and real time delays. //****************************************************************************** #define FOSC 8000000 // device clock frequency #define FCY FOSC/2 // device instruction frequency used by "__delay_ms()" //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include "explorer16_GPIO_map.h" // Port pin to LED and switch mapping #include <libpic30.h> // needed for "__delay_ms()" compiler library function //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // disable JTAG port & disable watchdog timer _CONFIG2(FNOSC_PRI & POSCMOD_HS) // initial osc = Primary HS & Primary osc = HS //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ // The "const" directive tells the compiler to store the following string and // array in program memory (.const section). The compiler will use PSV to // access them. const unsigned char myString[] = "Hello World"; const unsigned char myArray[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}; unsigned char data; // variable in data memory used by table instructions // The following array is declared with the "space(psv)" attribute. This forces // the compiler to create a new section in program memory for user managed // constants stored in PM, including those managed with table reads and writes. // This new section needs to be aligned on a 1KB boundary due to the flash block // erase process which requires that a minimum of 512 instructions (1K addresses) // be erased. A block erase is required before any write to flash. Be sure to // allocate enough space for the block erase operation and save and restore any // data (or instructions!) that should not be erased. unsigned int __attribute__ ((space(psv), aligned(1024))) PM_write_table[512] ; unsigned int __attribute__ ((space(psv))) PM_read_table[] = {0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080}; //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void LED_init(void); void LCDInit(void); void LCDPut(char A); void register_to_LEDs(unsigned char x); void unlockWrite(void); void erasePage(void); void PSV_read(void); void table_read(void); void table_write(void); void table_read_myArray(void); //============================================================================== // FUNCTION: main() // DESCRIPTION: // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { LED_init(); LCDInit(); PSV_read(); table_read(); table_write(); table_read_myArray(); while(1); } //============================================================================== // FUNCTION: PSV_read() // DESCRIPTION: Reads a string and an Array stored in PM and displays them on // the LCD and LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void PSV_read(void) { // The "const" directive was used to define the string and array to be accessed // via PSV. Because of this, the compiler automatically sets the PSV bit and // initializes the PSVPAG register. The following 2 lines are not needed. // CORCONbits.PSV = 1; // Enable Program Space Visibility // PSVPAG = __builtin_psvpage(myString); // use a compiler "built-in" // function to set the PSV page to // the page where the array // "myString" is stored int i = 0; while(myString[i]!=0) // look for null character at end of string { LCDPut(myString[i]); // Send the string to be displayed on the LCD. i++; // Note myString (stored in PM) is accessed by } // the core as if it were stored in data memory. PMCONbits.PMPEN = 0; // Disable Parallel Master Port. The PMP is used // to drive the LCD and shares some pins with LEDs. for(i=0; i<16; i++) { register_to_LEDs(myArray[i]); // display contents of myArray (stored in // program memory) on the LEDs __delay_ms(250); // use compiler library function to delay 250ms } } //============================================================================== // FUNCTION: table_read() // DESCRIPTION: Reads an Array stored in PM and displays it on the LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void table_read(void) { int i; unsigned int PM_offset; // used by table instructions to access data in PM TBLPAG = __builtin_tblpage(&PM_read_table); // set table page register to // page where PM_read_table lives PM_offset = __builtin_tbloffset(&PM_read_table); // set offset used by TBLRDL // assembly instruction for(i=0; i<8; i++) { data = __builtin_tblrdl(PM_offset); // use table read low "built-in" // function to read the lower 16 // bits at this address and store // them in the variable "data" PM_offset +=2; // move pointer to next variable (2 adresses per word) register_to_LEDs(data); // display data read on LEDs __delay_ms(250); // delay 250ms } } //============================================================================== // FUNCTION: table_write() // DESCRIPTION: erases a page in program memory, writes one value, then reads // the value and displays on LEDs to verify it was written // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void table_write(void) { unsigned int PM_offset; // used by table instructions to access data in PM erasePage(); // erases the page where "PM_write_table" lives. Erasing a // page is required before writing to it. NVMCONbits.WREN = 1; // enable flash write with Non-Volatile Memory // (NVM) Control register NVMCONbits.ERASE = 0; // clear erase bit indicating write NVMCONbits.NVMOP = 0b0011; // NVM operation = word write // Note: table write instructions do not write directly to PM. These // instructions write data to holding latches. After the latches are loaded, // the programing operation can be unlocked and started with // "__builtin_write_NVM()" PM_offset = __builtin_tbloffset(&PM_write_table); // re-initialize offset to point // to first location in table __builtin_tblwtl(PM_offset, 0x0055); // write 0x55 to first element of // PM_write_table array unlockWrite(); // unlock flash and start the write process data = __builtin_tblrdl(PM_offset); // verify data was written... // use table read low "built-in" function // to read the lower 16 bits at this // address and store them in the variable // "data" register_to_LEDs(data); // display data read on LEDs __delay_ms(1000); // delay 1000ms } //============================================================================== // FUNCTION: table_read_myArray() // DESCRIPTION: Reads an Array stored in PM with the "const" directive and // displays it on the LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void table_read_myArray(void) { int i; char lowbyte; char hibyte; unsigned int data16; unsigned int PM_offset; // used by table instructions to access data in PM //########################################################################## //# Exercise 1.1: Set the table page (TBLPAG) register to point to the page //# where "myArray" is stored in program memory. Use the //# appropriate "built-in" function. //########################################################################## //### Your Code Here ### //### set table page register to // page where myArray lives //########################################################################## //# Exercise 1.2: Get the offset from the start of the page where myArray is //# stored and save it in "PM_offset". Use the appropriate //# "built-in" function. //########################################################################## //### Your Code Here ### //### set offset used by TBLRDL // assembly instruction for(i=0; i<8; i++) { //########################################################################## //# Exercise 1.3: Read the lower 16 bits at myArray's address with the //# table read low (tblrdl) "built-in" function and PM_offset //# obtained in the previous step. Store these bits in the //# "data16" variable. //########################################################################## //### Your Code Here ### //### use table read low "built-in" // function to read the lower 16 // bits at this address and store // them in the variable "data" //########################################################################## //# Exercise 1.4: Uncomment the following code to display myArray on the LEDs //########################################################################## // lowbyte = data16 & 0x00FF; // store lower 8 bits of data16 into lowbyte // register_to_LEDs(lowbyte); // display lower 8 bits of "data" on LEDs // __delay_ms(250); // delay 250ms // // hibyte = (data16 & 0xFF00) >> 8; // store upper 8 bits into hibyte // register_to_LEDs(hibyte); // display higher 8 bits of "data" on LEDs // __delay_ms(250); // delay 250ms // PM_offset +=2; // move pointer to next variable (2 adresses per word) } } //============================================================================== // FUNCTION: erasePage() // DESCRIPTION: erases program memory where PM_write_table is stored // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void erasePage(void) { unsigned int PM_offset; // used by table instructions to access data in PM NVMCONbits.WREN = 1; // enable flash write with Non-Volatile Memory // (NVM) Control register NVMCONbits.ERASE = 1; // enable flash erase NVMCONbits.NVMOP = 0b0010; // NVM operation = page erase TBLPAG = __builtin_tblpage(&PM_write_table); // Point to proper TBLPAG PM_offset = __builtin_tbloffset(&PM_write_table); // re-initialize offset to point // to first location in table __builtin_tblwtl(PM_offset, PM_offset); // set base address of erase block unlockWrite(); // unlock flash and start the write process return; } //============================================================================== // FUNCTION: unlockWrite() // DESCRIPTION: unlocks PM, starts the write process, and waits for it to // finish before returning // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: this function is time dependent...need to disable interrupts //============================================================================== void unlockWrite(void) { unsigned int saved_IPL; SET_AND_SAVE_CPU_IPL(saved_IPL, 7); //standard C30 compiler macro function __builtin_write_NVM(); // unlock flash NVM by writing 0x55 & 0xAA to the // NVMKEY register then initiate the write to flash // by setting the "Write Control" bit (WR) in NVMCON RESTORE_CPU_IPL(saved_IPL); //standard C30 compiler macro function return; } //============================================================================== // FUNCTION: register_to_LEDs() // DESCRIPTION: send an 8 bit value in a register to the LEDs // PARAMETERS: register value // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void register_to_LEDs(unsigned char x) { LATCbits.LATC6 = (x & 0b10000000) >> 7; // bitwise & 7th bit with // char value then shift to LSB // and assign that value to LED LATBbits.LATB12 = (x & 0b01000000) >> 6; LATAbits.LATA8 = (x & 0b00100000) >> 5; LATAbits.LATA9 = (x & 0b00010000) >> 4; LATBbits.LATB9 = (x & 0b00001000) >> 3; LATBbits.LATB8 = (x & 0b00000100) >> 2; LATAbits.LATA7 = (x & 0b00000010) >> 1; LATAbits.LATA10 = (x & 0b00000001); } //============================================================================== // FUNCTION: LED_init() // DESCRIPTION: Configure and initialize GPIO pins driving LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void LED_init(void) { // Note: all GPIO pins (Ports) are configured as inputs on reset LED_D10 = 0; // value to drive on RC6 if configured as an // output. (connected to LED D10...left side // and switch S5) TRISCbits.TRISC6 = 0; // Configure RC6 on PORTC as an input or output LED_D9 = 0; // value to drive on RB12 (LED D9) TRISBbits.TRISB12 = 0; // configure RB12 as output LED_D8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output LED_D7 = 0; // value to drive on pin RA9 (LED D7 and switch S6) TRISAbits.TRISA9 = 0; // configure RA9 as an input or output LED_D6 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output LED_D5 = 0; // value to drive on pin RB8 (LED D5) TRISBbits.TRISB8 = 0; // Configure RB8 on PORTB as an output LED_D4 = 0; // value to drive on pin RA7 (LED D4 and switch S4) TRISAbits.TRISA7 = 0; // configure RA7 as an input or output LED_D3 = 0; // value to drive on pin RA10 (LED D3...right side and switch S3) TRISAbits.TRISA10 = 0; // configure RA10 as an input or output }
First section/Core/Lab1.X/lcd.c
/***************************************************************************** * * LCD Driver for PIC24. * ***************************************************************************** * FileName: lcd.c * Dependencies: * Processor: * Compiler: * Linker: * Company: Microchip Technology Incorporated * * Software License Agreement * * The software supplied herewith by Microchip Technology Incorporated * (the "Company") is intended and supplied to you, the Company's * customer, for use solely and exclusively with products manufactured * by the Company. * * The software is owned by the Company and/or its supplier, and is * protected under applicable copyright laws. All rights are reserved. * Any use in violation of the foregoing restrictions may subject the * user to criminal sanctions under applicable laws, as well as to * civil liability for the breach of the terms and conditions of this * license. * * THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * * * A simple LCD driver for LCDs interface through the PMP * * * * Author Date Comment *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Vidyadhar 30/June/06 ... * Brant Ivey 7/3/07 Updated for v4.0 of class *****************************************************************************/ #include <p24fxxxx.h> //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void LCDInit(void); void LCDHome(void); void LCDL1Home(void); void LCDL2Home(void); void LCDClear(void); void LCDPut(char A); void Wait(unsigned int B); // Looptime is 1 us per loop count // Define a fast instruction execution time in terms of loop time // typically > 43us #define LCD_F_INSTR 50 // Define a slow instruction execution time in terms of loop time // typically > 1.53ms #define LCD_S_INSTR 1600 // Define the startup time for the LCD in terms of loop time // typically > 40ms #define LCD_STARTUP 50000 unsigned int _uLCDloops; void LCDInit(void) { PMMODE = 0x3FF; PMCON = 0x8303; PMAEN = 0x0001; _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_F_INSTR; PMDIN1 = 0b00111000; // Set the default function Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_F_INSTR; PMDIN1 = 0b00001100; Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_S_INSTR; PMDIN1 = 0b00000001; // Clear the display Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_S_INSTR; PMDIN1 = 0b00000110; // Set the entry mode Wait(_uLCDloops); LCDClear(); LCDHome(); } void LCDHome(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b00000010; while(_uLCDloops) _uLCDloops--; } void LCDL1Home(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b10000000; while(_uLCDloops) _uLCDloops--; } void LCDL2Home(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b11000000; while(_uLCDloops) _uLCDloops--; } void LCDClear(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b00000001; while(_uLCDloops) _uLCDloops--; } void LCDPut(char A) { _uLCDloops = LCD_F_INSTR; PMADDR = 0x0001; PMDIN1 = A; while(_uLCDloops) _uLCDloops--; Nop(); Nop(); Nop(); Nop(); } void Wait(unsigned int B) { while(B) B--; }
First section/Core/Lab1.X/Makefile
# # 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... .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
First section/Core/Lab1.X/nbproject/configurations.xml
Lab1.c lcd.c Makefile ../../MCU3101 MPLAB8/Lab1/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Core/Lab1.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab1.o ${OBJECTDIR}/lcd.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab1.o.d ${OBJECTDIR}/lcd.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab1.o ${OBJECTDIR}/lcd.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab1.o: Lab1.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab1.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab1.c -o ${OBJECTDIR}/Lab1.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab1.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3101 MPLAB8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd.o: lcd.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd.c -o ${OBJECTDIR}/lcd.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3101 MPLAB8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab1.o: Lab1.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab1.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab1.c -o ${OBJECTDIR}/Lab1.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab1.o.d" -g -omf=elf -O0 -I"../../MCU3101 MPLAB8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd.o: lcd.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd.c -o ${OBJECTDIR}/lcd.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd.o.d" -g -omf=elf -O0 -I"../../MCU3101 MPLAB8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3101 MPLAB8/Lab1",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab1.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3101 MPLAB8/Lab1",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab1.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Core/Lab1.X/nbproject/Makefile-genesis.properties
# #Tue May 14 10:24:44 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Core/Lab1.X/nbproject/Makefile-impl.mk
# # 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=Lab1.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
First section/Core/Lab1.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Core/Lab1.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab1.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab1.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab1.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab1.x.tar
First section/Core/Lab1.X/nbproject/Package-default.bash
#!/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}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab1.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}/lab1.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/lab1.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab1.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Core/Lab1.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Core/Lab1.X/nbproject/private/private.properties
First section/Core/Lab1.X/nbproject/private/private.xml
First section/Core/Lab1.X/nbproject/project.properties
First section/Core/Lab1.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab1 846965b9-9e8e-4032-827c-3485b3dacd0f 0 c ISO-8859-1
First section/Core/Lab2.X/explorer16_GPIO_map.h
// Explorer 16 evaluation board // MAP switches and LEDs to GPIO pins on the PIM: //PIM = PIC24FJ64GA004 #define S4 PORTAbits.RA7 // Explorer 16 switch s4 (right-most switch) #define S5 PORTCbits.RC6 // Explorer 16 switch s5 #define S6 PORTAbits.RA9 // Explorer 16 switch s6 #define S3 PORTAbits.RA10 // Explorer 16 switch s3 (left-most switch) #define LED_D3 LATAbits.LATA10 // Explorer 16 LED D3 (right-most LED) #define LED_D4 LATAbits.LATA7 // Explorer 16 LED D4 #define LED_D5 LATBbits.LATB8 // Explorer 16 LED D5 #define LED_D6 LATBbits.LATB9 // Explorer 16 LED D6 #define LED_D7 LATAbits.LATA9 // Explorer 16 LED D7 #define LED_D8 LATAbits.LATA8 // Explorer 16 LED D8 #define LED_D9 LATBbits.LATB12 // Explorer 16 LED D9 #define LED_D10 LATCbits.LATC6 // Explorer 16 LED D10 (left-most LED)
First section/Core/Lab2.X/Lab2.c
//****************************************************************************** // CLASS: MCU3101 - Getting Started with Microchip's 16-bit MCU // PROGRAM: Lab2.c // AUTHOR: Bob Smith // DATE: 1/6/2012 // DESCRIPTION: This lab demonstrates how to configure and use interrupts // in Microchip's 16-bit MCU architecture. // Main code initializes the LEDs, Timer3 & 5, then continuously // updates the Timer3, Timer5 and core interrupt priority // levels. // // LEDs on the Explorer 16 evaluation board keep track of which // process is currently running: // LED D4: Timer3 Interrupt Service Routine (ISR) // LED D5: Timer5 ISR // LED D6: main code (no interrupts running) // // Pressing the switches will change the interrupt priority // level for the core, and timers. They are listed in order of // priority (highest to lowest) depending on the switch that was // pressed: // S3...Timer3, Timer5, core // S5...Timer5, Timer3, core // S6...Timer3, core, Timer5 // This example code starts with Timer3 & 5 with priority levels // at 0 (disabled). Pressing one of the switches above will // change this, ISRs will start, and LEDs will start blinking. // // Timer3 is configured to have a period of 2 seconds. If // Timer3 is the highest priority interrupt, it will enter the // ISR at the end of every Timer3 period when the Timer3 // interrupt flag is set. // // The Timer3 ISR saves the current values of LED D5 & D6 // (context save), sets LED D4, waits one second, turns it // off, restores LED D5 & D6 values, then exits the ISR. // The Timer3 interrupt flag will be set again after one more // second per the Timer3 period (2 seconds total). // // Timer5 is configured to have a period of 500ms. If // Timer5 is the highest priority interrupt, it will enter the // ISR at the end of every Timer5 period when the Timer5 // interrupt flag is set. // // The Timer5 ISR saves the current values of LED D4 & D6 // (context save), sets LED D5, waits 250ms, turns it // off, restores LED D4 & D6 values, then exits the ISR. // The Timer5 interrupt flag will be set again after another // 250ms per the Timer5 period (500ms total). // // The Purpose of the following code is to demonstrate how // Microchip's core and peripherals function. It is not meant // to be an example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // Month Year Name // Comments //****************************************************************************** #define FOSC 8000000 // device clock frequency #define FCY FOSC/2 // device instruction frequency //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include <libpic30.h> // needed for "__delay_ms()" compiler library function //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // disable JTAG port & disable watchdog timer _CONFIG2(FNOSC_PRI & POSCMOD_HS) // initial osc = Primary HS & Primary osc = HS //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ #define S4 PORTAbits.RA7 // Explorer 16 switch s4 (right-most switch) #define S5 PORTCbits.RC6 // Explorer 16 switch s5 #define S6 PORTAbits.RA9 // Explorer 16 switch s6 #define S3 PORTAbits.RA10 // Explorer 16 switch s3 (left-most switch) #define LED_D3 LATAbits.LATA10 // Explorer 16 LED D3 (right-most LED) #define LED_D4 LATAbits.LATA7 // Explorer 16 LED D4 #define LED_D5 LATBbits.LATB8 // Explorer 16 LED D5 #define LED_D6 LATBbits.LATB9 // Explorer 16 LED D6 #define LED_D7 LATAbits.LATA9 // Explorer 16 LED D7 #define LED_D8 LATAbits.LATA8 // Explorer 16 LED D8 #define LED_D9 LATBbits.LATB12 // Explorer 16 LED D9 #define LED_D10 LATCbits.LATC6 // Explorer 16 LED D10 (left-most LED) //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ char sw; //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void LED_init(void); void TMR3Init(void); void TMR5Init(void); void read_switch(void); //============================================================================== // FUNCTION: main() // DESCRIPTION: Init LEDs, Timer3 & 5, then continuously update interrupt // priorities based on switch presses // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { LED_init(); TMR3Init(); TMR5Init(); while (1) { LED_D6 = 1; // Turn on LED_D6 indicating main code is running read_switch(); // Read switches and set sw to value indicating // which switch is pressed switch (sw) { case 1: //S3 Pressed SRbits.IPL = 0; // Set the core priority level to 0 IEC0bits.T3IE = 0; // Disable Timer3 int to allow priority change IEC1bits.T5IE = 0; // Disable Timer5 int to allow priority change IPC2bits.T3IP = 4; // Set Timer3 interrupt priority to level 4 IPC7bits.T5IP = 2; // Set Timer5 interrupt priority to level 2 IEC0bits.T3IE = 1; // Re-enable Timer3 interrupt IEC1bits.T5IE = 1; // Re-enable Timer5 interrupt break; case 2: //S5 Pressed //########################################################################## //# Exercise 2.1: Comment out the line below. We will change the core's //# priority bits in the next step. //########################################################################## SRbits.IPL = 0; //### Set the core priority level to 0 //########################################################################## //# Exercise 2.2: Set the core's priority bits to be above Timer3 and below //# Timer5. //########################################################################## //### Your Code Here ### //### set core priority above Timer3 & below Timer5 IEC0bits.T3IE = 0; // Disable Timer3 int to allow priority change IEC1bits.T5IE = 0; // Disable Timer5 int to allow priority change IPC2bits.T3IP = 2; // Set Timer3 interrupt priority to level 2 IPC7bits.T5IP = 4; // Set Timer5 interrupt priority to level 4 IEC0bits.T3IE = 1; // Re-enable Timer3 interrupt IEC1bits.T5IE = 1; // Re-enable Timer5 interrupt break; case 3: //S6 Pressed SRbits.IPL = 3; IEC0bits.T3IE = 0; // Disable Timer3 int to allow priority change IEC1bits.T5IE = 0; // Disable Timer5 int to allow priority change IPC2bits.T3IP = 4; // Set Timer3 interrupt priority to level 4 IPC7bits.T5IP = 2; // Set Timer5 interrupt priority to level 2 IEC0bits.T3IE = 1; // Re-enable Timer3 interrupt IEC1bits.T5IE = 1; // Re-enable Timer5 interrupt break; } } } //============================================================================== // FUNCTION: read_switch() // DESCRIPTION: determine if S3, S5 or S6 is pressed and update sw variable // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void read_switch(void) { if (S3 == 0) // Is S3 pressed? sw = 1; // do if true if (S5 == 0) // Is S5 pressed? sw = 2; // do if true if (S6 == 0) // Is S6 pressed? sw = 3; // do if true } //============================================================================== // FUNCTION: TMR3Init() // DESCRIPTION: Intialize Timer3 // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void TMR3Init(void) { T3CONbits.TCKPS = 0b11; // Timer3 prescale = 256 with default source of FCY PR3 = FCY / 128; // Timer3 timeout after 2 seconds TMR3 = 0x0000; // Clear Timer3 count register IFS0bits.T3IF = 0; // Clear Timer3 interrupt flag IEC0bits.T3IE = 1; // Enable Timer 3 interrupt IPC2bits.T3IP = 0; // Set Timer3 interrupt priority to 0 (disabled) // (this will be changed in switch statement) T3CONbits.TON = 1; // Turn on Timer3 } //============================================================================== // FUNCTION: TMR5Init() // DESCRIPTION: Intialize Timer5 // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void TMR5Init(void) { T5CONbits.TCKPS = 0b10; // Timer5 prescale = 64 with default source of FCY PR5 = FCY / 128; // Timer5 timeout after 500ms TMR5 = 0x0000; // Clear Timer5 count register IFS1bits.T5IF = 0; // Clear Timer5 interrupt flag IEC1bits.T5IE = 1; // Enable Timer 5 interrupt IPC7bits.T5IP = 0; // Set Timer5 interrupt priority to 0 (disabled) // (this will be changed in switch statement) T5CONbits.TON = 1; // Turn on Timer5 } //============================================================================== // FUNCTION: _T3Interrupt() // DESCRIPTION: turn off LEDs for Timer5 and main, then turn on Timer3 LED for // one second // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void __attribute__((interrupt, no_auto_psv)) _T3Interrupt() { IFS0bits.T3IF = 0; // Clear Timer3 interrupt flag bit int led_d6_val = LED_D6; // context save LED D6 state int led_d5_val = LED_D5; // context save LED D5 state LED_D6 = 0; // turn off LED to indicate main code not running LED_D5 = 0; // turn off LED to indicate Timer5 ISR not running LED_D4 = 1; // Turn on LED D4 indicating Timer3 ISR is active __delay_ms(1000); // use "__delay_ms()" compiler library function to // delay 1000 milli-seconds LED_D4 = 0; // Turn off LED D4 indicating Timer3 ISR is not active LED_D6 = led_d6_val; // context restore LED D6 state LED_D5 = led_d5_val; // context restore LED D5 state read_switch(); if (S5 == 0 || S6 == 0) // if another switch is pressed to indicate { // an interrupt priority change IEC0bits.T3IE = 0; // disable Timer3 interrupt return; // leave ISR } } //============================================================================== // FUNCTION: _T5Interrupt() // DESCRIPTION: turn off LEDs for Timer3 and main, then turn on Timer5 LED for // 250ms // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void __attribute__((interrupt, no_auto_psv)) _T5Interrupt() { IFS1bits.T5IF = 0; //Clear Timer5 interrupt flag bit int led_d6_val = LED_D6; // context save LED D6 state int led_d4_val = LED_D4; // context save LED D4 state LED_D6 = 0; // turn off LED to indicate main code not running LED_D4 = 0; // turn off LED to indicate Timer3 ISR not running LED_D5 = 1; // Turn on LED D5 indicating Timer5 ISR is active __delay_ms(250); // use "__delay_ms()" compiler library function to // delay 250 milli-seconds IFS1bits.T5IF = 0; // Clear Timer5 interrupt flag to hide back to back // Timer5 interrupts (ensures 250ms on, 250ms off) LED_D5 = 0; // Turn off LED D5 indicating Timer5 ISR is not active LED_D6 = led_d6_val; // context restore LED D6 state LED_D4 = led_d4_val; // context restore LED D4 state read_switch(); if (S3 == 0 || S6 == 0) // if another switch is pressed to indicate { // an interrupt priority change IEC1bits.T5IE = 0; // disable Timer5 interrupt return; // leave ISR } } //============================================================================== // FUNCTION: LED_init() // DESCRIPTION: Configure and initialize GPIO pins driving LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void LED_init(void) { // Note: all GPIO pins (Ports) are configured as inputs on reset // LED_D10 = 0; // value to drive on RC6 if configured as an // // output. (connected to LED D10...left side // // and switch S5) // TRISCbits.TRISC6 = 0; // Configure RC6 on PORTC as an input or output LED_D9 = 0; // value to drive on RB12 (LED D9) TRISBbits.TRISB12 = 0; // configure RB12 as output LED_D8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output // LED_D7 = 0; // value to drive on pin RA9 (LED D7 and switch S6) // TRISAbits.TRISA9 = 0; // configure RA9 as an input or output LED_D6 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output LED_D5 = 0; // value to drive on pin RB8 (LED D5) TRISBbits.TRISB8 = 0; // Configure RB8 on PORTB as an output LED_D4 = 0; // value to drive on pin RA7 (LED D4 and switch S4) TRISAbits.TRISA7 = 0; // configure RA7 as an input or output // LED_D3 = 0; // value to drive on pin RA10 (LED D3...right side and switch S3) // TRISAbits.TRISA10 = 0; // configure RA10 as an input or output }
First section/Core/Lab2.X/Makefile
# # 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... .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
First section/Core/Lab2.X/nbproject/configurations.xml
Lab2.c Makefile ../../MCU3101 MPLAB8/Lab2/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Core/Lab2.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab2.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab2.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab2.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab2.o: Lab2.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab2.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab2.c -o ${OBJECTDIR}/Lab2.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab2.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab2.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab2.o: Lab2.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab2.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab2.c -o ${OBJECTDIR}/Lab2.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab2.o.d" -g -omf=elf -O0 -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab2.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--stack=16,--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--no-force-link,--smart-io,--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Core/Lab2.X/nbproject/Makefile-genesis.properties
# #Tue May 14 10:28:26 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Core/Lab2.X/nbproject/Makefile-impl.mk
# # 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=Lab2.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
First section/Core/Lab2.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Core/Lab2.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab2.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab2.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab2.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab2.x.tar
First section/Core/Lab2.X/nbproject/Package-default.bash
#!/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}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab2.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}/lab2.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/lab2.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab2.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Core/Lab2.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Core/Lab2.X/nbproject/private/private.properties
First section/Core/Lab2.X/nbproject/private/private.xml
First section/Core/Lab2.X/nbproject/project.properties
First section/Core/Lab2.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab2 c634edb7-1475-48e5-a459-af40b1148033 0 c ISO-8859-1
First section/Lab1.X/Lab1.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: Lab1.c // AUTHOR: Bob Smith // DATE: 12/1/2011 // DESCRIPTION: This lab demonstrates how to configure the PIC24 general // purpose I/O (GPIO) ports. // A GPIO pin takes an input from a switch (S4) on the // Explorer 16 board and drives an output pin connected to an // LED. The LED will be on when the switch is pressed and off // when not pressed. // The PIC exits RESET with all PORT pins configured as inputs. // Output values are initialized with the output latch register // (LATx) before configuring pins as outputs with the data // direction register (TRISx). // LED D6 is blinked twice per second. This is done using a // compiler "builtin" function and a "delay_ms" library function. // // The Purpose of the following code is to demonstrate how // Microchip peripherals function. It is not meant to be an // example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: Add your own code to turn other LEDs on and off based on // other switch inputs. // // REVISION HISTORY: // Month Year Name // Comments //****************************************************************************** #define FOSC 8000000 // device clock frequency #define FCY FOSC/2 // device instruction frequency //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include "SwitchPressed.h" #include <libpic30.h> // needed for "__delay_ms()" compiler library function //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // disable JTAG port & disable watchdog timer _CONFIG2(FNOSC_PRI & POSCMOD_HS & IESO_OFF) // initial osc = Primary HS & Primary osc = HS //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void PortInit(void); //============================================================================== // FUNCTION: main() // DESCRIPTION: Determine if a switch is pressed and turn on an LED if it is. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { PortInit(); // configure and initialize pins driving LEDs while(1) { LATAbits.LATA10 = SwitchPressed(&PORTA,7); // turn on LED D3 if switch // S4 pressed. Switch S4 is // connected to pin RA7. //########################################################################## //# Exercise 1.1: Turn on LED D5 when switch S5 is pressed. Switch S5 is //# connected to the RC6 pin on PORTC and LED D5 is connected //# to RB8 on PORTB. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### turn on LED D5 if // switch S5 pressed // the following code blinks LED D6 twice per second __builtin_btg(&LATB, 9);// use compiler "builtin" function to toggle RB9 __delay_ms(250); // use "delay_ms" compiler library function to // wait 250 ms } } //============================================================================== // FUNCTION: PortInit() // DESCRIPTION: Configure and initialize GPIO pins // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void PortInit(void) { // LATCbits.LATC6 = 1; // value to drive on RC6 if configured as an // output. (connected to LED D10...left side // and switch S5) //########################################################################## //# Exercise 1.2: Configure RC6 on PORTC as an input. Switch S5 is //# connected to this pin. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### Configure RC6 on PORTC as an input LATBbits.LATB12 = 0; // value to drive on RB12 (LED D9) TRISBbits.TRISB12 = 0; // configure RB12 as output LATAbits.LATA8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output LATAbits.LATA9 = 0; // value to drive on pin RA9 (LED D7 and switch S6) TRISAbits.TRISA9 = 0; // configure RA9 LATBbits.LATB9 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output // LATBbits.LATB8 = 0; // value to drive on pin RB8 (LED D5) //########################################################################## //# Exercise 1.3: Configure RB8 on PORTB as an output. LED D5 is //# connected to this pin. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### Configure RB8 on PORTB as an output // LATAbits.LATA7 = 0; // value to drive on pin RA7 (LED D4 and switch S4) // TRISAbits.TRISA7 = 0; // configure RA7...all GPIO are inputs after reset LATAbits.LATA10 = 0; // value to drive on pin RA10 (LED D3...right side and switch S3) TRISAbits.TRISA10 = 0; // configure RA10 }
First section/Lab1.X/Makefile
# # 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... .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
First section/Lab1.X/nbproject/configurations.xml
SwitchPressed.h Lab1.c SwitchPressed.c Makefile ../../MCU3121 MPLAB 8/Lab1/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Lab1.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab1.o ${OBJECTDIR}/SwitchPressed.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab1.o.d ${OBJECTDIR}/SwitchPressed.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab1.o ${OBJECTDIR}/SwitchPressed.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab1.o: Lab1.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab1.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab1.c -o ${OBJECTDIR}/Lab1.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab1.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/SwitchPressed.o: SwitchPressed.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/SwitchPressed.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) SwitchPressed.c -o ${OBJECTDIR}/SwitchPressed.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/SwitchPressed.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/SwitchPressed.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab1.o: Lab1.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab1.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab1.c -o ${OBJECTDIR}/Lab1.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab1.o.d" -g -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab1.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/SwitchPressed.o: SwitchPressed.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/SwitchPressed.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) SwitchPressed.c -o ${OBJECTDIR}/SwitchPressed.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/SwitchPressed.o.d" -g -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab1" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/SwitchPressed.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab1",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab1.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab1",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab1.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab1.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Lab1.X/nbproject/Makefile-genesis.properties
# #Mon May 13 20:13:11 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Lab1.X/nbproject/Makefile-impl.mk
# # 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=Lab1.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
First section/Lab1.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Lab1.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab1.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab1.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab1.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab1.x.tar
First section/Lab1.X/nbproject/Package-default.bash
#!/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}/Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab1.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab1.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}/lab1.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/lab1.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab1.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Lab1.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Lab1.X/nbproject/private/private.properties
First section/Lab1.X/nbproject/private/private.xml
First section/Lab1.X/nbproject/project.properties
First section/Lab1.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab1 d64bd2b5-e5de-4189-8b41-43326bd6d35a 0 c h ISO-8859-1
First section/Lab1.X/SwitchPressed.c
#include "SwitchPressed.h" //****************************************************************************** // FUNCTION: SwitchPressed() // INPUTS: *sw = Pointer to I/O port register that is connected // to switch (e.g. &PORTD) // bit = bit number in port that is connected to switch // OUTPUTS: TRUE (1) if switch is closed/pressed // FALSE (0) if switch is open // DESCRIPTION: Tests to see if a switch is pressed. The routine // will debounce the switch press to ensure that it // really is pressed. "count" will increment if switch is pressed // and decrement if not pressed. Define debounce delay time and // oscillator frequency in SwitchPressed.h // AUTHOR: Rob Ostapiuk // DATE: 24 JAN 2008 // REVISIONS: 24 JAN 2008 - Initial Version // 15 JUN 2008 - Modified to use a pointer like builtins // 06 Dec 2011 - Bob Smith - added debounce delay time macros, // optimized while loop and added comments //****************************************************************************** unsigned SwitchPressed(volatile unsigned int *sw, unsigned bit) { unsigned int count = SWITCH_READ_COUNT; // SWITCH_READ_COUNT = # of switch // reads to implement debounce delay while(1) { if (!(*sw & (1 << bit)))// read the value on the switch { // Explorer 16 push buttons = "0" when pressed count++; // if switch is pressed, increment count if (count > MAX_COUNT) // if MAX_COUNT is reached... { return 1; // return true and stop reading switch } } else { count--; // if switch is not pressed, decrement count if (count < MIN_COUNT) // if MIN_COUNT is reached... { return 0; // return faulse and stop reading switch } } } }
First section/Lab1.X/SwitchPressed.h
// Constant Definitions #define FOSC 8000000 // oscillator frequency #define FCY FOSC/2 // instruction frequency #define DEBOUNCE_TIME_MS 10 // define debounce time in ms // #TCY_DEBOUNCE_CYCLES = # of instruction cycles needed to implement debounce time #define TCY_DEBOUNCE_CYCLES (FCY/1000)*DEBOUNCE_TIME_MS // number of switch reads needed to implement debounce time // it takes 12 or 13 instruction cycles to read switch and inc or dec the count #define SWITCH_READ_COUNT TCY_DEBOUNCE_CYCLES/13 #define MAX_COUNT SWITCH_READ_COUNT*2 #define MIN_COUNT 1 #include <p24Fxxxx.h> // Function Prototypes unsigned SwitchPressed(volatile unsigned int *sw, unsigned bit);
First section/Lab2.X/build/default/production/Lab2.o
First section/Lab2.X/build/default/production/Lab2.o.d
build/default/production/Lab2.o: \ Lab2.c
First section/Lab2.X/dist/default/production/Lab2.X.production.elf
First section/Lab2.X/dist/default/production/Lab2.X.production.hex
:020000040000fa :080000000002040000000000f2 :020000040000fa :1000080090020000900200009002000090020000a0 :100018009002000090020000900200009002000090 :100028009002000090020000900200009002000080 :100038009002000090020000900200009002000070 :100048009002000090020000900200009002000060 :100058009002000090020000900200009002000050 :100068009002000090020000900200009002000040 :100078009002000090020000900200009002000030 :100088009002000090020000900200009002000020 :100098009002000090020000900200009002000010 :1000a8009002000090020000900200009002000000 :1000b80090020000900200009002000090020000f0 :1000c80090020000900200009002000090020000e0 :1000d80090020000900200009002000090020000d0 :1000e80090020000900200009002000090020000c0 :1000f80090020000900200009002000090020000b0 :10010800900200009002000090020000900200009f :10011800900200009002000090020000900200008f :10012800900200009002000090020000900200007f :10013800900200009002000090020000900200006f :10014800900200009002000090020000900200005f :10015800900200009002000090020000900200004f :10016800900200009002000090020000900200003f :10017800900200009002000090020000900200002f :10018800900200009002000090020000900200001f :10019800900200009002000090020000900200000f :1001a80090020000900200009002000090020000ff :1001b80090020000900200009002000090020000ef :1001c80090020000900200009002000090020000df :1001d80090020000900200009002000090020000cf :1001e80090020000900200009002000090020000bf :0801f8009002000090020000db :020000040000fa :10020800900200009002000090020000900200009e :10021800900200009002000090020000900200008e :10022800900200009002000090020000900200007e :10023800900200009002000090020000900200006e :10024800900200009002000090020000900200005e :10025800900200009002000090020000900200004e :10026800900200009002000090020000900200003e :10027800900200009002000090020000900200002e :10028800900200009002000090020000900200001e :10029800900200009002000090020000900200000e :1002a80090020000900200009002000090020000fe :1002b80090020000900200009002000090020000ee :1002c80090020000900200009002000090020000de :1002d80090020000900200009002000090020000ce :1002e80090020000900200009002000090020000be :1002f80090020000900200009002000090020000ae :10030800900200009002000090020000900200009d :10031800900200009002000090020000900200008d :10032800900200009002000090020000900200007d :10033800900200009002000090020000900200006d :10034800900200009002000090020000900200005d :10035800900200009002000090020000900200004d :10036800900200009002000090020000900200003d :10037800900200009002000090020000900200002d :10038800900200009002000090020000900200001d :10039800900200009002000090020000900200000d :1003a80090020000900200009002000090020000fd :1003b80090020000900200009002000090020000ed :1003c80090020000900200009002000090020000dd :1003d80090020000900200009002000090020000cd :1003e80090020000900200009002000090020000bd :0803f8009002000090020000d9 :020000040000fa :100400002f8020000e7f22000e01880000000000d7 :100410000c000700604520000100200011000700cb :10042000000020000000e000020032000000020096 :100430000000000094020200000000000040da000a :100440000000fe004440a900000020000000e00081 :100450000300320000002000a00188004440a800f2 :100460000000060091018800800078000000eb0089 :1004700015003700e280400032a0b4009101ba00bc :10048000e280400032a0b4009102ba00e280400055 :1004900032a0b4000002eb00472bde00f507b200eb :1004a000602ce10004003a000059eb008301e900f0 :1004b000fdff3e00040037006128e100010032002a :1004c0000082eb00040007001101ba000200e00006 :1004d000e8ff3a00000006003159ba008301e90044 :1004e0000c0032002159ba008301e90008003200f3 :1004f0000400e00003003a00e280400032a0b400b3 :10050000f5ff370011d9ba008301e900faff3a007c :100510008100e800e180400032a0b4000000060045 :080520000040da000000fe00bb :020000040000fa :100528000200fa00cc0007000e00070027000700b1 :10053800000000002104800000002200008060000c :10054800e00f5000fbff320085a0a9002300070040 :10055800004f78001e4078004c00070000000000a3 :10056800f4ff37000000fa0001198000000e200097 :1005780000807000001988002043a800111980002d :10058800c0032000008070001019880025e3a9002e :1005980021198000f00f2e008080600000402000ac :1005a80000807000201988000040eb0024e3b700a9 :1005b8004119800000ff2f00008060007000b30028 :1005c800401988000080fa00000006000000fa00c8 :1005d80021e3a8000080fa00000006000400fa00e9 :1005e80001188000101880008080400020188000ca :1005f80080804000301880008080400040188000d3 :100608008080400050188000808040006018800082 :100618008080400070188000808040008018800032 :10062800808040009018800080804000a0188000e2 :1006380080804000b018800080804000c018800092 :1006480080804000d018800080804000e018800042 :1006580080804000f01880000080400001002000e9 :10066800008fbe001e00be004a09dd004600de0005 :1006780000007100c608de00008fbe001e00780072 :10068800004078000080fa00000006000200fa002e :10069800004f78009e4078000180fb004700de0094 :1006a80000407800614060000080fb00610060004d :1006b8004600dd00a2168000f1fb2f0081006100da :1006c80000807000a01688001e4078008080fb0023 :1006d80000042000008060004680de0000407800b2 :1006e800614060000080fb00610060004c00dd009c :1006f80062168000f1ff2e0081006100008070000a :10070800601688001e4078008080fb0000022000f0 :10071800008060004580de00004078006140600095 :100728000080fb00610060004800dd0022168000a8 :10073800f1ef2f0081006100008070002016880012 :100748009e4078000180fb00700060004480de005d :1007580000407800614060000080fb00610060009c :100768004900dd0022168000f1df2f0081006100c2 :1007780000807000201688009e4078000180fb00f1 :10078800680060004380de0000407800614060003f :100798000080fb00610060004900dd0062168000f7 :1007a800f1df2f0081006100008070006016880072 :1007b8009e4078000180fb00640060004280de00fb :1007c80000407800614060000080fb00610060002c :1007d8004800dd0062168000f1ef2f008100610003 :1007e80000807000601688009e4078000180fb0041 :1007f800620060000080d100004078006140600025 :100808000080fb00610060004700dd0022168000c8 :10081800f1f72f0081006100008070002016880029 :100828009e40780061c060006140600061406000e7 :100838000080fb00610060004a00dd002216800095 :10084800f1bf2f0081006100008070002016880031 :100858000080fa00000006000000fa00d4c2a900d7 :10086800d0c2a900cd82a900c982a900c502a900e9 :10087800c102a900c522a900c122a900cd22a90050 :10088800c922a900cd02a900c902a900c4e2a90091 :10089800c0e2a900c542a900c142a9000080fa002f :0408a8000000060046 :020000040000fa :1008ac000008000002000000000000000000000032 :020000040000fa :020000040001f9 :0457f800fefa0000b5 :020000040000fa :020000040001f9 :0457fc007f3f0000eb :00000001FF
First section/Lab2.X/dist/default/production/Lab2.X.production.map
Microchip Technology Inc, vv1_11 (A) ’ Tool Name: c:\program files\microchip\xc16\v1.11\bin\bin\..\bin/elf-ld.exe Command: -p24FJ64GA004 \ -o \ dist/default/production/Lab2.X.production.elf \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/.. \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24E \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24E/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24F/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24H \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/PIC24H/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC30F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC30F/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC33E \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC33E/gld \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../lib/dsPIC33F \ -Lc:/program files/microchip/xc16/v1.11/bin/bin/../../support/dsPIC33F/gld \ build/default/production/Lab2.o \ --defsym=__MPLAB_BUILD=1 \ -Tp24FJ64GA004.gld.00 \ --check-sections \ --data-init \ --pack-data \ --handles \ --isr \ --no-gc-sections \ --fill-upper=0 \ --stackguard=16 \ --library-path=../../MCU3121 MPLAB 8/Lab2 \ --no-force-link \ --smart-io \ -Map=dist/default/production/Lab2.X.production.map \ --report-mem \ -start-group \ --library=pic30-elf \ --library=m-elf \ --library=c-elf \ -end-group \ Archive member included because of file (symbol) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) (__resetPRI) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) (__data_init_standard) Program Memory [Origin = 0x200, Length = 0xa9fa] section address length (PC units) length (bytes) (dec) ------- ------- ----------------- -------------------- .text 0x200 0x94 0xde (222) .text 0x294 0x1c2 0x2a3 (675) .dinit 0x456 0x8 0xc (12) Total program memory used (bytes): 0x38d (909) 1% Data Memory [Origin = 0x800, Length = 0x2000] section address alignment gaps total length (dec) ------- ------- -------------- ------------------- .nbss 0x800 0 0x2 (2) Total data memory used (bytes): 0x2 (2) <1% Dynamic Memory Usage region address maximum length (dec) ------ ------- --------------------- heap 0 0 (0) stack 0x802 0x1ffe (8190) Maximum dynamic memory (bytes): 0x1ffe (8190) External Symbols in Data Memory (by address): 0x0800 _ADCaverage External Symbols in Data Memory (by name): 0x0800 _ADCaverage External Symbols in Program Memory (by address): 0x000200 __resetPRI 0x000222 __psv_init 0x000232 __data_init_standard 0x000232 __data_init 0x000290 __DefaultInterrupt 0x000294 _main 0x0002b6 _ADCInit 0x0002ea _ADCStart 0x0002f2 _ADCAvg 0x00034a _ADC_avg_to_LEDs 0x000430 _PortInit External Symbols in Program Memory (by name): 0x0002f2 _ADCAvg 0x0002b6 _ADCInit 0x0002ea _ADCStart 0x00034a _ADC_avg_to_LEDs 0x000430 _PortInit 0x000290 __DefaultInterrupt 0x000232 __data_init 0x000232 __data_init_standard 0x000222 __psv_init 0x000200 __resetPRI 0x000294 _main Memory Configuration Name Origin Length Attributes data 0x000800 0x002000 a !xr reset 0x000000 0x000004 ivt 0x000004 0x0000fc _reserved 0x000100 0x000004 aivt 0x000104 0x0000fc program 0x000200 0x00a9fa xr CONFIG2 0x00abfc 0x000002 CONFIG1 0x00abfe 0x000002 *default* 0x000000 0xffffffff Linker script and memory map LOAD build/default/production/Lab2.o 0x0001 __MPLAB_BUILD = 0x1 LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib/PIC24F\libpPIC24Fxxx-elf.a 0xabfc __CONFIG2 = 0xabfc 0xabfe __CONFIG1 = 0xabfe 0x0001 __NO_HANDLES = 0x1 0x0004 __IVT_BASE = 0x4 0x0104 __AIVT_BASE = 0x104 0x0800 __DATA_BASE = 0x800 0x2000 __DATA_LENGTH = 0x2000 0x0200 __CODE_BASE = 0x200 0xa9fc __CODE_LENGTH = 0xa9fc .reset 0x000000 0x4 0x000000 0x2 SHORT 0x200 ABSOLUTE (__reset) 0x000001 0x2 SHORT 0x4 0x000002 0x2 SHORT 0x0 ((ABSOLUTE (__reset) >> 0x10) & 0x7f) 0x000003 0x2 SHORT 0x0 .text 0x000200 0x94 *(.init) .init 0x000200 0x32 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) 0x000200 __resetPRI 0x000200 __reset 0x000222 __psv_init .init 0x000232 0x5e c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) 0x000232 __data_init_standard 0x000232 __data_init *(.user_init) *(.handle) *(.isr*) .isr 0x000290 0x4 default_isr 0x000290 __DefaultInterrupt *(.libc) *(.libm) *(.libdsp) *(.lib*) usercode *(usercode) __CONFIG2 0x00abfc 0x2 *(__CONFIG2.sec*) __CONFIG2.sec 0x00abfc 0x2 build/default/production/Lab2.o __CONFIG1 0x00abfe 0x2 *(__CONFIG1.sec*) __CONFIG1.sec 0x00abfe 0x2 build/default/production/Lab2.o .comment *(.comment) .debug_info 0x000000 0x124a *(.debug_info) .debug_info 0x000000 0x124a build/default/production/Lab2.o *(.gnu.linkonce.wi.*) .debug_abbrev 0x000000 0x159 *(.debug_abbrev) .debug_abbrev 0x000000 0x159 build/default/production/Lab2.o .debug_line 0x000000 0x299 *(.debug_line) .debug_line 0x000000 0x299 build/default/production/Lab2.o .debug_frame 0x000000 0x74 *(.debug_frame) .debug_frame 0x000000 0x74 build/default/production/Lab2.o .debug_str 0x000000 0x101 *(.debug_str) .debug_str 0x000000 0x101 build/default/production/Lab2.o .debug_loc *(.debug_loc) .debug_macinfo *(.debug_macinfo) .debug_pubnames 0x000000 0x89 *(.debug_pubnames) .debug_pubnames 0x000000 0x89 build/default/production/Lab2.o .debug_ranges *(.debug_ranges) .debug_aranges 0x000000 0x18 *(.debug_aranges) .debug_aranges 0x000000 0x18 build/default/production/Lab2.o .ivt 0x000004 0xfc 0x000004 0x4 LONG 0x290 DEFINED (__ReservedTrap0)?ABSOLUTE (__ReservedTrap0):ABSOLUTE (__DefaultInterrupt) 0x000006 0x4 LONG 0x290 DEFINED (__OscillatorFail)?ABSOLUTE (__OscillatorFail):ABSOLUTE (__DefaultInterrupt) 0x000008 0x4 LONG 0x290 DEFINED (__AddressError)?ABSOLUTE (__AddressError):ABSOLUTE (__DefaultInterrupt) 0x00000a 0x4 LONG 0x290 DEFINED (__StackError)?ABSOLUTE (__StackError):ABSOLUTE (__DefaultInterrupt) 0x00000c 0x4 LONG 0x290 DEFINED (__MathError)?ABSOLUTE (__MathError):ABSOLUTE (__DefaultInterrupt) 0x00000e 0x4 LONG 0x290 DEFINED (__ReservedTrap5)?ABSOLUTE (__ReservedTrap5):ABSOLUTE (__DefaultInterrupt) 0x000010 0x4 LONG 0x290 DEFINED (__ReservedTrap6)?ABSOLUTE (__ReservedTrap6):ABSOLUTE (__DefaultInterrupt) 0x000012 0x4 LONG 0x290 DEFINED (__ReservedTrap7)?ABSOLUTE (__ReservedTrap7):ABSOLUTE (__DefaultInterrupt) 0x000014 0x4 LONG 0x290 DEFINED (__INT0Interrupt)?ABSOLUTE (__INT0Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000016 0x4 LONG 0x290 DEFINED (__IC1Interrupt)?ABSOLUTE (__IC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000018 0x4 LONG 0x290 DEFINED (__OC1Interrupt)?ABSOLUTE (__OC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00001a 0x4 LONG 0x290 DEFINED (__T1Interrupt)?ABSOLUTE (__T1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00001c 0x4 LONG 0x290 DEFINED (__Interrupt4)?ABSOLUTE (__Interrupt4):ABSOLUTE (__DefaultInterrupt) 0x00001e 0x4 LONG 0x290 DEFINED (__IC2Interrupt)?ABSOLUTE (__IC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000020 0x4 LONG 0x290 DEFINED (__OC2Interrupt)?ABSOLUTE (__OC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000022 0x4 LONG 0x290 DEFINED (__T2Interrupt)?ABSOLUTE (__T2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000024 0x4 LONG 0x290 DEFINED (__T3Interrupt)?ABSOLUTE (__T3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000026 0x4 LONG 0x290 DEFINED (__SPI1ErrInterrupt)?ABSOLUTE (__SPI1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000028 0x4 LONG 0x290 DEFINED (__SPI1Interrupt)?ABSOLUTE (__SPI1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00002a 0x4 LONG 0x290 DEFINED (__U1RXInterrupt)?ABSOLUTE (__U1RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00002c 0x4 LONG 0x290 DEFINED (__U1TXInterrupt)?ABSOLUTE (__U1TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00002e 0x4 LONG 0x290 DEFINED (__ADC1Interrupt)?ABSOLUTE (__ADC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000030 0x4 LONG 0x290 DEFINED (__Interrupt14)?ABSOLUTE (__Interrupt14):ABSOLUTE (__DefaultInterrupt) 0x000032 0x4 LONG 0x290 DEFINED (__Interrupt15)?ABSOLUTE (__Interrupt15):ABSOLUTE (__DefaultInterrupt) 0x000034 0x4 LONG 0x290 DEFINED (__SI2C1Interrupt)?ABSOLUTE (__SI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000036 0x4 LONG 0x290 DEFINED (__MI2C1Interrupt)?ABSOLUTE (__MI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000038 0x4 LONG 0x290 DEFINED (__CompInterrupt)?ABSOLUTE (__CompInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00003a 0x4 LONG 0x290 DEFINED (__CNInterrupt)?ABSOLUTE (__CNInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00003c 0x4 LONG 0x290 DEFINED (__INT1Interrupt)?ABSOLUTE (__INT1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00003e 0x4 LONG 0x290 DEFINED (__Interrupt21)?ABSOLUTE (__Interrupt21):ABSOLUTE (__DefaultInterrupt) 0x000040 0x4 LONG 0x290 DEFINED (__Interrupt22)?ABSOLUTE (__Interrupt22):ABSOLUTE (__DefaultInterrupt) 0x000042 0x4 LONG 0x290 DEFINED (__Interrupt23)?ABSOLUTE (__Interrupt23):ABSOLUTE (__DefaultInterrupt) 0x000044 0x4 LONG 0x290 DEFINED (__Interrupt24)?ABSOLUTE (__Interrupt24):ABSOLUTE (__DefaultInterrupt) 0x000046 0x4 LONG 0x290 DEFINED (__OC3Interrupt)?ABSOLUTE (__OC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000048 0x4 LONG 0x290 DEFINED (__OC4Interrupt)?ABSOLUTE (__OC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004a 0x4 LONG 0x290 DEFINED (__T4Interrupt)?ABSOLUTE (__T4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004c 0x4 LONG 0x290 DEFINED (__T5Interrupt)?ABSOLUTE (__T5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00004e 0x4 LONG 0x290 DEFINED (__INT2Interrupt)?ABSOLUTE (__INT2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000050 0x4 LONG 0x290 DEFINED (__U2RXInterrupt)?ABSOLUTE (__U2RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000052 0x4 LONG 0x290 DEFINED (__U2TXInterrupt)?ABSOLUTE (__U2TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000054 0x4 LONG 0x290 DEFINED (__SPI2ErrInterrupt)?ABSOLUTE (__SPI2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000056 0x4 LONG 0x290 DEFINED (__SPI2Interrupt)?ABSOLUTE (__SPI2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000058 0x4 LONG 0x290 DEFINED (__Interrupt34)?ABSOLUTE (__Interrupt34):ABSOLUTE (__DefaultInterrupt) 0x00005a 0x4 LONG 0x290 DEFINED (__Interrupt35)?ABSOLUTE (__Interrupt35):ABSOLUTE (__DefaultInterrupt) 0x00005c 0x4 LONG 0x290 DEFINED (__Interrupt36)?ABSOLUTE (__Interrupt36):ABSOLUTE (__DefaultInterrupt) 0x00005e 0x4 LONG 0x290 DEFINED (__IC3Interrupt)?ABSOLUTE (__IC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000060 0x4 LONG 0x290 DEFINED (__IC4Interrupt)?ABSOLUTE (__IC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000062 0x4 LONG 0x290 DEFINED (__IC5Interrupt)?ABSOLUTE (__IC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000064 0x4 LONG 0x290 DEFINED (__Interrupt40)?ABSOLUTE (__Interrupt40):ABSOLUTE (__DefaultInterrupt) 0x000066 0x4 LONG 0x290 DEFINED (__OC5Interrupt)?ABSOLUTE (__OC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000068 0x4 LONG 0x290 DEFINED (__Interrupt42)?ABSOLUTE (__Interrupt42):ABSOLUTE (__DefaultInterrupt) 0x00006a 0x4 LONG 0x290 DEFINED (__Interrupt43)?ABSOLUTE (__Interrupt43):ABSOLUTE (__DefaultInterrupt) 0x00006c 0x4 LONG 0x290 DEFINED (__Interrupt44)?ABSOLUTE (__Interrupt44):ABSOLUTE (__DefaultInterrupt) 0x00006e 0x4 LONG 0x290 DEFINED (__PMPInterrupt)?ABSOLUTE (__PMPInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000070 0x4 LONG 0x290 DEFINED (__Interrupt46)?ABSOLUTE (__Interrupt46):ABSOLUTE (__DefaultInterrupt) 0x000072 0x4 LONG 0x290 DEFINED (__Interrupt47)?ABSOLUTE (__Interrupt47):ABSOLUTE (__DefaultInterrupt) 0x000074 0x4 LONG 0x290 DEFINED (__Interrupt48)?ABSOLUTE (__Interrupt48):ABSOLUTE (__DefaultInterrupt) 0x000076 0x4 LONG 0x290 DEFINED (__SI2C2Interrupt)?ABSOLUTE (__SI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000078 0x4 LONG 0x290 DEFINED (__MI2C2Interrupt)?ABSOLUTE (__MI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00007a 0x4 LONG 0x290 DEFINED (__Interrupt51)?ABSOLUTE (__Interrupt51):ABSOLUTE (__DefaultInterrupt) 0x00007c 0x4 LONG 0x290 DEFINED (__Interrupt52)?ABSOLUTE (__Interrupt52):ABSOLUTE (__DefaultInterrupt) 0x00007e 0x4 LONG 0x290 DEFINED (__Interrupt53)?ABSOLUTE (__Interrupt53):ABSOLUTE (__DefaultInterrupt) 0x000080 0x4 LONG 0x290 DEFINED (__Interrupt54)?ABSOLUTE (__Interrupt54):ABSOLUTE (__DefaultInterrupt) 0x000082 0x4 LONG 0x290 DEFINED (__Interrupt55)?ABSOLUTE (__Interrupt55):ABSOLUTE (__DefaultInterrupt) 0x000084 0x4 LONG 0x290 DEFINED (__Interrupt56)?ABSOLUTE (__Interrupt56):ABSOLUTE (__DefaultInterrupt) 0x000086 0x4 LONG 0x290 DEFINED (__Interrupt57)?ABSOLUTE (__Interrupt57):ABSOLUTE (__DefaultInterrupt) 0x000088 0x4 LONG 0x290 DEFINED (__Interrupt58)?ABSOLUTE (__Interrupt58):ABSOLUTE (__DefaultInterrupt) 0x00008a 0x4 LONG 0x290 DEFINED (__Interrupt59)?ABSOLUTE (__Interrupt59):ABSOLUTE (__DefaultInterrupt) 0x00008c 0x4 LONG 0x290 DEFINED (__Interrupt60)?ABSOLUTE (__Interrupt60):ABSOLUTE (__DefaultInterrupt) 0x00008e 0x4 LONG 0x290 DEFINED (__Interrupt61)?ABSOLUTE (__Interrupt61):ABSOLUTE (__DefaultInterrupt) 0x000090 0x4 LONG 0x290 DEFINED (__RTCCInterrupt)?ABSOLUTE (__RTCCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000092 0x4 LONG 0x290 DEFINED (__Interrupt63)?ABSOLUTE (__Interrupt63):ABSOLUTE (__DefaultInterrupt) 0x000094 0x4 LONG 0x290 DEFINED (__Interrupt64)?ABSOLUTE (__Interrupt64):ABSOLUTE (__DefaultInterrupt) 0x000096 0x4 LONG 0x290 DEFINED (__U1ErrInterrupt)?ABSOLUTE (__U1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000098 0x4 LONG 0x290 DEFINED (__U2ErrInterrupt)?ABSOLUTE (__U2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00009a 0x4 LONG 0x290 DEFINED (__CRCInterrupt)?ABSOLUTE (__CRCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00009c 0x4 LONG 0x290 DEFINED (__Interrupt68)?ABSOLUTE (__Interrupt68):ABSOLUTE (__DefaultInterrupt) 0x00009e 0x4 LONG 0x290 DEFINED (__Interrupt69)?ABSOLUTE (__Interrupt69):ABSOLUTE (__DefaultInterrupt) 0x0000a0 0x4 LONG 0x290 DEFINED (__Interrupt70)?ABSOLUTE (__Interrupt70):ABSOLUTE (__DefaultInterrupt) 0x0000a2 0x4 LONG 0x290 DEFINED (__Interrupt71)?ABSOLUTE (__Interrupt71):ABSOLUTE (__DefaultInterrupt) 0x0000a4 0x4 LONG 0x290 DEFINED (__LVDInterrupt)?ABSOLUTE (__LVDInterrupt):ABSOLUTE (__DefaultInterrupt) 0x0000a6 0x4 LONG 0x290 DEFINED (__Interrupt73)?ABSOLUTE (__Interrupt73):ABSOLUTE (__DefaultInterrupt) 0x0000a8 0x4 LONG 0x290 DEFINED (__Interrupt74)?ABSOLUTE (__Interrupt74):ABSOLUTE (__DefaultInterrupt) 0x0000aa 0x4 LONG 0x290 DEFINED (__Interrupt75)?ABSOLUTE (__Interrupt75):ABSOLUTE (__DefaultInterrupt) 0x0000ac 0x4 LONG 0x290 DEFINED (__Interrupt76)?ABSOLUTE (__Interrupt76):ABSOLUTE (__DefaultInterrupt) 0x0000ae 0x4 LONG 0x290 DEFINED (__Interrupt77)?ABSOLUTE (__Interrupt77):ABSOLUTE (__DefaultInterrupt) 0x0000b0 0x4 LONG 0x290 DEFINED (__Interrupt78)?ABSOLUTE (__Interrupt78):ABSOLUTE (__DefaultInterrupt) 0x0000b2 0x4 LONG 0x290 DEFINED (__Interrupt79)?ABSOLUTE (__Interrupt79):ABSOLUTE (__DefaultInterrupt) 0x0000b4 0x4 LONG 0x290 DEFINED (__Interrupt80)?ABSOLUTE (__Interrupt80):ABSOLUTE (__DefaultInterrupt) 0x0000b6 0x4 LONG 0x290 DEFINED (__Interrupt81)?ABSOLUTE (__Interrupt81):ABSOLUTE (__DefaultInterrupt) 0x0000b8 0x4 LONG 0x290 DEFINED (__Interrupt82)?ABSOLUTE (__Interrupt82):ABSOLUTE (__DefaultInterrupt) 0x0000ba 0x4 LONG 0x290 DEFINED (__Interrupt83)?ABSOLUTE (__Interrupt83):ABSOLUTE (__DefaultInterrupt) 0x0000bc 0x4 LONG 0x290 DEFINED (__Interrupt84)?ABSOLUTE (__Interrupt84):ABSOLUTE (__DefaultInterrupt) 0x0000be 0x4 LONG 0x290 DEFINED (__Interrupt85)?ABSOLUTE (__Interrupt85):ABSOLUTE (__DefaultInterrupt) 0x0000c0 0x4 LONG 0x290 DEFINED (__Interrupt86)?ABSOLUTE (__Interrupt86):ABSOLUTE (__DefaultInterrupt) 0x0000c2 0x4 LONG 0x290 DEFINED (__Interrupt87)?ABSOLUTE (__Interrupt87):ABSOLUTE (__DefaultInterrupt) 0x0000c4 0x4 LONG 0x290 DEFINED (__Interrupt88)?ABSOLUTE (__Interrupt88):ABSOLUTE (__DefaultInterrupt) 0x0000c6 0x4 LONG 0x290 DEFINED (__Interrupt89)?ABSOLUTE (__Interrupt89):ABSOLUTE (__DefaultInterrupt) 0x0000c8 0x4 LONG 0x290 DEFINED (__Interrupt90)?ABSOLUTE (__Interrupt90):ABSOLUTE (__DefaultInterrupt) 0x0000ca 0x4 LONG 0x290 DEFINED (__Interrupt91)?ABSOLUTE (__Interrupt91):ABSOLUTE (__DefaultInterrupt) 0x0000cc 0x4 LONG 0x290 DEFINED (__Interrupt92)?ABSOLUTE (__Interrupt92):ABSOLUTE (__DefaultInterrupt) 0x0000ce 0x4 LONG 0x290 DEFINED (__Interrupt93)?ABSOLUTE (__Interrupt93):ABSOLUTE (__DefaultInterrupt) 0x0000d0 0x4 LONG 0x290 DEFINED (__Interrupt94)?ABSOLUTE (__Interrupt94):ABSOLUTE (__DefaultInterrupt) 0x0000d2 0x4 LONG 0x290 DEFINED (__Interrupt95)?ABSOLUTE (__Interrupt95):ABSOLUTE (__DefaultInterrupt) 0x0000d4 0x4 LONG 0x290 DEFINED (__Interrupt96)?ABSOLUTE (__Interrupt96):ABSOLUTE (__DefaultInterrupt) 0x0000d6 0x4 LONG 0x290 DEFINED (__Interrupt97)?ABSOLUTE (__Interrupt97):ABSOLUTE (__DefaultInterrupt) 0x0000d8 0x4 LONG 0x290 DEFINED (__Interrupt98)?ABSOLUTE (__Interrupt98):ABSOLUTE (__DefaultInterrupt) 0x0000da 0x4 LONG 0x290 DEFINED (__Interrupt99)?ABSOLUTE (__Interrupt99):ABSOLUTE (__DefaultInterrupt) 0x0000dc 0x4 LONG 0x290 DEFINED (__Interrupt100)?ABSOLUTE (__Interrupt100):ABSOLUTE (__DefaultInterrupt) 0x0000de 0x4 LONG 0x290 DEFINED (__Interrupt101)?ABSOLUTE (__Interrupt101):ABSOLUTE (__DefaultInterrupt) 0x0000e0 0x4 LONG 0x290 DEFINED (__Interrupt102)?ABSOLUTE (__Interrupt102):ABSOLUTE (__DefaultInterrupt) 0x0000e2 0x4 LONG 0x290 DEFINED (__Interrupt103)?ABSOLUTE (__Interrupt103):ABSOLUTE (__DefaultInterrupt) 0x0000e4 0x4 LONG 0x290 DEFINED (__Interrupt104)?ABSOLUTE (__Interrupt104):ABSOLUTE (__DefaultInterrupt) 0x0000e6 0x4 LONG 0x290 DEFINED (__Interrupt105)?ABSOLUTE (__Interrupt105):ABSOLUTE (__DefaultInterrupt) 0x0000e8 0x4 LONG 0x290 DEFINED (__Interrupt106)?ABSOLUTE (__Interrupt106):ABSOLUTE (__DefaultInterrupt) 0x0000ea 0x4 LONG 0x290 DEFINED (__Interrupt107)?ABSOLUTE (__Interrupt107):ABSOLUTE (__DefaultInterrupt) 0x0000ec 0x4 LONG 0x290 DEFINED (__Interrupt108)?ABSOLUTE (__Interrupt108):ABSOLUTE (__DefaultInterrupt) 0x0000ee 0x4 LONG 0x290 DEFINED (__Interrupt109)?ABSOLUTE (__Interrupt109):ABSOLUTE (__DefaultInterrupt) 0x0000f0 0x4 LONG 0x290 DEFINED (__Interrupt110)?ABSOLUTE (__Interrupt110):ABSOLUTE (__DefaultInterrupt) 0x0000f2 0x4 LONG 0x290 DEFINED (__Interrupt111)?ABSOLUTE (__Interrupt111):ABSOLUTE (__DefaultInterrupt) 0x0000f4 0x4 LONG 0x290 DEFINED (__Interrupt112)?ABSOLUTE (__Interrupt112):ABSOLUTE (__DefaultInterrupt) 0x0000f6 0x4 LONG 0x290 DEFINED (__Interrupt113)?ABSOLUTE (__Interrupt113):ABSOLUTE (__DefaultInterrupt) 0x0000f8 0x4 LONG 0x290 DEFINED (__Interrupt114)?ABSOLUTE (__Interrupt114):ABSOLUTE (__DefaultInterrupt) 0x0000fa 0x4 LONG 0x290 DEFINED (__Interrupt115)?ABSOLUTE (__Interrupt115):ABSOLUTE (__DefaultInterrupt) 0x0000fc 0x4 LONG 0x290 DEFINED (__Interrupt116)?ABSOLUTE (__Interrupt116):ABSOLUTE (__DefaultInterrupt) 0x0000fe 0x4 LONG 0x290 DEFINED (__Interrupt117)?ABSOLUTE (__Interrupt117):ABSOLUTE (__DefaultInterrupt) .aivt 0x000104 0xfc 0x000104 0x4 LONG 0x290 DEFINED (__AltReservedTrap0)?ABSOLUTE (__AltReservedTrap0):DEFINED (__ReservedTrap0)?ABSOLUTE (__ReservedTrap0):ABSOLUTE (__DefaultInterrupt) 0x000106 0x4 LONG 0x290 DEFINED (__AltOscillatorFail)?ABSOLUTE (__AltOscillatorFail):DEFINED (__OscillatorFail)?ABSOLUTE (__OscillatorFail):ABSOLUTE (__DefaultInterrupt) 0x000108 0x4 LONG 0x290 DEFINED (__AltAddressError)?ABSOLUTE (__AltAddressError):DEFINED (__AddressError)?ABSOLUTE (__AddressError):ABSOLUTE (__DefaultInterrupt) 0x00010a 0x4 LONG 0x290 DEFINED (__AltStackError)?ABSOLUTE (__AltStackError):DEFINED (__StackError)?ABSOLUTE (__StackError):ABSOLUTE (__DefaultInterrupt) 0x00010c 0x4 LONG 0x290 DEFINED (__AltMathError)?ABSOLUTE (__AltMathError):DEFINED (__MathError)?ABSOLUTE (__MathError):ABSOLUTE (__DefaultInterrupt) 0x00010e 0x4 LONG 0x290 DEFINED (__AltReservedTrap5)?ABSOLUTE (__AltReservedTrap5):DEFINED (__ReservedTrap5)?ABSOLUTE (__ReservedTrap5):ABSOLUTE (__DefaultInterrupt) 0x000110 0x4 LONG 0x290 DEFINED (__AltReservedTrap6)?ABSOLUTE (__AltReservedTrap6):DEFINED (__ReservedTrap6)?ABSOLUTE (__ReservedTrap6):ABSOLUTE (__DefaultInterrupt) 0x000112 0x4 LONG 0x290 DEFINED (__AltReservedTrap7)?ABSOLUTE (__AltReservedTrap7):DEFINED (__ReservedTrap7)?ABSOLUTE (__ReservedTrap7):ABSOLUTE (__DefaultInterrupt) 0x000114 0x4 LONG 0x290 DEFINED (__AltINT0Interrupt)?ABSOLUTE (__AltINT0Interrupt):DEFINED (__INT0Interrupt)?ABSOLUTE (__INT0Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000116 0x4 LONG 0x290 DEFINED (__AltIC1Interrupt)?ABSOLUTE (__AltIC1Interrupt):DEFINED (__IC1Interrupt)?ABSOLUTE (__IC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000118 0x4 LONG 0x290 DEFINED (__AltOC1Interrupt)?ABSOLUTE (__AltOC1Interrupt):DEFINED (__OC1Interrupt)?ABSOLUTE (__OC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00011a 0x4 LONG 0x290 DEFINED (__AltT1Interrupt)?ABSOLUTE (__AltT1Interrupt):DEFINED (__T1Interrupt)?ABSOLUTE (__T1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00011c 0x4 LONG 0x290 DEFINED (__AltInterrupt4)?ABSOLUTE (__AltInterrupt4):DEFINED (__Interrupt4)?ABSOLUTE (__Interrupt4):ABSOLUTE (__DefaultInterrupt) 0x00011e 0x4 LONG 0x290 DEFINED (__AltIC2Interrupt)?ABSOLUTE (__AltIC2Interrupt):DEFINED (__IC2Interrupt)?ABSOLUTE (__IC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000120 0x4 LONG 0x290 DEFINED (__AltOC2Interrupt)?ABSOLUTE (__AltOC2Interrupt):DEFINED (__OC2Interrupt)?ABSOLUTE (__OC2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000122 0x4 LONG 0x290 DEFINED (__AltT2Interrupt)?ABSOLUTE (__AltT2Interrupt):DEFINED (__T2Interrupt)?ABSOLUTE (__T2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000124 0x4 LONG 0x290 DEFINED (__AltT3Interrupt)?ABSOLUTE (__AltT3Interrupt):DEFINED (__T3Interrupt)?ABSOLUTE (__T3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000126 0x4 LONG 0x290 DEFINED (__AltSPI1ErrInterrupt)?ABSOLUTE (__AltSPI1ErrInterrupt):DEFINED (__SPI1ErrInterrupt)?ABSOLUTE (__SPI1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000128 0x4 LONG 0x290 DEFINED (__AltSPI1Interrupt)?ABSOLUTE (__AltSPI1Interrupt):DEFINED (__SPI1Interrupt)?ABSOLUTE (__SPI1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00012a 0x4 LONG 0x290 DEFINED (__AltU1RXInterrupt)?ABSOLUTE (__AltU1RXInterrupt):DEFINED (__U1RXInterrupt)?ABSOLUTE (__U1RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00012c 0x4 LONG 0x290 DEFINED (__AltU1TXInterrupt)?ABSOLUTE (__AltU1TXInterrupt):DEFINED (__U1TXInterrupt)?ABSOLUTE (__U1TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00012e 0x4 LONG 0x290 DEFINED (__AltADC1Interrupt)?ABSOLUTE (__AltADC1Interrupt):DEFINED (__ADC1Interrupt)?ABSOLUTE (__ADC1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000130 0x4 LONG 0x290 DEFINED (__AltInterrupt14)?ABSOLUTE (__AltInterrupt14):DEFINED (__Interrupt14)?ABSOLUTE (__Interrupt14):ABSOLUTE (__DefaultInterrupt) 0x000132 0x4 LONG 0x290 DEFINED (__AltInterrupt15)?ABSOLUTE (__AltInterrupt15):DEFINED (__Interrupt15)?ABSOLUTE (__Interrupt15):ABSOLUTE (__DefaultInterrupt) 0x000134 0x4 LONG 0x290 DEFINED (__AltSI2C1Interrupt)?ABSOLUTE (__AltSI2C1Interrupt):DEFINED (__SI2C1Interrupt)?ABSOLUTE (__SI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000136 0x4 LONG 0x290 DEFINED (__AltMI2C1Interrupt)?ABSOLUTE (__AltMI2C1Interrupt):DEFINED (__MI2C1Interrupt)?ABSOLUTE (__MI2C1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000138 0x4 LONG 0x290 DEFINED (__AltCompInterrupt)?ABSOLUTE (__AltCompInterrupt):DEFINED (__CompInterrupt)?ABSOLUTE (__CompInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00013a 0x4 LONG 0x290 DEFINED (__AltCNInterrupt)?ABSOLUTE (__AltCNInterrupt):DEFINED (__CNInterrupt)?ABSOLUTE (__CNInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00013c 0x4 LONG 0x290 DEFINED (__AltINT1Interrupt)?ABSOLUTE (__AltINT1Interrupt):DEFINED (__INT1Interrupt)?ABSOLUTE (__INT1Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00013e 0x4 LONG 0x290 DEFINED (__AltInterrupt21)?ABSOLUTE (__AltInterrupt21):DEFINED (__Interrupt21)?ABSOLUTE (__Interrupt21):ABSOLUTE (__DefaultInterrupt) 0x000140 0x4 LONG 0x290 DEFINED (__AltInterrupt22)?ABSOLUTE (__AltInterrupt22):DEFINED (__Interrupt22)?ABSOLUTE (__Interrupt22):ABSOLUTE (__DefaultInterrupt) 0x000142 0x4 LONG 0x290 DEFINED (__AltInterrupt23)?ABSOLUTE (__AltInterrupt23):DEFINED (__Interrupt23)?ABSOLUTE (__Interrupt23):ABSOLUTE (__DefaultInterrupt) 0x000144 0x4 LONG 0x290 DEFINED (__AltInterrupt24)?ABSOLUTE (__AltInterrupt24):DEFINED (__Interrupt24)?ABSOLUTE (__Interrupt24):ABSOLUTE (__DefaultInterrupt) 0x000146 0x4 LONG 0x290 DEFINED (__AltOC3Interrupt)?ABSOLUTE (__AltOC3Interrupt):DEFINED (__OC3Interrupt)?ABSOLUTE (__OC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000148 0x4 LONG 0x290 DEFINED (__AltOC4Interrupt)?ABSOLUTE (__AltOC4Interrupt):DEFINED (__OC4Interrupt)?ABSOLUTE (__OC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014a 0x4 LONG 0x290 DEFINED (__AltT4Interrupt)?ABSOLUTE (__AltT4Interrupt):DEFINED (__T4Interrupt)?ABSOLUTE (__T4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014c 0x4 LONG 0x290 DEFINED (__AltT5Interrupt)?ABSOLUTE (__AltT5Interrupt):DEFINED (__T5Interrupt)?ABSOLUTE (__T5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00014e 0x4 LONG 0x290 DEFINED (__AltINT2Interrupt)?ABSOLUTE (__AltINT2Interrupt):DEFINED (__INT2Interrupt)?ABSOLUTE (__INT2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000150 0x4 LONG 0x290 DEFINED (__AltU2RXInterrupt)?ABSOLUTE (__AltU2RXInterrupt):DEFINED (__U2RXInterrupt)?ABSOLUTE (__U2RXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000152 0x4 LONG 0x290 DEFINED (__AltU2TXInterrupt)?ABSOLUTE (__AltU2TXInterrupt):DEFINED (__U2TXInterrupt)?ABSOLUTE (__U2TXInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000154 0x4 LONG 0x290 DEFINED (__AltSPI2ErrInterrupt)?ABSOLUTE (__AltSPI2ErrInterrupt):DEFINED (__SPI2ErrInterrupt)?ABSOLUTE (__SPI2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000156 0x4 LONG 0x290 DEFINED (__AltSPI2Interrupt)?ABSOLUTE (__AltSPI2Interrupt):DEFINED (__SPI2Interrupt)?ABSOLUTE (__SPI2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000158 0x4 LONG 0x290 DEFINED (__AltInterrupt34)?ABSOLUTE (__AltInterrupt34):DEFINED (__Interrupt34)?ABSOLUTE (__Interrupt34):ABSOLUTE (__DefaultInterrupt) 0x00015a 0x4 LONG 0x290 DEFINED (__AltInterrupt35)?ABSOLUTE (__AltInterrupt35):DEFINED (__Interrupt35)?ABSOLUTE (__Interrupt35):ABSOLUTE (__DefaultInterrupt) 0x00015c 0x4 LONG 0x290 DEFINED (__AltInterrupt36)?ABSOLUTE (__AltInterrupt36):DEFINED (__Interrupt36)?ABSOLUTE (__Interrupt36):ABSOLUTE (__DefaultInterrupt) 0x00015e 0x4 LONG 0x290 DEFINED (__AltIC3Interrupt)?ABSOLUTE (__AltIC3Interrupt):DEFINED (__IC3Interrupt)?ABSOLUTE (__IC3Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000160 0x4 LONG 0x290 DEFINED (__AltIC4Interrupt)?ABSOLUTE (__AltIC4Interrupt):DEFINED (__IC4Interrupt)?ABSOLUTE (__IC4Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000162 0x4 LONG 0x290 DEFINED (__AltIC5Interrupt)?ABSOLUTE (__AltIC5Interrupt):DEFINED (__IC5Interrupt)?ABSOLUTE (__IC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000164 0x4 LONG 0x290 DEFINED (__AltInterrupt40)?ABSOLUTE (__AltInterrupt40):DEFINED (__Interrupt40)?ABSOLUTE (__Interrupt40):ABSOLUTE (__DefaultInterrupt) 0x000166 0x4 LONG 0x290 DEFINED (__AltOC5Interrupt)?ABSOLUTE (__AltOC5Interrupt):DEFINED (__OC5Interrupt)?ABSOLUTE (__OC5Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000168 0x4 LONG 0x290 DEFINED (__AltInterrupt42)?ABSOLUTE (__AltInterrupt42):DEFINED (__Interrupt42)?ABSOLUTE (__Interrupt42):ABSOLUTE (__DefaultInterrupt) 0x00016a 0x4 LONG 0x290 DEFINED (__AltInterrupt43)?ABSOLUTE (__AltInterrupt43):DEFINED (__Interrupt43)?ABSOLUTE (__Interrupt43):ABSOLUTE (__DefaultInterrupt) 0x00016c 0x4 LONG 0x290 DEFINED (__AltInterrupt44)?ABSOLUTE (__AltInterrupt44):DEFINED (__Interrupt44)?ABSOLUTE (__Interrupt44):ABSOLUTE (__DefaultInterrupt) 0x00016e 0x4 LONG 0x290 DEFINED (__AltPMPInterrupt)?ABSOLUTE (__AltPMPInterrupt):DEFINED (__PMPInterrupt)?ABSOLUTE (__PMPInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000170 0x4 LONG 0x290 DEFINED (__AltInterrupt46)?ABSOLUTE (__AltInterrupt46):DEFINED (__Interrupt46)?ABSOLUTE (__Interrupt46):ABSOLUTE (__DefaultInterrupt) 0x000172 0x4 LONG 0x290 DEFINED (__AltInterrupt47)?ABSOLUTE (__AltInterrupt47):DEFINED (__Interrupt47)?ABSOLUTE (__Interrupt47):ABSOLUTE (__DefaultInterrupt) 0x000174 0x4 LONG 0x290 DEFINED (__AltInterrupt48)?ABSOLUTE (__AltInterrupt48):DEFINED (__Interrupt48)?ABSOLUTE (__Interrupt48):ABSOLUTE (__DefaultInterrupt) 0x000176 0x4 LONG 0x290 DEFINED (__AltSI2C2Interrupt)?ABSOLUTE (__AltSI2C2Interrupt):DEFINED (__SI2C2Interrupt)?ABSOLUTE (__SI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x000178 0x4 LONG 0x290 DEFINED (__AltMI2C2Interrupt)?ABSOLUTE (__AltMI2C2Interrupt):DEFINED (__MI2C2Interrupt)?ABSOLUTE (__MI2C2Interrupt):ABSOLUTE (__DefaultInterrupt) 0x00017a 0x4 LONG 0x290 DEFINED (__AltInterrupt51)?ABSOLUTE (__AltInterrupt51):DEFINED (__Interrupt51)?ABSOLUTE (__Interrupt51):ABSOLUTE (__DefaultInterrupt) 0x00017c 0x4 LONG 0x290 DEFINED (__AltInterrupt52)?ABSOLUTE (__AltInterrupt52):DEFINED (__Interrupt52)?ABSOLUTE (__Interrupt52):ABSOLUTE (__DefaultInterrupt) 0x00017e 0x4 LONG 0x290 DEFINED (__AltInterrupt53)?ABSOLUTE (__AltInterrupt53):DEFINED (__Interrupt53)?ABSOLUTE (__Interrupt53):ABSOLUTE (__DefaultInterrupt) 0x000180 0x4 LONG 0x290 DEFINED (__AltInterrupt54)?ABSOLUTE (__AltInterrupt54):DEFINED (__Interrupt54)?ABSOLUTE (__Interrupt54):ABSOLUTE (__DefaultInterrupt) 0x000182 0x4 LONG 0x290 DEFINED (__AltInterrupt55)?ABSOLUTE (__AltInterrupt55):DEFINED (__Interrupt55)?ABSOLUTE (__Interrupt55):ABSOLUTE (__DefaultInterrupt) 0x000184 0x4 LONG 0x290 DEFINED (__AltInterrupt56)?ABSOLUTE (__AltInterrupt56):DEFINED (__Interrupt56)?ABSOLUTE (__Interrupt56):ABSOLUTE (__DefaultInterrupt) 0x000186 0x4 LONG 0x290 DEFINED (__AltInterrupt57)?ABSOLUTE (__AltInterrupt57):DEFINED (__Interrupt57)?ABSOLUTE (__Interrupt57):ABSOLUTE (__DefaultInterrupt) 0x000188 0x4 LONG 0x290 DEFINED (__AltInterrupt58)?ABSOLUTE (__AltInterrupt58):DEFINED (__Interrupt58)?ABSOLUTE (__Interrupt58):ABSOLUTE (__DefaultInterrupt) 0x00018a 0x4 LONG 0x290 DEFINED (__AltInterrupt59)?ABSOLUTE (__AltInterrupt59):DEFINED (__Interrupt59)?ABSOLUTE (__Interrupt59):ABSOLUTE (__DefaultInterrupt) 0x00018c 0x4 LONG 0x290 DEFINED (__AltInterrupt60)?ABSOLUTE (__AltInterrupt60):DEFINED (__Interrupt60)?ABSOLUTE (__Interrupt60):ABSOLUTE (__DefaultInterrupt) 0x00018e 0x4 LONG 0x290 DEFINED (__AltInterrupt61)?ABSOLUTE (__AltInterrupt61):DEFINED (__Interrupt61)?ABSOLUTE (__Interrupt61):ABSOLUTE (__DefaultInterrupt) 0x000190 0x4 LONG 0x290 DEFINED (__AltRTCCInterrupt)?ABSOLUTE (__AltRTCCInterrupt):DEFINED (__RTCCInterrupt)?ABSOLUTE (__RTCCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000192 0x4 LONG 0x290 DEFINED (__AltInterrupt63)?ABSOLUTE (__AltInterrupt63):DEFINED (__Interrupt63)?ABSOLUTE (__Interrupt63):ABSOLUTE (__DefaultInterrupt) 0x000194 0x4 LONG 0x290 DEFINED (__AltInterrupt64)?ABSOLUTE (__AltInterrupt64):DEFINED (__Interrupt64)?ABSOLUTE (__Interrupt64):ABSOLUTE (__DefaultInterrupt) 0x000196 0x4 LONG 0x290 DEFINED (__AltU1ErrInterrupt)?ABSOLUTE (__AltU1ErrInterrupt):DEFINED (__U1ErrInterrupt)?ABSOLUTE (__U1ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x000198 0x4 LONG 0x290 DEFINED (__AltU2ErrInterrupt)?ABSOLUTE (__AltU2ErrInterrupt):DEFINED (__U2ErrInterrupt)?ABSOLUTE (__U2ErrInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00019a 0x4 LONG 0x290 DEFINED (__AltCRCInterrupt)?ABSOLUTE (__AltCRCInterrupt):DEFINED (__CRCInterrupt)?ABSOLUTE (__CRCInterrupt):ABSOLUTE (__DefaultInterrupt) 0x00019c 0x4 LONG 0x290 DEFINED (__AltInterrupt68)?ABSOLUTE (__AltInterrupt68):DEFINED (__Interrupt68)?ABSOLUTE (__Interrupt68):ABSOLUTE (__DefaultInterrupt) 0x00019e 0x4 LONG 0x290 DEFINED (__AltInterrupt69)?ABSOLUTE (__AltInterrupt69):DEFINED (__Interrupt69)?ABSOLUTE (__Interrupt69):ABSOLUTE (__DefaultInterrupt) 0x0001a0 0x4 LONG 0x290 DEFINED (__AltInterrupt70)?ABSOLUTE (__AltInterrupt70):DEFINED (__Interrupt70)?ABSOLUTE (__Interrupt70):ABSOLUTE (__DefaultInterrupt) 0x0001a2 0x4 LONG 0x290 DEFINED (__AltInterrupt71)?ABSOLUTE (__AltInterrupt71):DEFINED (__Interrupt71)?ABSOLUTE (__Interrupt71):ABSOLUTE (__DefaultInterrupt) 0x0001a4 0x4 LONG 0x290 DEFINED (__AltLVDInterrupt)?ABSOLUTE (__AltLVDInterrupt):DEFINED (__LVDInterrupt)?ABSOLUTE (__LVDInterrupt):ABSOLUTE (__DefaultInterrupt) 0x0001a6 0x4 LONG 0x290 DEFINED (__AltInterrupt73)?ABSOLUTE (__AltInterrupt73):DEFINED (__Interrupt73)?ABSOLUTE (__Interrupt73):ABSOLUTE (__DefaultInterrupt) 0x0001a8 0x4 LONG 0x290 DEFINED (__AltInterrupt74)?ABSOLUTE (__AltInterrupt74):DEFINED (__Interrupt74)?ABSOLUTE (__Interrupt74):ABSOLUTE (__DefaultInterrupt) 0x0001aa 0x4 LONG 0x290 DEFINED (__AltInterrupt75)?ABSOLUTE (__AltInterrupt75):DEFINED (__Interrupt75)?ABSOLUTE (__Interrupt75):ABSOLUTE (__DefaultInterrupt) 0x0001ac 0x4 LONG 0x290 DEFINED (__AltInterrupt76)?ABSOLUTE (__AltInterrupt76):DEFINED (__Interrupt76)?ABSOLUTE (__Interrupt76):ABSOLUTE (__DefaultInterrupt) 0x0001ae 0x4 LONG 0x290 DEFINED (__AltInterrupt77)?ABSOLUTE (__AltInterrupt77):DEFINED (__Interrupt77)?ABSOLUTE (__Interrupt77):ABSOLUTE (__DefaultInterrupt) 0x0001b0 0x4 LONG 0x290 DEFINED (__AltInterrupt78)?ABSOLUTE (__AltInterrupt78):DEFINED (__Interrupt78)?ABSOLUTE (__Interrupt78):ABSOLUTE (__DefaultInterrupt) 0x0001b2 0x4 LONG 0x290 DEFINED (__AltInterrupt79)?ABSOLUTE (__AltInterrupt79):DEFINED (__Interrupt79)?ABSOLUTE (__Interrupt79):ABSOLUTE (__DefaultInterrupt) 0x0001b4 0x4 LONG 0x290 DEFINED (__AltInterrupt80)?ABSOLUTE (__AltInterrupt80):DEFINED (__Interrupt80)?ABSOLUTE (__Interrupt80):ABSOLUTE (__DefaultInterrupt) 0x0001b6 0x4 LONG 0x290 DEFINED (__AltInterrupt81)?ABSOLUTE (__AltInterrupt81):DEFINED (__Interrupt81)?ABSOLUTE (__Interrupt81):ABSOLUTE (__DefaultInterrupt) 0x0001b8 0x4 LONG 0x290 DEFINED (__AltInterrupt82)?ABSOLUTE (__AltInterrupt82):DEFINED (__Interrupt82)?ABSOLUTE (__Interrupt82):ABSOLUTE (__DefaultInterrupt) 0x0001ba 0x4 LONG 0x290 DEFINED (__AltInterrupt83)?ABSOLUTE (__AltInterrupt83):DEFINED (__Interrupt83)?ABSOLUTE (__Interrupt83):ABSOLUTE (__DefaultInterrupt) 0x0001bc 0x4 LONG 0x290 DEFINED (__AltInterrupt84)?ABSOLUTE (__AltInterrupt84):DEFINED (__Interrupt84)?ABSOLUTE (__Interrupt84):ABSOLUTE (__DefaultInterrupt) 0x0001be 0x4 LONG 0x290 DEFINED (__AltInterrupt85)?ABSOLUTE (__AltInterrupt85):DEFINED (__Interrupt85)?ABSOLUTE (__Interrupt85):ABSOLUTE (__DefaultInterrupt) 0x0001c0 0x4 LONG 0x290 DEFINED (__AltInterrupt86)?ABSOLUTE (__AltInterrupt86):DEFINED (__Interrupt86)?ABSOLUTE (__Interrupt86):ABSOLUTE (__DefaultInterrupt) 0x0001c2 0x4 LONG 0x290 DEFINED (__AltInterrupt87)?ABSOLUTE (__AltInterrupt87):DEFINED (__Interrupt87)?ABSOLUTE (__Interrupt87):ABSOLUTE (__DefaultInterrupt) 0x0001c4 0x4 LONG 0x290 DEFINED (__AltInterrupt88)?ABSOLUTE (__AltInterrupt88):DEFINED (__Interrupt88)?ABSOLUTE (__Interrupt88):ABSOLUTE (__DefaultInterrupt) 0x0001c6 0x4 LONG 0x290 DEFINED (__AltInterrupt89)?ABSOLUTE (__AltInterrupt89):DEFINED (__Interrupt89)?ABSOLUTE (__Interrupt89):ABSOLUTE (__DefaultInterrupt) 0x0001c8 0x4 LONG 0x290 DEFINED (__AltInterrupt90)?ABSOLUTE (__AltInterrupt90):DEFINED (__Interrupt90)?ABSOLUTE (__Interrupt90):ABSOLUTE (__DefaultInterrupt) 0x0001ca 0x4 LONG 0x290 DEFINED (__AltInterrupt91)?ABSOLUTE (__AltInterrupt91):DEFINED (__Interrupt91)?ABSOLUTE (__Interrupt91):ABSOLUTE (__DefaultInterrupt) 0x0001cc 0x4 LONG 0x290 DEFINED (__AltInterrupt92)?ABSOLUTE (__AltInterrupt92):DEFINED (__Interrupt92)?ABSOLUTE (__Interrupt92):ABSOLUTE (__DefaultInterrupt) 0x0001ce 0x4 LONG 0x290 DEFINED (__AltInterrupt93)?ABSOLUTE (__AltInterrupt93):DEFINED (__Interrupt93)?ABSOLUTE (__Interrupt93):ABSOLUTE (__DefaultInterrupt) 0x0001d0 0x4 LONG 0x290 DEFINED (__AltInterrupt94)?ABSOLUTE (__AltInterrupt94):DEFINED (__Interrupt94)?ABSOLUTE (__Interrupt94):ABSOLUTE (__DefaultInterrupt) 0x0001d2 0x4 LONG 0x290 DEFINED (__AltInterrupt95)?ABSOLUTE (__AltInterrupt95):DEFINED (__Interrupt95)?ABSOLUTE (__Interrupt95):ABSOLUTE (__DefaultInterrupt) 0x0001d4 0x4 LONG 0x290 DEFINED (__AltInterrupt96)?ABSOLUTE (__AltInterrupt96):DEFINED (__Interrupt96)?ABSOLUTE (__Interrupt96):ABSOLUTE (__DefaultInterrupt) 0x0001d6 0x4 LONG 0x290 DEFINED (__AltInterrupt97)?ABSOLUTE (__AltInterrupt97):DEFINED (__Interrupt97)?ABSOLUTE (__Interrupt97):ABSOLUTE (__DefaultInterrupt) 0x0001d8 0x4 LONG 0x290 DEFINED (__AltInterrupt98)?ABSOLUTE (__AltInterrupt98):DEFINED (__Interrupt98)?ABSOLUTE (__Interrupt98):ABSOLUTE (__DefaultInterrupt) 0x0001da 0x4 LONG 0x290 DEFINED (__AltInterrupt99)?ABSOLUTE (__AltInterrupt99):DEFINED (__Interrupt99)?ABSOLUTE (__Interrupt99):ABSOLUTE (__DefaultInterrupt) 0x0001dc 0x4 LONG 0x290 DEFINED (__AltInterrupt100)?ABSOLUTE (__AltInterrupt100):DEFINED (__Interrupt100)?ABSOLUTE (__Interrupt100):ABSOLUTE (__DefaultInterrupt) 0x0001de 0x4 LONG 0x290 DEFINED (__AltInterrupt101)?ABSOLUTE (__AltInterrupt101):DEFINED (__Interrupt101)?ABSOLUTE (__Interrupt101):ABSOLUTE (__DefaultInterrupt) 0x0001e0 0x4 LONG 0x290 DEFINED (__AltInterrupt102)?ABSOLUTE (__AltInterrupt102):DEFINED (__Interrupt102)?ABSOLUTE (__Interrupt102):ABSOLUTE (__DefaultInterrupt) 0x0001e2 0x4 LONG 0x290 DEFINED (__AltInterrupt103)?ABSOLUTE (__AltInterrupt103):DEFINED (__Interrupt103)?ABSOLUTE (__Interrupt103):ABSOLUTE (__DefaultInterrupt) 0x0001e4 0x4 LONG 0x290 DEFINED (__AltInterrupt104)?ABSOLUTE (__AltInterrupt104):DEFINED (__Interrupt104)?ABSOLUTE (__Interrupt104):ABSOLUTE (__DefaultInterrupt) 0x0001e6 0x4 LONG 0x290 DEFINED (__AltInterrupt105)?ABSOLUTE (__AltInterrupt105):DEFINED (__Interrupt105)?ABSOLUTE (__Interrupt105):ABSOLUTE (__DefaultInterrupt) 0x0001e8 0x4 LONG 0x290 DEFINED (__AltInterrupt106)?ABSOLUTE (__AltInterrupt106):DEFINED (__Interrupt106)?ABSOLUTE (__Interrupt106):ABSOLUTE (__DefaultInterrupt) 0x0001ea 0x4 LONG 0x290 DEFINED (__AltInterrupt107)?ABSOLUTE (__AltInterrupt107):DEFINED (__Interrupt107)?ABSOLUTE (__Interrupt107):ABSOLUTE (__DefaultInterrupt) 0x0001ec 0x4 LONG 0x290 DEFINED (__AltInterrupt108)?ABSOLUTE (__AltInterrupt108):DEFINED (__Interrupt108)?ABSOLUTE (__Interrupt108):ABSOLUTE (__DefaultInterrupt) 0x0001ee 0x4 LONG 0x290 DEFINED (__AltInterrupt109)?ABSOLUTE (__AltInterrupt109):DEFINED (__Interrupt109)?ABSOLUTE (__Interrupt109):ABSOLUTE (__DefaultInterrupt) 0x0001f0 0x4 LONG 0x290 DEFINED (__AltInterrupt110)?ABSOLUTE (__AltInterrupt110):DEFINED (__Interrupt110)?ABSOLUTE (__Interrupt110):ABSOLUTE (__DefaultInterrupt) 0x0001f2 0x4 LONG 0x290 DEFINED (__AltInterrupt111)?ABSOLUTE (__AltInterrupt111):DEFINED (__Interrupt111)?ABSOLUTE (__Interrupt111):ABSOLUTE (__DefaultInterrupt) 0x0001f4 0x4 LONG 0x290 DEFINED (__AltInterrupt112)?ABSOLUTE (__AltInterrupt112):DEFINED (__Interrupt112)?ABSOLUTE (__Interrupt112):ABSOLUTE (__DefaultInterrupt) 0x0001f6 0x4 LONG 0x290 DEFINED (__AltInterrupt113)?ABSOLUTE (__AltInterrupt113):DEFINED (__Interrupt113)?ABSOLUTE (__Interrupt113):ABSOLUTE (__DefaultInterrupt) 0x0001f8 0x4 LONG 0x290 DEFINED (__AltInterrupt114)?ABSOLUTE (__AltInterrupt114):DEFINED (__Interrupt114)?ABSOLUTE (__Interrupt114):ABSOLUTE (__DefaultInterrupt) 0x0001fa 0x4 LONG 0x290 DEFINED (__AltInterrupt115)?ABSOLUTE (__AltInterrupt115):DEFINED (__Interrupt115)?ABSOLUTE (__Interrupt115):ABSOLUTE (__DefaultInterrupt) 0x0001fc 0x4 LONG 0x290 DEFINED (__AltInterrupt116)?ABSOLUTE (__AltInterrupt116):DEFINED (__Interrupt116)?ABSOLUTE (__Interrupt116):ABSOLUTE (__DefaultInterrupt) 0x0001fe 0x4 LONG 0x290 DEFINED (__AltInterrupt117)?ABSOLUTE (__AltInterrupt117):DEFINED (__Interrupt117)?ABSOLUTE (__Interrupt117):ABSOLUTE (__DefaultInterrupt) 0x0000 WREG0 = 0x0 0x0000 _WREG0 = 0x0 0x0002 WREG1 = 0x2 0x0002 _WREG1 = 0x2 0x0004 WREG2 = 0x4 0x0004 _WREG2 = 0x4 0x0006 WREG3 = 0x6 0x0006 _WREG3 = 0x6 0x0008 WREG4 = 0x8 0x0008 _WREG4 = 0x8 0x000a WREG5 = 0xa 0x000a _WREG5 = 0xa 0x000c WREG6 = 0xc 0x000c _WREG6 = 0xc 0x000e WREG7 = 0xe 0x000e _WREG7 = 0xe 0x0010 WREG8 = 0x10 0x0010 _WREG8 = 0x10 0x0012 WREG9 = 0x12 0x0012 _WREG9 = 0x12 0x0014 WREG10 = 0x14 0x0014 _WREG10 = 0x14 0x0016 WREG11 = 0x16 0x0016 _WREG11 = 0x16 0x0018 WREG12 = 0x18 0x0018 _WREG12 = 0x18 0x001a WREG13 = 0x1a 0x001a _WREG13 = 0x1a 0x001c WREG14 = 0x1c 0x001c _WREG14 = 0x1c 0x001e WREG15 = 0x1e 0x001e _WREG15 = 0x1e 0x0020 SPLIM = 0x20 0x0020 _SPLIM = 0x20 0x002e PCL = 0x2e 0x002e _PCL = 0x2e 0x0030 PCH = 0x30 0x0030 _PCH = 0x30 0x0032 TBLPAG = 0x32 0x0032 _TBLPAG = 0x32 0x0034 PSVPAG = 0x34 0x0034 _PSVPAG = 0x34 0x0036 RCOUNT = 0x36 0x0036 _RCOUNT = 0x36 0x0042 SR = 0x42 0x0042 _SR = 0x42 0x0042 _SRbits = 0x42 0x0044 CORCON = 0x44 0x0044 _CORCON = 0x44 0x0044 _CORCONbits = 0x44 0x0052 DISICNT = 0x52 0x0052 _DISICNT = 0x52 0x0060 CNEN1 = 0x60 0x0060 _CNEN1 = 0x60 0x0060 _CNEN1bits = 0x60 0x0062 CNEN2 = 0x62 0x0062 _CNEN2 = 0x62 0x0062 _CNEN2bits = 0x62 0x0068 CNPU1 = 0x68 0x0068 _CNPU1 = 0x68 0x0068 _CNPU1bits = 0x68 0x006a CNPU2 = 0x6a 0x006a _CNPU2 = 0x6a 0x006a _CNPU2bits = 0x6a 0x0080 INTCON1 = 0x80 0x0080 _INTCON1 = 0x80 0x0080 _INTCON1bits = 0x80 0x0082 INTCON2 = 0x82 0x0082 _INTCON2 = 0x82 0x0082 _INTCON2bits = 0x82 0x0084 IFS0 = 0x84 0x0084 _IFS0 = 0x84 0x0084 _IFS0bits = 0x84 0x0086 IFS1 = 0x86 0x0086 _IFS1 = 0x86 0x0086 _IFS1bits = 0x86 0x0088 IFS2 = 0x88 0x0088 _IFS2 = 0x88 0x0088 _IFS2bits = 0x88 0x008a IFS3 = 0x8a 0x008a _IFS3 = 0x8a 0x008a _IFS3bits = 0x8a 0x008c IFS4 = 0x8c 0x008c _IFS4 = 0x8c 0x008c _IFS4bits = 0x8c 0x0094 IEC0 = 0x94 0x0094 _IEC0 = 0x94 0x0094 _IEC0bits = 0x94 0x0096 IEC1 = 0x96 0x0096 _IEC1 = 0x96 0x0096 _IEC1bits = 0x96 0x0098 IEC2 = 0x98 0x0098 _IEC2 = 0x98 0x0098 _IEC2bits = 0x98 0x009a IEC3 = 0x9a 0x009a _IEC3 = 0x9a 0x009a _IEC3bits = 0x9a 0x009c IEC4 = 0x9c 0x009c _IEC4 = 0x9c 0x009c _IEC4bits = 0x9c 0x00a4 IPC0 = 0xa4 0x00a4 _IPC0 = 0xa4 0x00a4 _IPC0bits = 0xa4 0x00a6 IPC1 = 0xa6 0x00a6 _IPC1 = 0xa6 0x00a6 _IPC1bits = 0xa6 0x00a8 IPC2 = 0xa8 0x00a8 _IPC2 = 0xa8 0x00a8 _IPC2bits = 0xa8 0x00aa IPC3 = 0xaa 0x00aa _IPC3 = 0xaa 0x00aa _IPC3bits = 0xaa 0x00ac IPC4 = 0xac 0x00ac _IPC4 = 0xac 0x00ac _IPC4bits = 0xac 0x00ae IPC5 = 0xae 0x00ae _IPC5 = 0xae 0x00ae _IPC5bits = 0xae 0x00b0 IPC6 = 0xb0 0x00b0 _IPC6 = 0xb0 0x00b0 _IPC6bits = 0xb0 0x00b2 IPC7 = 0xb2 0x00b2 _IPC7 = 0xb2 0x00b2 _IPC7bits = 0xb2 0x00b4 IPC8 = 0xb4 0x00b4 _IPC8 = 0xb4 0x00b4 _IPC8bits = 0xb4 0x00b6 IPC9 = 0xb6 0x00b6 _IPC9 = 0xb6 0x00b6 _IPC9bits = 0xb6 0x00b8 IPC10 = 0xb8 0x00b8 _IPC10 = 0xb8 0x00b8 _IPC10bits = 0xb8 0x00ba IPC11 = 0xba 0x00ba _IPC11 = 0xba 0x00ba _IPC11bits = 0xba 0x00bc IPC12 = 0xbc 0x00bc _IPC12 = 0xbc 0x00bc _IPC12bits = 0xbc 0x00c2 IPC15 = 0xc2 0x00c2 _IPC15 = 0xc2 0x00c2 _IPC15bits = 0xc2 0x00c4 IPC16 = 0xc4 0x00c4 _IPC16 = 0xc4 0x00c4 _IPC16bits = 0xc4 0x00c8 IPC18 = 0xc8 0x00c8 _IPC18 = 0xc8 0x00c8 _IPC18bits = 0xc8 0x0100 TMR1 = 0x100 0x0100 _TMR1 = 0x100 0x0102 PR1 = 0x102 0x0102 _PR1 = 0x102 0x0104 T1CON = 0x104 0x0104 _T1CON = 0x104 0x0104 _T1CONbits = 0x104 0x0106 TMR2 = 0x106 0x0106 _TMR2 = 0x106 0x0108 TMR3HLD = 0x108 0x0108 _TMR3HLD = 0x108 0x010a TMR3 = 0x10a 0x010a _TMR3 = 0x10a 0x010c PR2 = 0x10c 0x010c _PR2 = 0x10c 0x010e PR3 = 0x10e 0x010e _PR3 = 0x10e 0x0110 T2CON = 0x110 0x0110 _T2CON = 0x110 0x0110 _T2CONbits = 0x110 0x0112 T3CON = 0x112 0x0112 _T3CON = 0x112 0x0112 _T3CONbits = 0x112 0x0114 TMR4 = 0x114 0x0114 _TMR4 = 0x114 0x0116 TMR5HLD = 0x116 0x0116 _TMR5HLD = 0x116 0x0118 TMR5 = 0x118 0x0118 _TMR5 = 0x118 0x011a PR4 = 0x11a 0x011a _PR4 = 0x11a 0x011c PR5 = 0x11c 0x011c _PR5 = 0x11c 0x011e T4CON = 0x11e 0x011e _T4CON = 0x11e 0x011e _T4CONbits = 0x11e 0x0120 T5CON = 0x120 0x0120 _T5CON = 0x120 0x0120 _T5CONbits = 0x120 0x0140 IC1BUF = 0x140 0x0140 _IC1BUF = 0x140 0x0142 IC1CON = 0x142 0x0142 _IC1CON = 0x142 0x0142 _IC1CONbits = 0x142 0x0144 IC2BUF = 0x144 0x0144 _IC2BUF = 0x144 0x0146 IC2CON = 0x146 0x0146 _IC2CON = 0x146 0x0146 _IC2CONbits = 0x146 0x0148 IC3BUF = 0x148 0x0148 _IC3BUF = 0x148 0x014a IC3CON = 0x14a 0x014a _IC3CON = 0x14a 0x014a _IC3CONbits = 0x14a 0x014c IC4BUF = 0x14c 0x014c _IC4BUF = 0x14c 0x014e IC4CON = 0x14e 0x014e _IC4CON = 0x14e 0x014e _IC4CONbits = 0x14e 0x0150 IC5BUF = 0x150 0x0150 _IC5BUF = 0x150 0x0152 IC5CON = 0x152 0x0152 _IC5CON = 0x152 0x0152 _IC5CONbits = 0x152 0x0180 OC1RS = 0x180 0x0180 _OC1RS = 0x180 0x0182 OC1R = 0x182 0x0182 _OC1R = 0x182 0x0184 OC1CON = 0x184 0x0184 _OC1CON = 0x184 0x0184 _OC1CONbits = 0x184 0x0186 OC2RS = 0x186 0x0186 _OC2RS = 0x186 0x0188 OC2R = 0x188 0x0188 _OC2R = 0x188 0x018a OC2CON = 0x18a 0x018a _OC2CON = 0x18a 0x018a _OC2CONbits = 0x18a 0x018c OC3RS = 0x18c 0x018c _OC3RS = 0x18c 0x018e OC3R = 0x18e 0x018e _OC3R = 0x18e 0x0190 OC3CON = 0x190 0x0190 _OC3CON = 0x190 0x0190 _OC3CONbits = 0x190 0x0192 OC4RS = 0x192 0x0192 _OC4RS = 0x192 0x0194 OC4R = 0x194 0x0194 _OC4R = 0x194 0x0196 OC4CON = 0x196 0x0196 _OC4CON = 0x196 0x0196 _OC4CONbits = 0x196 0x0198 OC5RS = 0x198 0x0198 _OC5RS = 0x198 0x019a OC5R = 0x19a 0x019a _OC5R = 0x19a 0x019c OC5CON = 0x19c 0x019c _OC5CON = 0x19c 0x019c _OC5CONbits = 0x19c 0x0200 I2C1RCV = 0x200 0x0200 _I2C1RCV = 0x200 0x0202 I2C1TRN = 0x202 0x0202 _I2C1TRN = 0x202 0x0204 I2C1BRG = 0x204 0x0204 _I2C1BRG = 0x204 0x0206 I2C1CON = 0x206 0x0206 _I2C1CON = 0x206 0x0206 _I2C1CONbits = 0x206 0x0208 I2C1STAT = 0x208 0x0208 _I2C1STAT = 0x208 0x0208 _I2C1STATbits = 0x208 0x020a I2C1ADD = 0x20a 0x020a _I2C1ADD = 0x20a 0x020c I2C1MSK = 0x20c 0x020c _I2C1MSK = 0x20c 0x0210 I2C2RCV = 0x210 0x0210 _I2C2RCV = 0x210 0x0212 I2C2TRN = 0x212 0x0212 _I2C2TRN = 0x212 0x0214 I2C2BRG = 0x214 0x0214 _I2C2BRG = 0x214 0x0216 I2C2CON = 0x216 0x0216 _I2C2CON = 0x216 0x0216 _I2C2CONbits = 0x216 0x0218 I2C2STAT = 0x218 0x0218 _I2C2STAT = 0x218 0x0218 _I2C2STATbits = 0x218 0x021a I2C2ADD = 0x21a 0x021a _I2C2ADD = 0x21a 0x021c I2C2MSK = 0x21c 0x021c _I2C2MSK = 0x21c 0x0220 U1MODE = 0x220 0x0220 _U1MODE = 0x220 0x0220 _U1MODEbits = 0x220 0x0222 U1STA = 0x222 0x0222 _U1STA = 0x222 0x0222 _U1STAbits = 0x222 0x0224 U1TXREG = 0x224 0x0224 _U1TXREG = 0x224 0x0226 U1RXREG = 0x226 0x0226 _U1RXREG = 0x226 0x0228 U1BRG = 0x228 0x0228 _U1BRG = 0x228 0x0230 U2MODE = 0x230 0x0230 _U2MODE = 0x230 0x0230 _U2MODEbits = 0x230 0x0232 U2STA = 0x232 0x0232 _U2STA = 0x232 0x0232 _U2STAbits = 0x232 0x0234 U2TXREG = 0x234 0x0234 _U2TXREG = 0x234 0x0236 U2RXREG = 0x236 0x0236 _U2RXREG = 0x236 0x0238 U2BRG = 0x238 0x0238 _U2BRG = 0x238 0x0240 SPI1STAT = 0x240 0x0240 _SPI1STAT = 0x240 0x0240 _SPI1STATbits = 0x240 0x0242 SPI1CON1 = 0x242 0x0242 _SPI1CON1 = 0x242 0x0242 _SPI1CON1bits = 0x242 0x0244 SPI1CON2 = 0x244 0x0244 _SPI1CON2 = 0x244 0x0244 _SPI1CON2bits = 0x244 0x0248 SPI1BUF = 0x248 0x0248 _SPI1BUF = 0x248 0x0260 SPI2STAT = 0x260 0x0260 _SPI2STAT = 0x260 0x0260 _SPI2STATbits = 0x260 0x0262 SPI2CON1 = 0x262 0x0262 _SPI2CON1 = 0x262 0x0262 _SPI2CON1bits = 0x262 0x0264 SPI2CON2 = 0x264 0x0264 _SPI2CON2 = 0x264 0x0264 _SPI2CON2bits = 0x264 0x0268 SPI2BUF = 0x268 0x0268 _SPI2BUF = 0x268 0x02c0 TRISA = 0x2c0 0x02c0 _TRISA = 0x2c0 0x02c0 _TRISAbits = 0x2c0 0x02c2 PORTA = 0x2c2 0x02c2 _PORTA = 0x2c2 0x02c2 _PORTAbits = 0x2c2 0x02c4 LATA = 0x2c4 0x02c4 _LATA = 0x2c4 0x02c4 _LATAbits = 0x2c4 0x02c6 ODCA = 0x2c6 0x02c6 _ODCA = 0x2c6 0x02c6 _ODCAbits = 0x2c6 0x02c8 TRISB = 0x2c8 0x02c8 _TRISB = 0x2c8 0x02c8 _TRISBbits = 0x2c8 0x02ca PORTB = 0x2ca 0x02ca _PORTB = 0x2ca 0x02ca _PORTBbits = 0x2ca 0x02cc LATB = 0x2cc 0x02cc _LATB = 0x2cc 0x02cc _LATBbits = 0x2cc 0x02ce ODCB = 0x2ce 0x02ce _ODCB = 0x2ce 0x02ce _ODCBbits = 0x2ce 0x02d0 TRISC = 0x2d0 0x02d0 _TRISC = 0x2d0 0x02d0 _TRISCbits = 0x2d0 0x02d2 PORTC = 0x2d2 0x02d2 _PORTC = 0x2d2 0x02d2 _PORTCbits = 0x2d2 0x02d4 LATC = 0x2d4 0x02d4 _LATC = 0x2d4 0x02d4 _LATCbits = 0x2d4 0x02d6 ODCC = 0x2d6 0x02d6 _ODCC = 0x2d6 0x02d6 _ODCCbits = 0x2d6 0x02fc PADCFG1 = 0x2fc 0x02fc _PADCFG1 = 0x2fc 0x02fc _PADCFG1bits = 0x2fc 0x0300 ADC1BUF0 = 0x300 0x0300 _ADC1BUF0 = 0x300 0x0302 ADC1BUF1 = 0x302 0x0302 _ADC1BUF1 = 0x302 0x0304 ADC1BUF2 = 0x304 0x0304 _ADC1BUF2 = 0x304 0x0306 ADC1BUF3 = 0x306 0x0306 _ADC1BUF3 = 0x306 0x0308 ADC1BUF4 = 0x308 0x0308 _ADC1BUF4 = 0x308 0x030a ADC1BUF5 = 0x30a 0x030a _ADC1BUF5 = 0x30a 0x030c ADC1BUF6 = 0x30c 0x030c _ADC1BUF6 = 0x30c 0x030e ADC1BUF7 = 0x30e 0x030e _ADC1BUF7 = 0x30e 0x0310 ADC1BUF8 = 0x310 0x0310 _ADC1BUF8 = 0x310 0x0312 ADC1BUF9 = 0x312 0x0312 _ADC1BUF9 = 0x312 0x0314 ADC1BUFA = 0x314 0x0314 _ADC1BUFA = 0x314 0x0316 ADC1BUFB = 0x316 0x0316 _ADC1BUFB = 0x316 0x0318 ADC1BUFC = 0x318 0x0318 _ADC1BUFC = 0x318 0x031a ADC1BUFD = 0x31a 0x031a _ADC1BUFD = 0x31a 0x031c ADC1BUFE = 0x31c 0x031c _ADC1BUFE = 0x31c 0x031e ADC1BUFF = 0x31e 0x031e _ADC1BUFF = 0x31e 0x0320 AD1CON1 = 0x320 0x0320 _AD1CON1 = 0x320 0x0320 _AD1CON1bits = 0x320 0x0322 AD1CON2 = 0x322 0x0322 _AD1CON2 = 0x322 0x0322 _AD1CON2bits = 0x322 0x0324 AD1CON3 = 0x324 0x0324 _AD1CON3 = 0x324 0x0324 _AD1CON3bits = 0x324 0x0328 AD1CHS = 0x328 0x0328 _AD1CHS = 0x328 0x0328 _AD1CHSbits = 0x328 0x032c AD1PCFG = 0x32c 0x032c _AD1PCFG = 0x32c 0x032c _AD1PCFGbits = 0x32c 0x0330 AD1CSSL = 0x330 0x0330 _AD1CSSL = 0x330 0x0330 _AD1CSSLbits = 0x330 0x0600 PMCON = 0x600 0x0600 _PMCON = 0x600 0x0600 _PMCONbits = 0x600 0x0602 PMMODE = 0x602 0x0602 _PMMODE = 0x602 0x0602 _PMMODEbits = 0x602 0x0604 PMADDR = 0x604 0x0604 _PMADDR = 0x604 0x0604 _PMADDRbits = 0x604 0x0604 PMDOUT1 = 0x604 0x0604 _PMDOUT1 = 0x604 0x0604 _PMDOUT1bits = 0x604 0x0606 PMDOUT2 = 0x606 0x0606 _PMDOUT2 = 0x606 0x0608 PMDIN1 = 0x608 0x0608 _PMDIN1 = 0x608 0x060a PMDIN2 = 0x60a 0x060a _PMDIN2 = 0x60a 0x060c PMAEN = 0x60c 0x060c _PMAEN = 0x60c 0x060c _PMAENbits = 0x60c 0x060e PMSTAT = 0x60e 0x060e _PMSTAT = 0x60e 0x060e _PMSTATbits = 0x60e 0x0620 ALRMVAL = 0x620 0x0620 _ALRMVAL = 0x620 0x0622 ALCFGRPT = 0x622 0x0622 _ALCFGRPT = 0x622 0x0622 _ALCFGRPTbits = 0x622 0x0624 RTCVAL = 0x624 0x0624 _RTCVAL = 0x624 0x0626 RCFGCAL = 0x626 0x0626 _RCFGCAL = 0x626 0x0626 _RCFGCALbits = 0x626 0x0630 CMCON = 0x630 0x0630 _CMCON = 0x630 0x0630 _CMCONbits = 0x630 0x0632 CVRCON = 0x632 0x0632 _CVRCON = 0x632 0x0632 _CVRCONbits = 0x632 0x0640 CRCCON = 0x640 0x0640 _CRCCON = 0x640 0x0640 _CRCCONbits = 0x640 0x0642 CRCXOR = 0x642 0x0642 _CRCXOR = 0x642 0x0642 _CRCXORbits = 0x642 0x0644 CRCDAT = 0x644 0x0644 _CRCDAT = 0x644 0x0646 CRCWDAT = 0x646 0x0646 _CRCWDAT = 0x646 0x0680 RPINR0 = 0x680 0x0680 _RPINR0 = 0x680 0x0680 _RPINR0bits = 0x680 0x0682 RPINR1 = 0x682 0x0682 _RPINR1 = 0x682 0x0682 _RPINR1bits = 0x682 0x0686 RPINR3 = 0x686 0x0686 _RPINR3 = 0x686 0x0686 _RPINR3bits = 0x686 0x0688 RPINR4 = 0x688 0x0688 _RPINR4 = 0x688 0x0688 _RPINR4bits = 0x688 0x068e RPINR7 = 0x68e 0x068e _RPINR7 = 0x68e 0x068e _RPINR7bits = 0x68e 0x0690 RPINR8 = 0x690 0x0690 _RPINR8 = 0x690 0x0690 _RPINR8bits = 0x690 0x0692 RPINR9 = 0x692 0x0692 _RPINR9 = 0x692 0x0692 _RPINR9bits = 0x692 0x0696 RPINR11 = 0x696 0x0696 _RPINR11 = 0x696 0x0696 _RPINR11bits = 0x696 0x06a4 RPINR18 = 0x6a4 0x06a4 _RPINR18 = 0x6a4 0x06a4 _RPINR18bits = 0x6a4 0x06a6 RPINR19 = 0x6a6 0x06a6 _RPINR19 = 0x6a6 0x06a6 _RPINR19bits = 0x6a6 0x06a8 RPINR20 = 0x6a8 0x06a8 _RPINR20 = 0x6a8 0x06a8 _RPINR20bits = 0x6a8 0x06aa RPINR21 = 0x6aa 0x06aa _RPINR21 = 0x6aa 0x06aa _RPINR21bits = 0x6aa 0x06ac RPINR22 = 0x6ac 0x06ac _RPINR22 = 0x6ac 0x06ac _RPINR22bits = 0x6ac 0x06ae RPINR23 = 0x6ae 0x06ae _RPINR23 = 0x6ae 0x06ae _RPINR23bits = 0x6ae 0x06c0 RPOR0 = 0x6c0 0x06c0 _RPOR0 = 0x6c0 0x06c0 _RPOR0bits = 0x6c0 0x06c2 RPOR1 = 0x6c2 0x06c2 _RPOR1 = 0x6c2 0x06c2 _RPOR1bits = 0x6c2 0x06c4 RPOR2 = 0x6c4 0x06c4 _RPOR2 = 0x6c4 0x06c4 _RPOR2bits = 0x6c4 0x06c6 RPOR3 = 0x6c6 0x06c6 _RPOR3 = 0x6c6 0x06c6 _RPOR3bits = 0x6c6 0x06c8 RPOR4 = 0x6c8 0x06c8 _RPOR4 = 0x6c8 0x06c8 _RPOR4bits = 0x6c8 0x06ca RPOR5 = 0x6ca 0x06ca _RPOR5 = 0x6ca 0x06ca _RPOR5bits = 0x6ca 0x06cc RPOR6 = 0x6cc 0x06cc _RPOR6 = 0x6cc 0x06cc _RPOR6bits = 0x6cc 0x06ce RPOR7 = 0x6ce 0x06ce _RPOR7 = 0x6ce 0x06ce _RPOR7bits = 0x6ce 0x06d0 RPOR8 = 0x6d0 0x06d0 _RPOR8 = 0x6d0 0x06d0 _RPOR8bits = 0x6d0 0x06d2 RPOR9 = 0x6d2 0x06d2 _RPOR9 = 0x6d2 0x06d2 _RPOR9bits = 0x6d2 0x06d4 RPOR10 = 0x6d4 0x06d4 _RPOR10 = 0x6d4 0x06d4 _RPOR10bits = 0x6d4 0x06d6 RPOR11 = 0x6d6 0x06d6 _RPOR11 = 0x6d6 0x06d6 _RPOR11bits = 0x6d6 0x06d8 RPOR12 = 0x6d8 0x06d8 _RPOR12 = 0x6d8 0x06d8 _RPOR12bits = 0x6d8 0x0740 RCON = 0x740 0x0740 _RCON = 0x740 0x0740 _RCONbits = 0x740 0x0742 OSCCON = 0x742 0x0742 _OSCCON = 0x742 0x0742 _OSCCONbits = 0x742 0x0742 OSCCONL = 0x742 0x0742 _OSCCONL = 0x742 0x0743 OSCCONH = 0x743 0x0743 _OSCCONH = 0x743 0x0744 CLKDIV = 0x744 0x0744 _CLKDIV = 0x744 0x0744 _CLKDIVbits = 0x744 0x0748 OSCTUN = 0x748 0x0748 _OSCTUN = 0x748 0x0748 _OSCTUNbits = 0x748 0x0760 NVMCON = 0x760 0x0760 _NVMCON = 0x760 0x0760 _NVMCONbits = 0x760 0x0766 NVMKEY = 0x766 0x0766 _NVMKEY = 0x766 0x0770 PMD1 = 0x770 0x0770 _PMD1 = 0x770 0x0770 _PMD1bits = 0x770 0x0772 PMD2 = 0x772 0x0772 _PMD2 = 0x772 0x0772 _PMD2bits = 0x772 0x0774 PMD3 = 0x774 0x0774 _PMD3 = 0x774 0x0774 _PMD3bits = 0x774 0x0140 IC1 = 0x140 0x0140 _IC1 = 0x140 0x0144 IC2 = 0x144 0x0144 _IC2 = 0x144 0x0148 IC3 = 0x148 0x0148 _IC3 = 0x148 0x014c IC4 = 0x14c 0x014c _IC4 = 0x14c 0x0150 IC5 = 0x150 0x0150 _IC5 = 0x150 0x0180 OC1 = 0x180 0x0180 _OC1 = 0x180 0x0186 OC2 = 0x186 0x0186 _OC2 = 0x186 0x018c OC3 = 0x18c 0x018c _OC3 = 0x18c 0x0192 OC4 = 0x192 0x0192 _OC4 = 0x192 0x0198 OC5 = 0x198 0x0198 _OC5 = 0x198 0x0240 SPI1 = 0x240 0x0240 _SPI1 = 0x240 0x0260 SPI2 = 0x260 0x0260 _SPI2 = 0x260 0x0220 UART1 = 0x220 0x0220 _UART1 = 0x220 0x0230 UART2 = 0x230 0x0230 _UART2 = 0x230 START GROUP LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libm-elf.a LOAD c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libc-elf.a END GROUP OUTPUT(dist/default/production/Lab2.X.production.elf elf32-pic30) LOAD default_isr LOAD data_init .debug_pubtypes 0x000018 0x16d .debug_pubtypes 0x000018 0x16d build/default/production/Lab2.o __c30_signature 0x000186 0x12 __c30_signature 0x000186 0x6 build/default/production/Lab2.o __c30_signature 0x00018c 0x6 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(crt0_standard.o) __c30_signature 0x000192 0x6 c:/program files/microchip/xc16/v1.11/bin/bin/../../lib\libpic30-elf.a(data_init_standard.o) .nbss 0x0800 0x2 .nbss 0x0800 0x2 build/default/production/Lab2.o 0x0800 _ADCaverage .text 0x000294 0x1c2 .text 0x000294 0x1c2 build/default/production/Lab2.o 0x000294 _main 0x0002b6 _ADCInit 0x0002ea _ADCStart 0x0002f2 _ADCAvg 0x00034a _ADC_avg_to_LEDs 0x000430 _PortInit .dinit 0x000456 0x8 .dinit 0x000456 0x8 data_init
First section/Lab2.X/Lab2.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: Lab2.c // AUTHOR: Bob Smith // DATE: 12/1/2011 // DESCRIPTION: This lab demonstrates how to configure the PIC24 ADC. // An analog voltage is applied to one of the analog input pins // via the potentiometer on the Explorer 16 evaluation board. // The ADC continuously converts this voltage to a digital value // and displays it on the LEDs. // More advanced programmers have the opportunity to configure // the ADC to interface with the on-board temp sensor. The temp // sensor value can also be displayed on the LEDs. // // The Purpose of the following code is to demonstrate how // Microchip peripherals function. It is not meant to be an // example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // Month Year Name // Comments //****************************************************************************** #define FOSC 8000000 // device clock frequency (8MHz osc on Explorer 16) #define FCY FOSC/2 // device instruction frequency //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // disable JTAG port & disable watchdog timer _CONFIG2(FNOSC_PRI & POSCMOD_HS) // initial osc = Primary HS & Primary osc = HS //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ volatile unsigned int ADCaverage; // GLOBAL int variable for Realtime watch //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void PortInit(void); void ADCInit(void); void ADCStart(void); unsigned char ADCAvg(void); void ADC_avg_to_LEDs(unsigned char x); //============================================================================== // FUNCTION: main() // DESCRIPTION: Configure pins connected to LEDs as outputs and initialize ADC. // Monitor ADC interrupt flag and display ADC results on LEDs. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { unsigned char ADC_average; // holds ADC average PortInit(); // Initialize GPIO for LEDs to 0 and configure as outputs ADCInit(); // Initialize the A/D converter ADCStart(); // Turn ADC on while(1) { while(!IFS0bits.AD1IF); // wait here untill the ADC interrupt flag bit // is set. Interrupts are disabled, but the // flag bit still works. IFS0bits.AD1IF = 0; // when the ADC interrupt flag is set, clear it ADC_average = ADCAvg(); // Take average of 16 samples ADC_avg_to_LEDs(ADC_average); //write ADC_average to the LEDs } } //============================================================================== // FUNCTION: ADCInit() // DESCRIPTION: Initialize the ADC // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void ADCInit(void) { AD1CON1bits.SSRC = 0b111; // end sample and start conversion automatically // sample time determined by SAMC bits in AD1CON3 AD1CON1bits.ASAM = 1; // sampling starts automatically after previous // conversion ends AD1CON2bits.SMPI = 0b1111;// set the ADC interrupt flag after 16 samples. // interrupts are disabled, but ADC interrupt // flag bit will still be set. AD1CON3bits.ADRC = 0; // ADC clock source is the system clock AD1CON3bits.SAMC = 0x04; // set auto-sample time to 4 TAD AD1CON3bits.ADCS = 0; // TAD = TCY = 250ns (this is the minimum TAD // setting possible given this instruction // period). TAD min per the data sheet = 75ns //########################################################################## //# Exercise 2.1: Comment out the line below. This line connects the ADC to //# the potentiometer. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## AD1CHSbits.CH0SA = 0x07; // select AN7 to convert. AN7 is connected to // the potentiometer on the Explorer 16 //########################################################################## //# Exercise 2.2: Connect the temperature sensor on the Explorer 16 to the //# ADC by selecting the appropriate channel. Pin AN6 is //# connected to temp sensor. Use the "AD1CHS" register. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### select AN6 to convert. AN6 is connected to // the temp sensor on the Explorer 16 } //============================================================================== // FUNCTION: ADCStart() // DESCRIPTION: Start the ADC by turning on the ADON bit // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void ADCStart(void) { AD1CON1bits.ADON = 1; // turn the ADC on } //============================================================================== // FUNCTION: ADCAvg() // DESCRIPTION: Average 16 ADC samples and scale result from 10 to 8 bits // PARAMETERS: none // RETURNS: ADC_average // REQUIREMENTS: none //============================================================================== unsigned char ADCAvg(void) { unsigned long int x; x = ADC1BUF0 + ADC1BUF1 + ADC1BUF2 + ADC1BUF3 + // add all 16 samples ADC1BUF4 + ADC1BUF5 + ADC1BUF6 + ADC1BUF7 + ADC1BUF8 + ADC1BUF9 + ADC1BUFA + ADC1BUFB + ADC1BUFC + ADC1BUFD + ADC1BUFE + ADC1BUFF; x /= 64; // shortcut for "x = x/64;" 64 = 256/(16*1024) // take average and scale 10-bits to 8-bits. // PIC24 compiler detects division by a power of 2 // (64 = 2^6) and will use a shift instruction instead // of division (x >>= 6 is much faster) return (unsigned char)x; // cast x as unsigned char, it will never be more // than 8 bits after dividing by 64 } //============================================================================== // FUNCTION: ADC_average_to_LEDs() // DESCRIPTION: send ADC Average to the LEDs // PARAMETERS: ADC average // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void ADC_avg_to_LEDs(unsigned char x) { LATCbits.LATC6 = (x & 0b10000000) >> 7; // bitwise & 7th bit with // ADC_average then shift to LSB // and assign that value to LED LATBbits.LATB12 = (x & 0b01000000) >> 6; LATAbits.LATA8 = (x & 0b00100000) >> 5; LATAbits.LATA9 = (x & 0b00010000) >> 4; LATBbits.LATB9 = (x & 0b00001000) >> 3; LATBbits.LATB8 = (x & 0b00000100) >> 2; LATAbits.LATA7 = (x & 0b00000010) >> 1; LATAbits.LATA10 = (x & 0b00000001); } //============================================================================== // FUNCTION: PortInit() // DESCRIPTION: Configure and initialize GPIO pins // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void PortInit(void) { LATCbits.LATC6 = 0; // value to drive on RC6 (LED D10...left side and switch S5) TRISCbits.TRISC6 = 0; //configure RC6 on PORTC as an input LATBbits.LATB12 = 0; // value to drive on RB12 (LED D9) TRISBbits.TRISB12 = 0;// configure RB12 as output LATAbits.LATA8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output LATAbits.LATA9 = 0; // value to drive on pin RA9 (LED D7 and switch S6) TRISAbits.TRISA9 = 0; // configure RA9 LATBbits.LATB9 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output LATBbits.LATB8 = 0; // value to drive on pin RB8 (LED D5) TRISBbits.TRISB8 = 0; // configure RB8 on PORTB as an output LATAbits.LATA7 = 0; // value to drive on pin RA7 (LED D4 and switch S4) TRISAbits.TRISA7 = 0; // configure RA7 LATAbits.LATA10 = 0; // value to drive on pin RA10 (LED D3...right side and switch S3) TRISAbits.TRISA10 = 0;// configure RA10 }
First section/Lab2.X/Makefile
# # 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... .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
First section/Lab2.X/nbproject/configurations.xml
Lab2.c Makefile ../../MCU3121 MPLAB 8/Lab2/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Lab2.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab2.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab2.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab2.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab2.o: Lab2.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab2.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab2.c -o ${OBJECTDIR}/Lab2.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab2.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab2" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab2.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab2.o: Lab2.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab2.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab2.c -o ${OBJECTDIR}/Lab2.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab2.o.d" -g -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab2" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab2.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab2",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab2.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab2",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab2.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab2.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Lab2.X/nbproject/Makefile-genesis.properties
# #Mon May 13 20:15:38 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Lab2.X/nbproject/Makefile-impl.mk
# # 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=Lab2.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
First section/Lab2.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Lab2.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab2.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab2.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab2.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab2.x.tar
First section/Lab2.X/nbproject/Package-default.bash
#!/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}/Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab2.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab2.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}/lab2.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/lab2.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab2.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Lab2.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Lab2.X/nbproject/private/private.properties
First section/Lab2.X/nbproject/private/private.xml
First section/Lab2.X/nbproject/project.properties
First section/Lab2.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab2 eae50ef7-efa0-4854-936c-8a4584b69588 0 c ISO-8859-1
First section/Lab3.X/core_config_bits.h
// PIC24FJ64GA004 Configuration Bit Settings #include <p24Fxxxx.h> _CONFIG2( // POSCMOD_HS & // Primary Oscillator Select (HS Oscillator mode selected) POSCMOD_NONE & // Primary Oscillator Select (Primary oscillator disabled) I2C1SEL_PRI & // I2C1 Pin Location Select (Use default SCL1/SDA1 pins) IOL1WAY_ON & // IOLOCK Protection (Once IOLOCK is set, cannot be changed) OSCIOFNC_OFF & // Primary Oscillator Output Function (OSC2/CLKO/RC15 functions as CLKO (FOSC/2)) FCKSM_CSDCMD & // Clock Switching and Monitor (Clock switching and Fail-Safe Clock Monitor are disabled) // FNOSC_PRI & // Oscillator Select (Primary Oscillator (XT, HS, EC)) FNOSC_FRCDIV & // Oscillator Select (Fast RC Oscillator with Postscaler (FRCDIV)) SOSCSEL_SOSC & // Sec Oscillator Select (Default Secondary Oscillator (SOSC)) WUTSEL_LEG & // Wake-up timer Select (Legacy Wake-up Timer) IESO_OFF // Internal External Switch Over Mode (IESO mode (Two-Speed Start-up) disabled) ); _CONFIG1( WDTPS_PS32768 & // Watchdog Timer Postscaler (1:32,768) FWPSA_PR128 & // WDT Prescaler (Prescaler ratio of 1:128) WINDIS_ON & // Watchdog Timer Window (Standard Watchdog Timer enabled,(Windowed-mode is disabled)) FWDTEN_OFF & // Watchdog Timer Enable (Watchdog Timer is disabled) ICS_PGx1 & // Comm Channel Select (Emulator EMUC1/EMUD1 pins are shared with PGC1/PGD1) GWRP_OFF & // General Code Segment Write Protect (Writes to program memory are allowed) GCP_OFF & // General Code Segment Code Protect (Code protection is disabled) JTAGEN_OFF // JTAG Port Enable (JTAG port is disabled) );
First section/Lab3.X/lab3.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: Lab3.c // AUTHOR: Vidyadhar // DATE: 6/30/2006 // DESCRIPTION: This lab uses a 32bit timer (Timer3:Timer2) to drive a stop // watch application. The timer will be configured to generate // an interrupt every tenth of a second. A function will keep // track of how many times the interrupt has occurred and will // use this information to drive the elapsed time on the // display. Switch S3 (left side) on the Explorer 16 is used // to start and stop the stopwatch. // // This code has been initially configured to use the internal // Fast RC oscillator running at 8MHz. You will change this to // use the same oscillator running at 1MHz. Changing the // oscillator clock frequency will require you to enter a new // Timer2 period value to maintain a 1/10th second tick. // // The Purpose of the following code is to demonstrate how // Microchip peripherals function. It is not meant to be an // example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // 7/2007 Brant Ivey Updated for v4.0 of class // 6/2009 Alain Sorin Added seconds for Realtime watch // 6/2011 Dave Stokes Modified for MPLAB X // 7/2011 Bob Smith Changed "mili_secs" variable name to "tenth_secs" // 12/2011 Bob Smith Converted device to PIC24FJ64GA004, moved LCD and // switch debounce code to separate files, changed // some variable and function names, added comments // and re-wrote the StopWatch function to work with new // debounce function. //****************************************************************************** //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include "lcd_driver.h" // LCD driver file header #include "lcd_app.h" // LCD application file header #include "SwitchPressed.h" // debounced switch header #include "core_config_bits.h"// core configuration bits //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // see the included header file //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ char tenth_secs = 0, seconds = 0, minutes = 0, hours = 0; char Flag = 0; //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void Timer32Init(void); void StopWatch(void); void increment_stopwatch(void); void PortInit(void); //============================================================================== // FUNCTION: main() // DESCRIPTION: Configure RC OSC, initialize LCD, Port pins, & Timer. Run the // StopWatch function. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { //########################################################################## //# Exercise 3.1: Comment out the line below. This line sets the Fast RC //# Oscillator Postscale bits to 1 (FOSC = 8MHz). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## CLKDIVbits.RCDIV = 0; // set Fast RC osc clock divider to 1 (8MHz) //########################################################################## //# Exercise 3.2: Configure the Fast RC Osc Postscaler Select bits //# (RCDIV2:RCDIV0) in the Clock Divider Register (CLKDIV) to //# divide by 8 (FOSC = 1MHz). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### set Fast RC osc clock divider to 8 (1MHz) LCDInit(); // Initialize the LCD PortInit(); // Initialize GPIO pins connected to LEDs to output 0 Timer32Init(); // Initialize the 32 bit timer //Timer2 interrupts are disabled in 32 bit mode. Use Timer3 interrupts. IFS0bits.T3IF = 0; // Clear T3 Interrupt flag IEC0bits.T3IE = 1; // Enable Timer2/3 interrupt StopWatch(); // run the stopwatch function while(1); } //============================================================================== // FUNCTION: Timer32Init() // DESCRIPTION: Initialize Timer2 and Timer3 for 32 bit mode // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void Timer32Init(void) { // Timer2 default settings: // input clock prescaler (TCKPS1:TCKPS0) = 1 to 1 // Timer2 clock source select (TCS) = internal clock (FCY = FOSC/2, FOSC = 8MHz) T2CONbits.T32 = 1; // set Timer2 and Timer3 in 32 bit mode // Timer3 now controled by T2CON (T3CON diabled) //########################################################################## //# Exercise 3.3: Comment out the PR2 and PR3 settings below. These lines //# configure the Timer2 and 3 period registers for a 10th //# second tick with FCY = 4Mhz (FOSC = 8Mhz). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## // Load the Timer2 and Timer3 period registers (PR2, PR3) with the count // such that you get a tick every 0.1s (1/10s). // Equation for PR calculation: PR = (Fosc/2) / (# Ticks per second) // Fosc = 8MHz PR3 = 0x6; // 32 bit period registers PR3:PR2 = 0x61A80 = 400,000 PR2 = 0x1A80; // there are 400,000 clock ticks in 1/10 second (FCY = 4MHz) // period register values if one second timeout is needed: // PR3 = 0x003D; // 32 bit period registers PR3:PR2 = 0x3D0900 = 4,000,000 // PR2 = 0x0900; // there are 4,000,000 clock ticks in 1 second (FCY = 4MHz) //########################################################################## //# Exercise 3.4: Configure the Timer2 and 3 period registers (PR2 and PR3) //# for a 10th second tick with FCY = 500Khz (FOSC = 1MHz). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### 32 bit period registers PR3:PR2 = 0x0C350 = 50,000 //### Your Code Here ### //### there are 50,000 clock ticks in 1/10 second (FCY = 500MHz) TMR3 = 0x0000; // clear timer registers to start counting from 0 TMR2 = 0x0000; T2CONbits.TON = 1; // turn 32 bit timer on } //============================================================================== // FUNCTION: StopWatch() // DESCRIPTION: Monitor the S3 switch and start and stop the stopwatch // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void StopWatch(void) { DisplayStart(); // Display START message to LCD while(!SwitchPressed(&PORTA,10)); // wait for switch S3 press DisplayName(); // display "Hr Mn Sc S/10" on top line while(1) { while(SwitchPressed(&PORTA,10)) // while S3 is pressed... { increment_stopwatch(); // increment stopwatch Display(hours, minutes, seconds, tenth_secs); //display stopwatch } //values on display while(!SwitchPressed(&PORTA,10)) // while S3 not pressed... { increment_stopwatch(); // continue incrementing stopwatch Display(hours, minutes, seconds, tenth_secs); } while(SwitchPressed(&PORTA,10)); // while S3 pressed, stop stopwatch while(!SwitchPressed(&PORTA,10)); // while S3 released, keep stopwatch // off and wait for press } } //============================================================================== // FUNCTION: increment_stopwatch() // DESCRIPTION: // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void increment_stopwatch(void) { if(Flag) // if flag is set.... { Flag = 0; // Clear Timer overflow flag tenth_secs += 1; // add 1 to 10ths of seconds if(tenth_secs >= 10) { seconds += 1; // add one to seconds if 10ths overflow tenth_secs = 0; // clear 10ths after adding 1 second if (seconds >= 60) // if seconds has reached 60.... { minutes +=1; // add one to minutes seconds = 0; // clear seconds if(minutes >= 60) // if minutes has reachd 60 { hours += 1; // increment hours minutes = 0; // clear minutes counter if(hours >= 99) hours = 0; } } } } } void __attribute__((interrupt, no_auto_psv)) _T3Interrupt() { IFS0bits.T3IF = 0; //Clear Timer3 interrupt flag bit Flag = 1; // set flag indicating the Timer3 interrupt occured } //============================================================================== // FUNCTION: PortInit() // DESCRIPTION: Configure and initialize GPIO pins // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void PortInit(void) { LATCbits.LATC6 = 0; // value to drive on RC6 (LED D10...left side and switch S5) TRISCbits.TRISC6 = 0; //configure RC6 on PORTC as an input LATBbits.LATB12 = 0; // value to drive on RB12 (LED D9) TRISBbits.TRISB12 = 0;// configure RB12 as output LATAbits.LATA8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output LATAbits.LATA9 = 0; // value to drive on pin RA9 (LED D7 and switch S6) TRISAbits.TRISA9 = 0; // configure RA9 LATBbits.LATB9 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output LATBbits.LATB8 = 0; // value to drive on pin RB8 (LED D5) TRISBbits.TRISB8 = 0; // configure RB8 on PORTB as an output LATAbits.LATA7 = 0; // value to drive on pin RA7 (LED D4 and switch S4) TRISAbits.TRISA7 = 0; // configure RA7 LATAbits.LATA10 = 0; // value to drive on pin RA10 (LED D3...right side and switch S3) TRISAbits.TRISA10 = 1;// configure RA10 as input for the start/stop switch }
First section/Lab3.X/lcd_app.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: lcd_app.c // AUTHOR: Vidyadhar // DATE: 6/30/2006 // DESCRIPTION: LCD application code // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE beta7.12 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // 12/2011 Bob Smith moved this LCD application code from the main file //****************************************************************************** #define FOSC 8000000 // device clock frequency (8MHz osc on Explorer 16) #define FCY FOSC/2 // device instruction frequency //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include "lcd_driver.h" //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ extern char tenth_secs, seconds, minutes, hours; char MSD, MdD, LSD; //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void Display(char hours, char minutes, char seconds, char tenth_secs); void Bin2BCD(char temp); void DisplayStart(void); void DisplayName(void); void Display(char hours, char minutes, char seconds, char tenth_secs) { LCDL2Home(); Bin2BCD(hours); LCDPut(MdD+0x30); LCDPut(LSD+0x30); LCDPut(':'); Bin2BCD(minutes); LCDPut(MdD+0x30); LCDPut(LSD+0x30); LCDPut(':'); Bin2BCD(seconds); LCDPut(MdD+0x30); LCDPut(LSD+0x30); LCDPut(':'); Bin2BCD(tenth_secs); LCDPut(LSD+0x30); } void Bin2BCD(char temp) // Receive the byte in RAM(temp) { LSD = temp; // Store the byte in LSD for (MSD = 0 ; LSD >= 100 ; LSD>=100?(LSD -= 100):LSD, MSD++ ); // Do repeated subtraction with 100 until LSD > 100, count iteration(MSD) for (MdD = 0 ; LSD >= 10 ; LSD>=10?(LSD -= 10):LSD, MdD++); // Do repeated subtraction with 10 until LSD > 10, count iteration(MdD) } void DisplayStart(void) { LCDClear(); LCDHome(); // Set cursor to Line 1 of LCD LCDPut('P'); LCDPut('r'); LCDPut('e'); LCDPut('s'); LCDPut('s'); LCDPut(' '); LCDPut('S'); LCDPut('3'); LCDPut(' '); LCDPut('-'); LCDPut(' '); LCDPut('S'); LCDPut('t'); LCDPut('a'); LCDPut('r'); LCDPut('t'); } void DisplayName(void) { LCDClear(); LCDHome(); LCDPut('H'); LCDPut('r'); LCDPut(' '); LCDPut('M'); LCDPut('n'); LCDPut(' '); LCDPut('S'); LCDPut('c'); LCDPut(' '); LCDPut('S'); LCDPut('/'); LCDPut('1'); LCDPut('0'); }
First section/Lab3.X/lcd_app.h
#include "lcd_driver.h" //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void Display(char hours, char minutes, char seconds, char tenth_secs); void Bin2BCD(char temp); void DisplayStart(void); void DisplayName(void);
First section/Lab3.X/lcd_driver.c
/***************************************************************************** * * LCD Driver for PIC24. * ***************************************************************************** * FileName: lcd_driver.c * Dependencies: * Processor: * Compiler: * Linker: * Company: Microchip Technology Incorporated * * Software License Agreement * * The software supplied herewith by Microchip Technology Incorporated * (the "Company") is intended and supplied to you, the Company's * customer, for use solely and exclusively with products manufactured * by the Company. * * The software is owned by the Company and/or its supplier, and is * protected under applicable copyright laws. All rights are reserved. * Any use in violation of the foregoing restrictions may subject the * user to criminal sanctions under applicable laws, as well as to * civil liability for the breach of the terms and conditions of this * license. * * THIS SOFTWARE IS PROVIDED IN AN "AS IS" CONDITION. NO WARRANTIES, * WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED * TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. THE COMPANY SHALL NOT, * IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL OR * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER. * * A simple LCD driver for LCDs interface through the PMP * * Author Date Comment *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Vidyadhar 30/June/06 ... * Brant Ivey 7/ 3/2007 Updated for v4.0 of class * Stu Chandler 12/20/2008 Updated timing for TRULY 3.3V LCD * Bob Smith 12/20/2011 Updated to remove compiler warnings *****************************************************************************/ #include <p24fxxxx.h> // Constants for LCD Delay routines. // Define Fosc for Fast RC Oscillator (FRC) or Primary XT Oscillator (XT) // Delay loop is 1uS = 4 Tcy = 8 Tosc #define Fosc 8000000 // FRC Fosc = 8MHz // Define a fast instruction execution time in terms of loop time #define LCD_F_INSTR (unsigned int)(Fosc/160000) // 50uS // Define a slow instruction execution time in terms of loop time #define LCD_S_INSTR (unsigned int)(Fosc/4000) // 2mS // Define the startup time for the LCD in terms of loop time #define LCD_STARTUP (unsigned int)(Fosc/160) // 50mS //Function Prototypes void LCDHome(void); void LCDL1Home(void); void LCDL2Home(void); void LCDClear(void); void LCDPut(char A); void Wait(unsigned int B); unsigned int _uLCDloops; void LCDInit(void) { PMMODE = 0x3FF; PMCON = 0x8303; PMAEN = 0x0001; _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_F_INSTR; PMDIN1 = 0b00111000; // Set the default function Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_F_INSTR; PMDIN1 = 0b00001100; Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_S_INSTR; PMDIN1 = 0b00000001; // Clear the display Wait(_uLCDloops); _uLCDloops = LCD_STARTUP; Wait(_uLCDloops); _uLCDloops = LCD_S_INSTR; PMDIN1 = 0b00000110; // Set the entry mode Wait(_uLCDloops); LCDClear(); LCDHome(); } void LCDHome(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b00000010; while(_uLCDloops) _uLCDloops--; } void LCDL1Home(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b10000000; while(_uLCDloops) _uLCDloops--; } void LCDL2Home(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b11000000; while(_uLCDloops) _uLCDloops--; } void LCDClear(void) { _uLCDloops = LCD_S_INSTR; PMADDR = 0x0000; PMDIN1 = 0b00000001; while(_uLCDloops) _uLCDloops--; } void LCDPut(char A) { _uLCDloops = LCD_F_INSTR; PMADDR = 0x0001; PMDIN1 = A; while(_uLCDloops) _uLCDloops--; Nop(); Nop(); Nop(); Nop(); } void Wait(unsigned int B) { while(B) B--; }
First section/Lab3.X/lcd_driver.h
// Function Prototypes void LCDInit(void); void LCDHome(void); void LCDL1Home(void); void LCDL2Home(void); void LCDClear(void); void LCDPut(char A); void Wait(unsigned int B);
First section/Lab3.X/Makefile
# # 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... .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
First section/Lab3.X/nbproject/configurations.xml
core_config_bits.h lcd_app.h lcd_driver.h SwitchPressed.h lab3.c lcd_app.c lcd_driver.c SwitchPressed.c Makefile ../ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Lab3.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/lab3.o ${OBJECTDIR}/lcd_app.o ${OBJECTDIR}/lcd_driver.o ${OBJECTDIR}/SwitchPressed.o POSSIBLE_DEPFILES=${OBJECTDIR}/lab3.o.d ${OBJECTDIR}/lcd_app.o.d ${OBJECTDIR}/lcd_driver.o.d ${OBJECTDIR}/SwitchPressed.o.d # Object Files OBJECTFILES=${OBJECTDIR}/lab3.o ${OBJECTDIR}/lcd_app.o ${OBJECTDIR}/lcd_driver.o ${OBJECTDIR}/SwitchPressed.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/lab3.o: lab3.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lab3.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lab3.c -o ${OBJECTDIR}/lab3.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lab3.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lab3.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd_app.o: lcd_app.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd_app.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd_app.c -o ${OBJECTDIR}/lcd_app.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd_app.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd_app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd_driver.o: lcd_driver.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd_driver.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd_driver.c -o ${OBJECTDIR}/lcd_driver.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd_driver.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd_driver.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/SwitchPressed.o: SwitchPressed.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/SwitchPressed.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) SwitchPressed.c -o ${OBJECTDIR}/SwitchPressed.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/SwitchPressed.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/SwitchPressed.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/lab3.o: lab3.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lab3.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lab3.c -o ${OBJECTDIR}/lab3.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lab3.o.d" -g -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lab3.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd_app.o: lcd_app.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd_app.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd_app.c -o ${OBJECTDIR}/lcd_app.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd_app.o.d" -g -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd_app.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/lcd_driver.o: lcd_driver.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/lcd_driver.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) lcd_driver.c -o ${OBJECTDIR}/lcd_driver.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/lcd_driver.o.d" -g -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/lcd_driver.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ ${OBJECTDIR}/SwitchPressed.o: SwitchPressed.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/SwitchPressed.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) SwitchPressed.c -o ${OBJECTDIR}/SwitchPressed.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/SwitchPressed.o.d" -g -omf=elf -O0 -I".." -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/SwitchPressed.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="..",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab3.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="..",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab3.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab3.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Lab3.X/nbproject/Makefile-genesis.properties
# #Mon May 13 20:19:33 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Lab3.X/nbproject/Makefile-impl.mk
# # 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=Lab3.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
First section/Lab3.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Lab3.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab3.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab3.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab3.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab3.x.tar
First section/Lab3.X/nbproject/Package-default.bash
#!/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}/Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab3.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab3.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}/lab3.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/lab3.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab3.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Lab3.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Lab3.X/nbproject/private/private.properties
First section/Lab3.X/nbproject/private/private.xml
First section/Lab3.X/nbproject/project.properties
First section/Lab3.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab3 70423759-5325-43a2-b6b5-72f63d1f874c 0 c h ISO-8859-1
First section/Lab3.X/SwitchPressed.c
#include "SwitchPressed.h" //****************************************************************************** // FUNCTION: SwitchPressed() // INPUTS: *sw = Pointer to I/O port register that is connected // to switch (e.g. &PORTD) // bit = bit number in port that is connected to switch // OUTPUTS: TRUE (1) if switch is closed/pressed // FALSE (0) if switch is open // DESCRIPTION: Tests to see if a switch is pressed. The routine // will debounce the switch press to ensure that it // really is pressed. "count" will increment if switch is pressed // and decrement if not pressed. Define debounce delay time and // oscillator frequency in SwitchPressed.h // AUTHOR: Rob Ostapiuk // DATE: 24 JAN 2008 // REVISIONS: 24 JAN 2008 - Initial Version // 15 JUN 2008 - Modified to use a pointer like builtins // 06 Dec 2011 - Bob Smith - added debounce delay time macros, // optimized while loop and added comments //****************************************************************************** unsigned SwitchPressed(volatile unsigned int *sw, unsigned bit) { unsigned int count = SWITCH_READ_COUNT; // SWITCH_READ_COUNT = # of switch // reads to implement debounce delay while(1) { if (!(*sw & (1 << bit)))// read the value on the switch { // Explorer 16 push buttons = "0" when pressed count++; // if switch is pressed, increment count if (count > MAX_COUNT) // if MAX_COUNT is reached... { return 1; // return true and stop reading switch } } else { count--; // if switch is not pressed, decrement count if (count < MIN_COUNT) // if MIN_COUNT is reached... { return 0; // return faulse and stop reading switch } } } }
First section/Lab3.X/SwitchPressed.h
// Constant Definitions #define FOSC 8000000 // oscillator frequency #define FCY FOSC/2 // instruction frequency #define DEBOUNCE_TIME_MS 10 // define debounce time in ms // #TCY_DEBOUNCE_CYCLES = # of instruction cycles needed to implement debounce time #define TCY_DEBOUNCE_CYCLES (FCY/1000)*DEBOUNCE_TIME_MS // number of switch reads needed to implement debounce time // it takes 12 or 13 instruction cycles to read switch and inc or dec the count #define SWITCH_READ_COUNT TCY_DEBOUNCE_CYCLES/13 #define MAX_COUNT SWITCH_READ_COUNT*2 #define MIN_COUNT 1 #include <p24Fxxxx.h> // Function Prototypes unsigned SwitchPressed(volatile unsigned int *sw, unsigned bit);
First section/Lab4.X/Lab4.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: Lab4.c // AUTHOR: Bob Smith // DATE: 12/1/2011 // DESCRIPTION: // This lab demonstrates how to configure the PIC24 Output // Compare peripheral in PWM mode. Timer2 is configured to // supply a 1Hz period for the PWM waveform. The duty cycle // register is configured to provide a 50% duty cycle. The // Output Compare pin has been mapped (using PPS) to connect to // the left-most LED on the Explorer 16 evaluation board // (LED #D10). // The PWM signal driving the LED will turn the LED on for half // a second and turn it off for half a second. The PWM duty // cycle can be modified by changing the PWM duty cycle register // (OC1RS). The period will stay fixed at 1 second but the LED // on/off time will change. // Follow the instructions to modify the PWM waveform to dim the // LED instead of blinking. // // The Purpose of the following code is to demonstrate how // Microchip peripherals function. It is not meant to be an // example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: Try modifying the code to dim the LED instead of blinking it. // A period > 60Hz should eliminate LED flickering. Change the // duty cycle to vary the brightness. // // REVISION HISTORY: // Month Year Name // Comments //****************************************************************************** //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // ### configure _CONFIG1 _CONFIG2(FNOSC_PRI & POSCMOD_HS) // ### configure _CONFIG2 //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ #define FOSC 8000000 //define input clock rate #define FCY FOSC/2 //define instruction clock rate //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void PortInit(void); // Configure and initialize GPIO pins driving LEDs void unlockIO(void); // Unlock sequence for PPS RPn configuration void IOMap(void); // Assign PPS RPn pins to input/output functions void lockIO(void); // Lock sequence for PPS RPn configuration void Timer2Init(void); // Configure Timer2 to create 1 second period void OCInit(void); // Configure Output Compare in PWM mode & set duty cycle //============================================================================== // FUNCTION: main() // DESCRIPTION: Drive an LED with a PWM signal. PWM period = 1 second. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { PortInit(); // Initialize Switch and LED I/O IOMap(); // Configure the remappable I/O pins OCInit(); // Initialize OC for PWM mode while (1); } //============================================================================== // FUNCTION: OCInit() // DESCRIPTION: Configure Output Compare for PWM mode and set duty cycle // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void OCInit(void) { OC1CONbits.OCTSEL = 0; // Set Output Compare Timer Select for Timer2 OC1CONbits.OCM = 0b110; // Configure OC for PWM mode with fault disabled Timer2Init(); // Initialize Timer2 //########################################################################## //# Exercise 4.1: Comment out the line below. This line sets the duty cycle //# to about 50% with FCY = 4MHz, Timer2 prescale = 64 and //# Timer2 period = 1 second. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## OC1RS = 0x8000; // Set PWM duty cycle to 50% //########################################################################## //# Exercise 4.2: Modify the PWM duty cycle to dim the LED. //# 100% duty cycle is max brightness, 0% duty cycle is off. //# Make sure duty cycle is less than or equal to period (PR2). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### Scale duty cycle to accomodate shorter } //period and change LED brightness //============================================================================== // FUNCTION: Timer2Init() // DESCRIPTION: Configure Timer2 to create 1 second period // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void Timer2Init(void) { T2CONbits.TCKPS = 0b10; // The instruction clock drives Timer2 by default. // TCKPS prescales the instruction frequency (FCY) // by 64. //########################################################################## //# Exercise 4.3: Comment out the line below. This line sets the Timer2 //# period register to 1 second given a Timer2 prescale of 64. // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## PR2 = FCY/64; //### Set Timer2 period register equal to value of // Timer2 after one second. (Timer2 period = 1 sec) //########################################################################## //# Exercise 4.4: Change PWM period to eliminate LED flicker using Timer2 //# period register PR2 (period > 60 Hz). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //### Set Timer2 period to > 60 cycles/second T2CONbits.TON = 1; // Turn on Timer2 } //============================================================================== // FUNCTION: PortInit() // DESCRIPTION: Configure and initialize GPIO pins driving LEDs // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void PortInit(void) { LATBbits.LATB12 = 1; // value to drive on RB12 (LED D9..beside PWM'ed LED) TRISBbits.TRISB12 = 0; // configure RB12 as output LATAbits.LATA8 = 0; // value to drive on pin RA8 (LED D8) TRISAbits.TRISA8 = 0; // configure RA8 as output LATAbits.LATA9 = 0; // value to drive on pin RA9 (LED D7) TRISAbits.TRISA9 = 0; // configure RA9 as output LATBbits.LATB9 = 0; // value to drive on pin RB9 (LED D6) TRISBbits.TRISB9 = 0; // configure RB9 as output LATBbits.LATB8 = 0; // value to drive on pin RB8 (LED D5) TRISBbits.TRISB8 = 0; // configure RB8 as output LATAbits.LATA7 = 0; // value to drive on pin RA7 (LED D4) TRISAbits.TRISA7 = 0; // configure RA7 as output LATAbits.LATA10 = 0; // value to drive on pin RA10 (LED D3...right side) TRISAbits.TRISA10 = 0; // configure RA10 as output } //============================================================================== // FUNCTION: IOMap() // DESCRIPTION: Assign PPS RPn pins to input/output functions // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void IOMap(void) { unlockIO(); // Unlock Peripheral Pin Select configuration RPOR11bits.RP22R = 18; // Map Output Compare pin (OC1) to RP22 lockIO(); // Lock Peripheral Pin Select configuration } //============================================================================== // FUNCTION: lockIO() // DESCRIPTION: This executes the necessary process to set the IOLOCK bit to // prevent I/O mapping from being modified. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void lockIO(void) { asm volatile ("mov #OSCCON,w1 \n" "mov #0x46, w2 \n" "mov #0x57, w3 \n" "mov.b w2,[w1] \n" "mov.b w3,[w1] \n" "bset OSCCON, #6":: : "w1", "w2", "w3"); } //============================================================================== // FUNCTION: unlockIO() // DESCRIPTION: This executes the necessary process to clear the IOLOCK bit to // allow I/O mapping to be modified. // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void unlockIO(void) { asm volatile ("mov #OSCCON,w1 \n" "mov #0x46, w2 \n" "mov #0x57, w3 \n" "mov.b w2,[w1] \n" "mov.b w3,[w1] \n" "bclr OSCCON, #6":: : "w1", "w2", "w3"); }
First section/Lab4.X/Makefile
# # 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... .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
First section/Lab4.X/nbproject/configurations.xml
Lab4.c Makefile ../../MCU3121 MPLAB 8/Lab4/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Lab4.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab4.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab4.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab4.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab4.o: Lab4.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab4.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab4.c -o ${OBJECTDIR}/Lab4.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab4.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab4" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab4.o: Lab4.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab4.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab4.c -o ${OBJECTDIR}/Lab4.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab4.o.d" -g -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab4" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab4.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab4",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab4.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab4",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab4.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab4.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Lab4.X/nbproject/Makefile-genesis.properties
# #Mon May 13 20:24:37 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Lab4.X/nbproject/Makefile-impl.mk
# # 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=Lab4.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
First section/Lab4.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Lab4.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab4.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab4.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab4.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab4.x.tar
First section/Lab4.X/nbproject/Package-default.bash
#!/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}/Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab4.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab4.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}/lab4.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/lab4.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab4.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Lab4.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Lab4.X/nbproject/private/private.properties
First section/Lab4.X/nbproject/private/private.xml
First section/Lab4.X/nbproject/project.properties
First section/Lab4.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab4 21c3651f-7ee7-4ce6-8826-66334ad2653a 0 c ISO-8859-1
First section/Lab5.X/Lab5.c
//****************************************************************************** // CLASS: MCU3121 - 16-bit Standard Peripheral Configuration // PROGRAM: Lab5.c // AUTHOR: Bob Smith // DATE: 12/10/2011 // DESCRIPTION: This lab will transmit and receive characters and strings // over the UART. You are responsible for configuring the UART // for 8 bit asynchronous operation with a Baud Rate of 9600. // // Example code that transmits the characters and strings is // provided. The character and string are defined in the // "Variable Declarations" section near the top of the program. // Feel free to change these. // // Example code for receiving characters is also provided. // Typing a character in the Proteus Virtual Terminal, Tera // Term or HyperTerm windows will send a character to the PIC24. // The PIC24 will add one to the ASCII value received, and then // transmit this new character back to the terminal. In other // words, if you transmit the letter "c" to the PIC, the PIC // will turn the "c" into a "d" and send it back to the terminal. // // Using the UART2 Status and Control Register (U2STA), // configure UART2 to interrupt after 4 characters have been // received (default is every character). The interrupt service // routine (ISR) will echo all 4 characters without being // modified. // // COM Port Configuration: // Bits Per Second: 9600 // Data Bits: 8 // Parity: None // Stop Bits: 1 // Flow control: None // // An RS232 to USB converter cable will also be needed to // connect the PC to the PICDEM2PLUS board. // // The Purpose of the following code is to demonstrate how // Microchip peripherals function. It is not meant to be an // example of robust, fault tollerant code. // // REQUIREMENTS: hardware: PIC24FJ64GA004 PIM on Explorer 16 eval board // MPLAB X IDE v1.0 or MPLAB v8.73 // MPLAB C Compiler for PIC24 v3.30b (free) // NOTES: // // REVISION HISTORY: // month/year name comments // //****************************************************************************** #define FOSC 8000000 // device clock frequency (8MHz osc on Explorer 16) #define FCY FOSC/2 // device instruction frequency #define BAUDRATE 9600 #define round(x) (int)(((float)(x))>0?(float)(x)+0.5:(float)(x)-0.5) #define BRGVAL round((FCY/BAUDRATE/(float)16)-1) //------------------------------------------------------------------------------ // HEADER FILES //------------------------------------------------------------------------------ //#include <p24FJ64GA004.h> // device specific header file #include <p24fxxxx.h> // generic header file for PIC24F that includes // appropriate device specific header file based on // device selected in project properties #include<stdio.h> // required for printf function #include<pps.h> // peripheral library file for PPS functions #include <libpic30.h> // needed for "__C30_UART" library function //------------------------------------------------------------------------------ // CORE CONFIGURATION BITS //------------------------------------------------------------------------------ // Core Configuration bits are left in their default state (per the data sheet) // with the exception of the following bits: _CONFIG1(JTAGEN_OFF & FWDTEN_OFF) // disable JTAG port & disable watchdog timer _CONFIG2(FNOSC_PRI & POSCMOD_HS) // initial osc = Primary HS & Primary osc = HS //------------------------------------------------------------------------------ // PROGRAM CONSTANTS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // TYPE DEFINITIONS //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ // GLOBAL VARIABLE DECLARATIONS //------------------------------------------------------------------------------ unsigned char str[] = "String sent with putStrU2()"; unsigned char letter = 'M'; //------------------------------------------------------------------------------ // FUNCTION PROTOTYPES //------------------------------------------------------------------------------ void initUART2(void); void putCharU2(unsigned char TransmitChar); void putStrU2(unsigned const char *s); void IOMap(void); //============================================================================== // FUNCTION: main() // DESCRIPTION: Initializes UART2 then sends a char, and two strings to UART2 // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== int main(void) { IOMap(); // Connect UART I/O to PPS pins initUART2(); // initialize the UART IFS1bits.U2RXIF = 0; // Clear U2RX_Int flag IEC1bits.U2RXIE = 1; // Enable Uart2 RX Interrupts LATAbits.LATA10 = 1; // value to drive on pin RA10 (LED D3...right side) TRISAbits.TRISA10 = 0; // configure RA10 as output putCharU2(letter); // Send a character out UART2 putStrU2(str); // send a string out UART2 __C30_UART=2; // assiciates printf with UART2 (default is UART1) printf("String sent with printf\n\r"); // Send string out UART2 with printf while(1); // wait to receive characters on UART2 (UART ISR will prosess) } //============================================================================== // FUNCTION: _U2RXInterrupt() // DESCRIPTION: UART2 Interrupt Service Routine (ISR) // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void __attribute__((interrupt, shadow, no_auto_psv)) _U2RXInterrupt() { IFS1bits.U2RXIF = 0; // clear UART2 interrupt flag while(!U2STAbits.TRMT); // wait for UART2 transmit register to empty if(!U2STAbits.URXISEL1) // if interupt generated with every character { U2TXREG = U2RXREG + 1; // add one to the ASCII value of the received // character then transmit on UART2. If 'a' is // received, 'b' will be transmitted. __builtin_btg((unsigned int*)&LATA,10); // Toggle LED D3 every time the } // UART2 ISR runs else // if interupt generated every 3 or 4 characters // This will buffer 3 or 4 received characters before // transfering (echoing) them all. { while(U2STAbits.URXDA) // loop while receive buffer still has data { while(U2STAbits.UTXBF); // wait if TX buffer is full U2TXREG = U2RXREG; // echo each received character } } } //============================================================================== // FUNCTION: initUART2() // DESCRIPTION: Initialize UART2 with baud rate of 9600 // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void initUART2(void) { // Set the Baud Rate to 9600 with U2BRG register: // 1) Given a standard speed UART, the formula for calculating // Baud Rate is Baud Rate = FCY/(16(UxBRG+1)) // 2) Solving the equation above with Fosc = 8MHz, U2BRGH = 12 (0x0C) // 3) The BRGVAL macro has been provided to calculate the number for // U2BRGH given FCY and the baud rate. U2BRG = BRGVAL; // Set Baud Rate to the value calculated by the // BRGVAL macro defined above U2MODEbits.UARTEN = 1; // enable UART U2STAbits.UTXEN = 1; // enable UART TX //########################################################################## //# Exercise 5.1: Configure the UART2 to interrupt after 4 characters have //# been received (default is every character). Use the //# UART2 Status and Control Register (U2STA). // If you are having trouble look here : http://www.microchip.com/forums/f277.aspx //########################################################################## //### Your Code Here ### //###interrupt after 4 characters received } //============================================================================== // FUNCTION: putCharU2() // DESCRIPTION: transmit a character on UART2 // PARAMETERS: char to be transmitted // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void putCharU2(unsigned char transmitChar) { while(!U2STAbits.TRMT); //loop until Tx shift register is empty U2TXREG = transmitChar; while(!U2STAbits.TRMT); // Wait for transmitter to send previous character // The UART sets this bit when the buffer is full // and clears this bit when the buffer is empty U2TXREG = '\n'; // send "newline" character while(!U2STAbits.TRMT); // Wait for transmitter to send previous character U2TXREG = '\r'; // send "carriage return" character } //============================================================================== // FUNCTION: putStrU2() // DESCRIPTION: transmit a string on UART2 // PARAMETERS: pinter to a string // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void putStrU2(unsigned const char *s) { while(*s) // stop transmitting when end of string { // (null character) found while (!U2STAbits.TRMT); // Wait for transmitter to send previous // character. The UART sets this bit when // the buffer is full and clears this bit when // the buffer is empty. U2TXREG = (*s++); // Send the next character of the string to the UART } while(!U2STAbits.TRMT); // Wait for transmitter to send previous character U2TXREG = '\n'; // send "newline" character while(!U2STAbits.TRMT); // Wait for transmitter to send previous character U2TXREG = '\r'; // send "carriage return" character } //============================================================================== // FUNCTION: IOMap() // DESCRIPTION: Assign PPS RPn pins to input/output functions // PARAMETERS: none // RETURNS: nothing // REQUIREMENTS: none //============================================================================== void IOMap(void) { PPSUnLock; // Unlock Peripheral Pin Select configuration RPINR19bits.U2RXR = 19; // Map RP19 pin to input function U2RX RPOR12bits.RP25R = 5; // Map Output Function U2TX to RP25 PPSLock; // Lock Peripheral Pin Select configuration }
First section/Lab5.X/Makefile
# # 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... .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
First section/Lab5.X/nbproject/configurations.xml
Lab5.c Makefile ../../MCU3121 MPLAB 8/Lab5/ Makefile localhost PIC24FJ64GA004 ICD3PlatformTool XC16 1.11 3 false false false false false false
First section/Lab5.X/nbproject/Makefile-default.mk
# # Generated Makefile - do not edit! # # Edit the Makefile in the project folder instead (../Makefile). Each target # has a -pre and a -post target defined where you can add customized code. # # This makefile implements configuration specific macros and targets. # Include project Makefile ifeq "${IGNORE_LOCAL}" "TRUE" # do not include local makefile. User is passing all local related variables already else include Makefile # Include makefile containing local settings ifeq "$(wildcard nbproject/Makefile-local-default.mk)" "nbproject/Makefile-local-default.mk" include nbproject/Makefile-local-default.mk endif endif # Environment MKDIR=gnumkdir -p RM=rm -f MV=mv CP=cp # Macros CND_CONF=default ifeq ($(TYPE_IMAGE), DEBUG_RUN) IMAGE_TYPE=debug OUTPUT_SUFFIX=elf DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} else IMAGE_TYPE=production OUTPUT_SUFFIX=hex DEBUGGABLE_SUFFIX=elf FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} endif # Object Directory OBJECTDIR=build/${CND_CONF}/${IMAGE_TYPE} # Distribution Directory DISTDIR=dist/${CND_CONF}/${IMAGE_TYPE} # Object Files Quoted if spaced OBJECTFILES_QUOTED_IF_SPACED=${OBJECTDIR}/Lab5.o POSSIBLE_DEPFILES=${OBJECTDIR}/Lab5.o.d # Object Files OBJECTFILES=${OBJECTDIR}/Lab5.o CFLAGS= ASFLAGS= LDLIBSOPTIONS= ############# Tool locations ########################################## # If you copy a project from one host to another, the path where the # # compiler is installed may be different. # # If you open this project with MPLAB X in the new host, this # # makefile will be regenerated and the paths will be corrected. # ####################################################################### # fixDeps replaces a bunch of sed/cat/printf statements that slow down the build FIXDEPS=fixDeps .build-conf: ${BUILD_SUBPROJECTS} ${MAKE} ${MAKE_OPTIONS} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} MP_PROCESSOR_OPTION=24FJ64GA004 MP_LINKER_FILE_OPTION=,--script=p24FJ64GA004.gld # ------------------------------------------------------------------------------------ # Rules for buildStep: compile ifeq ($(TYPE_IMAGE), DEBUG_RUN) ${OBJECTDIR}/Lab5.o: Lab5.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab5.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab5.c -o ${OBJECTDIR}/Lab5.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab5.o.d" -g -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab5" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ else ${OBJECTDIR}/Lab5.o: Lab5.c nbproject/Makefile-${CND_CONF}.mk @${MKDIR} ${OBJECTDIR} @${RM} ${OBJECTDIR}/Lab5.o.d ${MP_CC} $(MP_EXTRA_CC_PRE) Lab5.c -o ${OBJECTDIR}/Lab5.o -c -mcpu=$(MP_PROCESSOR_OPTION) -MMD -MF "${OBJECTDIR}/Lab5.o.d" -g -omf=elf -O0 -I"../../MCU3121 MPLAB 8/Lab5" -msmart-io=1 -Wall -msfr-warn=off @${FIXDEPS} "${OBJECTDIR}/Lab5.o.d" $(SILENT) -rsi ${MP_CC_DIR}../ endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemble ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: assemblePreproc ifeq ($(TYPE_IMAGE), DEBUG_RUN) else endif # ------------------------------------------------------------------------------------ # Rules for buildStep: link ifeq ($(TYPE_IMAGE), DEBUG_RUN) dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,--defsym=__ICD2RAM=1,--defsym=__MPLAB_DEBUG=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab5",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab5.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) else dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX}: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE} ${MP_CC} $(MP_EXTRA_LD_PRE) -o dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} ${OBJECTFILES_QUOTED_IF_SPACED} -mcpu=$(MP_PROCESSOR_OPTION) -omf=elf -Wl,--defsym=__MPLAB_BUILD=1,$(MP_LINKER_FILE_OPTION),--check-sections,--data-init,--pack-data,--handles,--isr,--no-gc-sections,--fill-upper=0,--stackguard=16,--library-path="../../MCU3121 MPLAB 8/Lab5",--no-force-link,--smart-io,-Map="${DISTDIR}/Lab5.X.${IMAGE_TYPE}.map",--report-mem$(MP_EXTRA_LD_POST) ${MP_CC_DIR}\\xc16-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/Lab5.X.${IMAGE_TYPE}.${DEBUGGABLE_SUFFIX} -a -omf=elf endif # Subprojects .build-subprojects: # Subprojects .clean-subprojects: # Clean Targets .clean-conf: ${CLEAN_SUBPROJECTS} ${RM} -r build/default ${RM} -r dist/default # Enable dependency checking .dep.inc: .depcheck-impl DEPFILES=$(shell mplabwildcard ${POSSIBLE_DEPFILES}) ifneq (${DEPFILES},) include ${DEPFILES} endif
First section/Lab5.X/nbproject/Makefile-genesis.properties
# #Mon May 13 20:35:55 EDT 2013 default.com-microchip-mplab-nbide-toolchainXC16-XC16LanguageToolchain.md5=654ec2e9d4aec452652bf33d59c2beac default.languagetoolchain.dir=C\:\\Program Files\\Microchip\\xc16\\v1.11\\bin com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=8fe1589514540343a5279c082104bce0 default.languagetoolchain.version=1.11 host.platform=windows conf.ids=default
First section/Lab5.X/nbproject/Makefile-impl.mk
# # 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=Lab5.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
First section/Lab5.X/nbproject/Makefile-local-default.mk
# # Generated Makefile - do not edit! # # # This file contains information about the location of compilers and other tools. # If you commmit this file into your revision control server, you will be able to # to checkout the project and build it from the command line with make. However, # if more than one person works on the same project, then this file might show # conflicts since different users are bound to have compilers in different places. # In that case you might choose to not commit this file and let MPLAB X recreate this file # for each user. The disadvantage of not commiting this file is that you must run MPLAB X at # least once so the file gets created and the project can be built. Finally, you can also # avoid using this file at all if you are only building from the command line with make. # You can invoke make with the values of the macros: # $ makeMP_CC="/opt/microchip/mplabc30/v3.30c/bin/pic30-gcc" ... # SHELL=cmd.exe PATH_TO_IDE_BIN=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/ # Adding MPLAB X bin directory to path. PATH:=C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/:$(PATH) # Path to java used to run MPLAB X when this makefile was created MP_JAVA_PATH="C:\Program Files\Microchip\MPLABX\sys\java\jre1.7.0_17/bin/" OS_CURRENT="$(shell uname -s)" MP_CC="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-gcc.exe" # MP_CPPC is not defined # MP_BC is not defined # MP_AS is not defined # MP_LD is not defined MP_AR="C:\Program Files\Microchip\xc16\v1.11\bin\xc16-ar.exe" DEP_GEN=${MP_JAVA_PATH}java -jar "C:/Program Files/Microchip/MPLABX/mplab_ide/mplab_ide/modules/../../bin/extractobjectdependencies.jar" MP_CC_DIR="C:\Program Files\Microchip\xc16\v1.11\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="C:\Program Files\Microchip\xc16\v1.11\bin" # MP_BC_DIR is not defined
First section/Lab5.X/nbproject/Makefile-variables.mk
# # Generated - do not edit! # # NOCDDL # CND_BASEDIR=`pwd` # default configuration CND_ARTIFACT_DIR_default=dist/default/production CND_ARTIFACT_NAME_default=Lab5.X.production.hex CND_ARTIFACT_PATH_default=dist/default/production/Lab5.X.production.hex CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package CND_PACKAGE_NAME_default=lab5.x.tar CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/lab5.x.tar
First section/Lab5.X/nbproject/Package-default.bash
#!/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}/Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} OUTPUT_BASENAME=Lab5.X.${IMAGE_TYPE}.${OUTPUT_SUFFIX} PACKAGE_TOP_DIR=lab5.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}/lab5.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/lab5.x.tar cd ${TMPDIR} tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/lab5.x.tar * checkReturnCode # Cleanup cd "${TOP}" rm -rf ${TMPDIR}
First section/Lab5.X/nbproject/private/configurations.xml
Makefile 0 :=MPLABCommUSB:=04D8:=9009:=0100:=Microchip Technology, Inc. (www.microchip.com):=MPLAB ICD3 tm (www.microchip.com):=JIT100739940:=x:=en C:\Program Files\Microchip\xc16\v1.11\bin place holder 1 place holder 2 true 0 0 0
First section/Lab5.X/nbproject/private/private.properties
First section/Lab5.X/nbproject/private/private.xml
First section/Lab5.X/nbproject/project.properties
First section/Lab5.X/nbproject/project.xml
com.microchip.mplab.nbide.embedded.makeproject Lab5 89a5ab51-8766-44a1-aa50-56d3baea9aec 0 c ISO-8859-1
First section/Literature/DS PIC24FJ128GA010 Data Sheet (39747F) .pdf.url
[InternetShortcut] URL=http://ww1.microchip.com/downloads/en/DeviceDoc/39747F.pdf IDList= HotKey=0 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2
First section/Literature/DS PIC24FJ64GA004 Data Sheet (39881D).pdf.url
[InternetShortcut] URL=http://ww1.microchip.com/downloads/en/devicedoc/39881d.pdf IDList= HotKey=0 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2
First section/Literature/DS PIC24FJ64GA004 PIM Data Sheet (51663A).pdf.url
[InternetShortcut] URL=http://ww1.microchip.com/downloads/en/DeviceDoc/PIM_24Fj64ga004_51663a.pdf IDList= HotKey=0 [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2
First section/Literature/UG Explorer 16 User's Guide (51589A).pdf.url
[InternetShortcut] URL=http://ww1.microchip.com/downloads/en/DeviceDoc/Explorer%2016%20User%20Guide%2051589a.pdf
First section/MPLAB X Appendix A v0.10.pdf
Appendix A MPLAB
® X IDE Quick Reference Guide
Table of Contents 1. Managing Projects
1.1 How to open a project…………. .................................................................................................... A-3 1.2 How to add existing files to a project ......................................................................................... A-4 1.3 How to create new files in a project ........................................................................................... A-5 1.4 How to remove a file from a project ........................................................................................... A-7 1.5 How to permanently delete a file ............................................................................................... A-7 1.6 How to save a file or project ....................................................................................................... A-7 1.7 How to close a project ................................................................................................................ A-8 1.8 How to modify project settings (choose debug tool, build tool, etc.) ......................................... A-8
2. Building Projects How to build a project ..................................................................................................................... A-9 How to build and run a project with a debugger .............................................................................. A-9 How to build and run a project without a debugger ........................................................................ A-10
3. Debugging Projects
How to set or change the debugger ................................................................................................. A-11 How to control program execution when debugging ....................................................................... A-12 How to set and clear breakpoints ..................................................................................................... A-12 How to use the Stopwatch ................................................................................................................ A-13 How to display and use Watches ...................................................................................................... A-14 How to view Embedded Memory (SFRs, RAM, Flash, EEPROM and Configuration bits) .................. A-15
page A-1
Trademarks The Microchip name and logo, the Microchip logo, dsPIC, KEELOQ, KEE- LOQ logo, MPLAB, PIC, PICmicro, PICSTART, PIC32 logo, rfPIC and UNI/O are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor, MXDEV, MXLAB, SEEVAL and The Embedded Control Solutions Company are regis- tered trademarks of Microchip Technology Incorporated in the U.S.A. Analog-for-the-Digital Age, Application Maestro, CodeGuard, dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN, ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified logo, MPLIB, MPLINK, mTouch, Omniscient Code Genera- tion, PICC, PICC-18, PICDEM, PICDEM.net, PICkit, PICtail, REAL ICE, fLAB, Select Mode, Total Endurance, TSHARC, UniWinDriver, WiperLock and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries. SQTP is a service mark of Microchip Technology Incorporated in the U.S.A. All other trademarks mentioned herein are property of their respective companies. © 2011, Microchip Technology Incorporated
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND HETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORM- ANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Micro- chip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.
This appendix is intended to be a supplement to lab manuals supplied with a Microchip Technical Training class. Although it may be useful on its own, it is not intended to provide complete instructions for using all aspects of the MPLAB X Inte- grated Development Environment. For more detailed information on the use of MPLAB X IDE, please consult one of the following Microchip Technical Training classes (for additional details, see http://www.microchip.com/RTC): TLS0101—Getting Started with MPLAB X IDE TLS0999—Transitioning to MPLAB X IDE for users of MPLAB IDE version 8 Or consult the Microchip Developer’s Help Center at http://microchip.wikidot.com/mplab:_start
page A-2
page A-3 © 2011 Microchip Technology Incorporated
Appendix A
Unlike some other IDEs, there is no single icon you can double click on from your operating system’s file manager. MPLAB X Projects must be opened from within the IDE.
Section 1.1
How to open a project
There are several methods you can use to launch the Open Project dialog: Method 1: Click on the Open Project icon on the main toolbar: Method 2: From the menu, select File Open Project Method 3: Using the keyboard: Ctrl Shift O
Navigate to the project’s directory and select the directory itself, which is represented by a chip icon instead of the usual folder. In MPLAB X IDE, there is no single project document, so the project’s directory is used to represent the project in the Open Project dialog.
Click on the Open Project button. You should now see a populated project tree in the IDE (you may need to click on the ‘+’ next to the chip icon to ex- pand the subfolders.
In most Microchip Technical Training classes, projects are stored in the following directory:
C:\MTT\classcode where classcode is specified in the presentation or lab manual.
Information
Figure 1.1.1 An Open Project dialog showing three projects in the TLS0999 direc- tory
Figure 1.1.2 A populated project tree after open- ing a project
1. Managing Projects
page A-4 © 2011 Microchip Technology Incorporated
Appendix A
Section 1.2
How to add existing files to a project
Right click on the logical folder in the project tree (e.g. Source Files, Header Files, etc.) where you wish to add the file(s) and select Add Existing Item… from the popup menu.
Figure 1.2.1 Popup menu displayed after right clicking on the Source Files logical folder in the project tree
The Select Item dialog box will open and display the contents of your project directory. Select one or more files (Ctrl + click to select additional files).
In most cases you can leave the Store path as: radio buttons set to Relative, but you may select Auto or Absolute if required for your project. Relative: Stores paths to files relative to the project directory. For example: \Lab1.c, or ..\OtherDirectory\Somefile.c Relative is usually the best choice for files inside your project directory. Absolute: Stores paths to files with full path from root directory. For exam- ple: C:\MTT\TLS0999\Lab1\Lab1.c Absolute is the best choice for files outside your project directory that won’t be moved such as code shared among several projects or libraries. Auto: Automatically uses Relative for files inside the project directory and Absolute for files outside of the project directory.
Click the Select button. You should now be able to expand the selected logical folder in the project tree and see that the files have been added to your project.
Figure 1.2.2 The Select Item dialog
Attention
Do not select Add Existing Items from Folders… as this will dump eve- rything from the directory you choose into the selected logical folder.
page A-5 © 2011 Microchip Technology Incorporated
Appendix A
Figure 1.3.1 New file popup menu
Section 1.3
How to create new files in a project
Method 2: Click on the New File icon on the main toolbar: Method 3: From the main menu select File New File... Method 4: Using the keyboard:
If you chose method 1 above, skip to step 3. If you chose one of the other methods above, you will be presented with the screen shown in Figure A.6 below. In the New File dialog, select the type of file you wish to create. Any file created under the Microchip Embedded category or an Empty File from the Other category will be automatically added to the project tree. Other file types may need to be added manually. Click the Next > button after you have made your selection.
You can create a “main” file any- time you like and just delete the code that is automatically in- serted to make it a regular C file.
Information
Figure 1.3.2 New File wizard—Choose File Type
The dialog now prompts you for a file name and potentially a file type de- pending on your initial selection. It also prompts you for a folder. You can leave this blank and the IDE will automatically create the file inside your pro- ject directory. If you wish to locate the file elsewhere, click on the Browse… button and choose a different location. If you chose Empty File as the new file type, you will see the dialog in Figure A.7 on the next page. If you chose one of the types under the Microchip Embedded category, you will see a dialog like the one in Figure A.8 on the next page.
There are three methods you may use to launch the new file wizard: Method 1: Right click in the Projects window and select New file-type from the popup menu:
Ctrl N
page A-6 © 2011 Microchip Technology Incorporated
Appendix A
Figure 1.3.3 New Empty File Dialog
Figure 1.3.4 New Main File Dialog (Microchip Embedded category)
Attention
You must specify a file extension (e.g. myNewFile.c) as part of the File Name if you want the file to be added to the project tree automati- cally into the correct logical folder.
It is not necessary to specify the file extension as part of the file- name as long as the correct ex- tension is selected below.
Information
After providing all of the required information, click the Finish button. You should now see the new file in the project tree. If you don’t see it, you may need to add the file to the project (see page A-4)
Figure 1.3.5 Project tree with newfile.c and new- mainp24f.c added to the project.
page A-7 © 2011 Microchip Technology Incorporated
Appendix A
Section 1.4
How to remove a file from a project
Right click on the file you wish to remove and select from the popup menu Remove From Project
Figure 1.4.1 Project right click menu with Re- move From Project selected
Section 1.5
How to permanently delete a file
Select a file in the project tree and press This will permanently delete the file from you system in addition to removing it from the project. The file will not be recoverable from the Trash.
Delete
Figure 1.5.1 Confirm delete dialog. This will be your only warning.
DANGER!
DO NOT use the Delete key to simply remove a file from your project. This will also PERMANENTLY DELETE the file from your hard drive. It will not be recoverable from the Trash folder.
Section 1.6
How to save a file or project
The entire project along with all of its files are saved automatically each time you build your code. However you may explicitly save the project and all its files using one of two methods. Method 1: Click the “double floppy disk” icon in the toolbar: Method 2: From the main menu select File Save All Though it is not usually necessary to just save a single file, you can do so by selecting the file in the editor and then from the main menu File Save.
page A-8 © 2011 Microchip Technology Incorporated
Appendix A
Section 1.7
How to close a project
There are two methods you can use to close a project: Method 1: Right click on the top node of the project in the project tree (the chip icon) and select Close from the popup menu (about 2/3 of the way down). Method 2: From the main menu, select File Close Project (project name) where project name is the name of the project you wish to close—there may be multiple similar menu items if you have more than one project open in the IDE.
Section 1.8
How to modify project settings
There are three ways to access a project’s settings: Method 1: Right click on the top node (chip icon) of a project in the project tree and select Properties at the very bottom of the long popup menu.
Method 2: From the main menu select File Project Properties (project name) Method 3: If the Project Environment window is open (bottom left corner by default), you can click on the “wrench and bolt” icon in its left margin.
Project Properties
From here you can select a different device, debug tool or build tool and you can modify any of their settings. When choosing a new tool, click the Apply button to make it show up in the tree on the left side.
Figure 1.8.1 The top node of a project in the pro- ject tree
Figure 1.8.2 Project Properties button in the Pro- ject Environment window.
page A-9 © 2011 Microchip Technology Incorporated
Appendix A
2. Building Projects
Section 2.1
How to build a project
There are two ways to access these two build types: From the Main Toolbar:
There are several ways to build a project in MPLAB X depending on what you intend to do with the results. This method is only used to see the results of a build or to produce a release mode hex file. There are two different types of build you can do: Build: This will build only the files in your project that have changed since the last build or it will build everything if nothing has been built previously. It will generally be faster to use this type of build, especially for larger projects. Clean and Build: This will remove any intermediate files generated by the previous build and will build every file in your project regardless of whether or not it has changed since the last build to ensure a full, clean build.
Build
Clean and Build
Alternatively, you can right click on the top node of a project (chip icon) in the project tree and select either Build or Clean and Build from the popup menu.
Make in MPLAB IDE 8
Build All in MPLAB IDE 8
Section 2.2
How to build and run a project with a debugger
When you want to build a project for the purpose of programming a target to run with a debugger like the MPLAB® ICD 3 or REAL ICE, this is the method to use.
There are three ways to build and run your code through a debugger: Method 1: Click on the Debug Project button on the main toolbar Method 2: Right click on the top node of the project (chip icon) in the project tree and select Debug from the popup menu. Method 3: From the main menu, select Debug Debug Project (project name) This will perform the following tasks automatically: a. Build (make) project in debug mode b. Program target (unless using simulator) c. Run code on target
The Build and Clean and Build functions are not intended for use before Run Project, Debug Project or Make and Program Target. All three of those func- tions automatically do a build before performing further steps. No harm will be done by using Build or Clean and Build first, but it will be a duplication of effort and will waste time.
Information
It is not necessary to do a Build or Clean and Build before doing a Debug Project because a build will be done automatically.
Information
page A-10 © 2011 Microchip Technology Incorporated
Appendix A
Section 2.3
How to build and run a project without a debugger
When you want to build a project for the purpose of programming a target to run without a debugger, this is the method to use.
There are three ways to build and run your code on a target: Method 1: Click on the Run Project button on the main toolbar Method 2: Right click on the top node of the project (chip icon) in the project tree and select Run from the popup menu. Method 3: From the main menu, select Run Run Project (project name) This will perform the following tasks automatically: a. Build (make) project in release mode b. Program target c. Run code on target
It is not necessary to do a Build or Clean and Build before doing a Run Project because a build will be done automatically.
Information
page A-11 © 2011 Microchip Technology Incorporated
Appendix A
3. Debugging Projects
Section 3.1
How to set or change the debugger
Open the project properties window (see page A-8 “How to modify a pro- ject’s settings” for details)
In the center column under “Hardware Tool”, click on the serial number un- der the name of the tool you wish to use. If choosing the simulator, just click on “Simulator” since no serial number is associated with it. Some tools do not provide a serial number. In that case, click on the text right below the name of the tool (see PICkit 2 in the figure below for an example).
Click on the Apply button after you make your selection and you should see the selected tool in the tree of the left column.
Figure 3.1.1 Selecting a hardware tool in the Project Properties window
Figure 3.1.2 Changing a hardware tool in the Project Properties window
Clicking on the tool in the tree of the left column will display the tool’s prop- erties in the right side of the window, where you can modify them to suit your project’s needs. Click OK when finished.
page A-12 © 2011 Microchip Technology Incorporated
Appendix A
Section 3.3
How to set and clear breakpoints
Standard line breakpoints may be set or cleared by clicking on the line num- ber in the glyph margin.
Figure 3.3.1 Setting / clearing a breakpoint
More advanced breakpoint features may be accessed by opening the break- points window. From the main menu select Window Debugging Break- points. In the breakpoint window, right click on a breakpoint in the list and select Customize or Complex Breakpoint from the popup menu for advanced op- tions.
Section 3.2
How to control program execution when debugging
Finish Debug Session (Shift + F5) This is required before you make any changes to your project settings or source code.
Pause
Reset
Continue (F5)
Step Over (F8) - Execute each line without stepping into functions (functions are executed without stepping through each line)
Step Into (F7) - Execute each line and step into functions
Run to Cursor (F4)
Set PC at Cursor
Focus Cursor at PC
Debug Toolbar Buttons
Additional functions may be found in the Debug menu.
When you hover the mouse pointer over a toolbar button a tool tip will be displayed explain- ing the function of the button.
Information
page A-13 © 2011 Microchip Technology Incorporated
Appendix A
Run your code. The cycle count will be displayed each time you hit one of the selected breakpoints. The Trash icon in the margin will reset the cycle count.
Section 3.4
How to use the stopwatch
From the main menu select Window Debugging Stopwatch
In the stopwatch window, click on the Properties button in its margin.
Properties
Select existing breakpoints for the start and stop conditions
Figure 3.4.1 Stopwatch properties button
Figure 3.4.2 Stopwatch properties window
Figure 3.4.3 Stopwatch displaying results from the starting and ending breakpoints
page A-14 © 2011 Microchip Technology Incorporated
Appendix A
Section 3.5
How to display and use Watches
From the main menu select Window Debugging Watches or from the keyboard press Alt Shift 2
The Watches window should appear as a new tab near the Output window in the bottom center of the IDE. There are three ways to add a watch value: Method 1: Double click on the first empty line in the Name column and type in the name of the variable/register
Method 2: Double click on a variable or register name in the editor to select it. Then left click and drag it to the Watches window.
Method 3: Right click on a variable/register name in the editor or on a new line in the Watches window and from the popup menu select New Watch… , then in the window that opens, enter the desired variable/register name in the text box or select it from the list by choosing Global Symbols or SFRs
Figure 3.5.1 Adding a watch variable directly to the watches window
Figure 3.5.2 Dragging a variable from the editor to the watches window
Figure 3.5.3 New Watch dialog box
Figure 3.5.4 Changing the Value display format
To change the display value, right click on an entry in the Value col- umn and select Display Value As from the popup menu.
Information
Watch variables may be sorted by clicking on the Name column.
Information
page A-15 © 2011 Microchip Technology Incorporated
Appendix A
Section 3.6
How to view Embedded Memory (RAM, SFRs, Flash, EEPROM or Configuration Bits)
From the main menu select Window PIC Memory Views Memory View n where n is a value from 1 through 4. It doesn’t matter which one you choose initially as they are all identical and configurable.
A new tab will open by default in the bottom center part of the IDE. At the bottom left of this window is a combo box labeled “Memory” that is used to configure this window to display any valid memory type for the currently selected device.
Figure 3.6.1 PIC Memory Views menu item
Figure 3.6.2 PIC Memory View showing File Reg- isters with other options in the Memory combo box
The Format combo box at the bottom right of the memory view window is different for each memory type, but will configure the display in a variety of numeric and symbolic formats.
Information
page A-16 © 2011 Microchip Technology Incorporated
Appendix A
First section/Tools/PIC24 and dsPIC UART Baud Rate Calc.xlsx
PIC16 & PIC18 UART baud rate
| PIC24 and dsPIC UART Baud Rate Generator Register Calculations | |||||||||||||||||
| High | |||||||||||||||||
| Low | Baud Rates: | SPBRG calculation help: | Actual baud rate error help: | ||||||||||||||
| Low | High/Low affects the "High Baud Rate Select" bit (UxMODE<BRGH>) | 110 | 25.04 | 9615.38462 | |||||||||||||
| and the equation used to calulate baud rate | 300 | 103.17 | 9615.38462 | ||||||||||||||
| 1200 | |||||||||||||||||
| 2400 | |||||||||||||||||
| 4800 | |||||||||||||||||
| 4 | 9600 | ||||||||||||||||
| 19200 | |||||||||||||||||
| 38400 | |||||||||||||||||
| 57600 | |||||||||||||||||
| 115200 | |||||||||||||||||
| 9600 | 230400 | ||||||||||||||||
| UxMODE<BRGH> = | 0 | Selects low or high speed mode | 460800 | ||||||||||||||
| 921600 | |||||||||||||||||
| UxBRG (decimal) = | 25 | 16 bit baud rate period register | |||||||||||||||
| UxBRG (hex) = | 0019 | set this register to the value shown to achieve the desired baud rate | |||||||||||||||
| Actual baud rate = | 9615.38 | ||||||||||||||||
| Baud rate error (%) = | 0.160256 | Total difference between TX Baud Rate and RX Baud Rate should be no more than +/- 4%. | |||||||||||||||
| Distributing this error to both sides of the channel leaves +/- 2% error for each side. | |||||||||||||||||
| This +/- 2% error is a combination of crystal error and Baud Rate Generator error. | |||||||||||||||||
| Shoot for a Baud rate error less than +/- 1% to leave room for crystal error. | |||||||||||||||||
Step 1: Choose high or low speed baud rate from drop down list
Step 2: Enter the instruction rate (FCY) in MHz
Step 3: Enter the desired baud rate from the drop down list
Output
Input