Skip to content

Commit 24ce3a9

Browse files
committed
Merge branch 'feature/mccPorting' into develop
* feature/mccPorting: MPAE-11892: updated melody library MPAE-11892: updated interrup lab MPAE-11892: ported mcc settings, updated meta data and readme files
2 parents ef1636a + 9329571 commit 24ce3a9

File tree

59 files changed

+5058
-14790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+5058
-14790
lines changed

.main-meta/main.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@
44
"content": {
55
"metaDataVersion": "1.1.0",
66
"name": "com.microchip.mcu8.mplabx.project.pic18f47q10-curiosity-hpc-demo-code",
7-
"version": "1.0.3",
7+
"version": "2.0.0",
88
"displayName": "PIC18F47Q10 High-Pin-Count Curiosity Board Demo Code",
99
"projectName": "pic18f47q10-curiosity-hpc-demo-code",
1010
"shortDescription": "Demo code for HPC board for PIC18-Q10 devices",
1111
"ide": {
1212
"name": "MPLAB X",
13-
"semverRange": ">=5.40.0"
13+
"semverRange": ">=5.45.0"
1414
},
1515
"compiler": [
16-
{
17-
"name": "XC8",
18-
"semverRange": "^2.20.0"
19-
}
20-
],
16+
{
17+
"name": "XC8",
18+
"semverRange": "^2.31.0"
19+
}
20+
],
2121
"dfp": {
2222
"name": "PIC18F-Q_DFP",
23-
"semverRange": "^1.7.135"
23+
"semverRange": "^1.11.185"
2424
},
2525
"configurator": {
2626
"name": "MCC",
27-
"semverRange": ">=3.95.0"
27+
"semverRange": ">=4.1.0"
2828
},
2929
"device": {
3030
"metaDataVersion": "1.0.0",
@@ -80,7 +80,8 @@
8080
"Getting Started",
8181
"Q10",
8282
"PIC18-Q10",
83-
"Curiosity Board"
83+
"Curiosity Board",
84+
"Melody"
8485
],
8586
"additionalData": {
8687
"longDescription": {

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ The following labs in this demo code project are designed for Microchip’s Curi
99
![Curiosity High Pin Count (HPC) Development Board](images/HPC-board.PNG)
1010

1111
## Software Used
12-
- MPLAB® X IDE 5.35 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide)
13-
- MPLAB® XC8 2.10 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers)
14-
- MPLAB® Code Configurator (MCC) 3.95.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
15-
- MPLAB® Code Configurator (MCC) Device Libraries PIC10 / PIC12 / PIC16 / PIC18 MCUs [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
16-
- Microchip PIC18F-Q Series Device Support (1.4.109) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/)
12+
- MPLAB® X IDE 5.45 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide)
13+
- MPLAB® XC8 2.31 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers)
14+
- MPLAB® Code Configurator (MCC) 4.1.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
15+
- MPLAB® Melody Library 1.37.22 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
16+
- Microchip PIC18F-Q Series Device Support (1.11.185) or newer [(packs.download.microchip.com/)](https://packs.download.microchip.com/)
1717

1818
## Hardware Used
1919
- [PIC18F47Q10 Microcontroller](https://www.microchip.com/wwwproducts/en/PIC18F47Q10)

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab01_HelloWorld/HelloWorld.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
43+
#include "../../mcc_generated_files/system/system.h"
4444
#include "../../labs.h"
4545

4646
/*

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab02_Blink/Blink.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/tmr1.h"
43+
#include "../../mcc_generated_files/system/system.h"
4544
#include "../../labs.h"
4645

4746
/**
@@ -60,15 +59,15 @@ static uint8_t flagCounter = 0;
6059
void Blink(void) {
6160
if (labState == NOT_RUNNING) {
6261
LEDs_SetLow();
63-
TMR1_StartTimer();
62+
Timer1_Start();
6463

6564
labState = RUNNING;
6665
}
6766

6867
if (labState == RUNNING) {
69-
while(!TMR1_HasOverflowOccured());
68+
while(!Timer1_HasOverflowOccured());
7069
TMR1IF = 0;
71-
TMR1_Reload();
70+
Timer1_Reload();
7271
flagCounter++;
7372

7473
if(flagCounter == FLAG_COUNTER_MAX){
@@ -78,7 +77,7 @@ void Blink(void) {
7877
}
7978

8079
if (switchEvent) {
81-
TMR1_StopTimer();
80+
Timer1_Stop();
8281
labState = NOT_RUNNING;
8382
}
8483
}

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab03_Rotate/Rotate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
43+
#include "../../mcc_generated_files/system/system.h"
4444
#include "../../labs.h"
4545

4646
/**

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab04_AnalogToDigitalConversion/ADC.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/adcc.h"
45-
#include "../../mcc_generated_files/eusart1.h"
43+
#include "../../mcc_generated_files/system/system.h"
4644
#include "../../labs.h"
4745

4846
/**

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab05_VariableSpeedRotate/VSR.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/adcc.h"
45-
#include "../../mcc_generated_files/eusart1.h"
43+
#include "../../mcc_generated_files/system/system.h"
4644
#include "../../labs.h"
4745

4846
/**

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab06_PulseWidthModulation/PWM.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/adcc.h"
45-
#include "../../mcc_generated_files/pwm3.h"
46-
#include "../../mcc_generated_files/tmr2.h"
47-
#include "../../mcc_generated_files/eusart1.h"
43+
#include "../../mcc_generated_files/system/system.h"
4844
#include "../../labs.h"
4945

5046
/**
@@ -65,7 +61,7 @@ void PWM(void) {
6561
if (labState == NOT_RUNNING) {
6662
LEDs_SetLow();
6763
PWM_Output_D5_Enable();
68-
TMR2_StartTimer();
64+
Timer2_Start();
6965

7066
labState = RUNNING;
7167
}
@@ -78,7 +74,7 @@ void PWM(void) {
7874
}
7975

8076
if (switchEvent) {
81-
TMR2_StopTimer();
77+
Timer2_Stop();
8278
PWM_Output_D5_Disable();
8379
labState = NOT_RUNNING;
8480
}

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab07_Timers/Timer1.c renamed to pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab07_Timers/Timers.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/tmr1.h"
43+
#include "../../mcc_generated_files/system/system.h"
4544
#include "../../labs.h"
4645

4746
/**
@@ -52,7 +51,7 @@ static uint8_t rotateReg;
5251
/*
5352
Application
5453
*/
55-
void Timer1(void) {
54+
void Timers(void) {
5655

5756
if (labState == NOT_RUNNING) {
5857
LEDs_SetLow();
@@ -61,16 +60,15 @@ void Timer1(void) {
6160
//Initialize temporary register to begin at 1
6261
rotateReg = 1;
6362

64-
TMR1_StartTimer();
65-
63+
Timer1_Start();
6664
labState = RUNNING;
6765
}
6866

6967
if (labState == RUNNING) {
70-
while(!TMR1_HasOverflowOccured());
68+
while(!Timer1_HasOverflowOccured());
7169
TMR1IF = 0;
72-
TMR1_Reload();
73-
70+
Timer1_Reload();
71+
7472
rotateReg <<= 1;
7573

7674
//Return to initial position of LED
@@ -83,8 +81,7 @@ void Timer1(void) {
8381
}
8482

8583
if (switchEvent) {
86-
TMR1_StopTimer();
87-
84+
Timer1_Stop();
8885
labState = NOT_RUNNING;
8986
}
9087
}

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab08_Interrupts/Interrupt.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/interrupt_manager.h"
45-
#include "../../mcc_generated_files/tmr0.h"
43+
#include "../../mcc_generated_files/system/system.h"
4644
#include "../../labs.h"
4745

4846
/**
@@ -67,10 +65,10 @@ void Interrupt(void) {
6765
rotateReg = 1;
6866

6967
INTERRUPT_GlobalInterruptEnable();
68+
INTERRUPT_PeripheralInterruptEnable();
7069
INTERRUPT_TMR0InterruptEnable();
7170

72-
TMR0_SetInterruptHandler(LAB_ISR);
73-
71+
Timer0_OverflowCallbackRegister(LAB_ISR);
7472
labState = RUNNING;
7573
}
7674

@@ -80,9 +78,8 @@ void Interrupt(void) {
8078

8179
if (switchEvent) {
8280
INTERRUPT_TMR0InterruptDisable();
83-
8481
INTERRUPT_GlobalInterruptDisable();
85-
82+
INTERRUPT_PeripheralInterruptDisable();
8683
labState = NOT_RUNNING;
8784
}
8885
}

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab09_SleepWakeup/SleepWakeUp.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include <pic18.h>
44-
45-
#include "../../mcc_generated_files/pin_manager.h"
43+
#include "../../mcc_generated_files/system/system.h"
4644
#include "../../labs.h"
4745

4846
/**

pic18f47q10-curiosity-hpc-demo-code.X/Labs/Lab10_EEPROM/EEPROM.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040
Section: Included Files
4141
*/
4242

43-
#include "../../mcc_generated_files/pin_manager.h"
44-
#include "../../mcc_generated_files/adcc.h"
45-
#include "../../mcc_generated_files/memory.h"
43+
#include "../../mcc_generated_files/system/system.h"
4644
#include "../../labs.h"
4745

4846
/**

0 commit comments

Comments
 (0)