Skip to content

Commit faf2860

Browse files
Nicolas TermerNicolas Termer
Nicolas Termer
authored and
Nicolas Termer
committed
MPAE-15877 improving the Q10 HPC demo to support new melody
1 parent 24ce3a9 commit faf2860

Some content is hidden

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

54 files changed

+20339
-4207
lines changed

.main-meta/main.json

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,29 @@
22
"metaDataVersion": "1.0.0",
33
"category": "com.microchip.ide.project",
44
"content": {
5-
"metaDataVersion": "1.1.0",
5+
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mcu8.mplabx.project.pic18f47q10-curiosity-hpc-demo-code",
7-
"version": "2.0.0",
7+
"version": "2.0.1",
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.45.0"
13+
"semverRange": ">=6.10.0"
1414
},
1515
"compiler": [
1616
{
1717
"name": "XC8",
18-
"semverRange": "^2.31.0"
18+
"semverRange": "^2.41.0"
1919
}
2020
],
2121
"dfp": {
2222
"name": "PIC18F-Q_DFP",
23-
"semverRange": "^1.11.185"
23+
"semverRange": "^1.18.389"
2424
},
2525
"configurator": {
2626
"name": "MCC",
27-
"semverRange": ">=4.1.0"
27+
"semverRange": ">=5.3.2"
2828
},
2929
"device": {
3030
"metaDataVersion": "1.0.0",
@@ -37,50 +37,18 @@
3737
}
3838
},
3939
"author": "Microchip",
40-
"subcategories": [
41-
"MCC",
42-
[
43-
"Peripherals",
44-
"ADCC"
45-
],
46-
[
47-
"Peripherals",
48-
"UART"
49-
],
50-
[
51-
"Peripherals",
52-
"Timer"
53-
],
54-
[
55-
"Peripherals",
56-
"Interrupts"
57-
],
58-
[
59-
"Peripherals",
60-
"Watchdog"
61-
],
62-
[
63-
"Peripherals",
64-
"Sleep"
65-
],
66-
[
67-
"Peripherals",
68-
"PWM"
69-
]
70-
],
7140
"peripherals": [
7241
"ADCC",
7342
"UART",
7443
"WWDT",
44+
"TMR0",
7545
"TMR1",
46+
"TMR2",
7647
"PWM"
7748
],
7849
"keywords": [
79-
"Demo Code",
8050
"Getting Started",
81-
"Q10",
82-
"PIC18-Q10",
83-
"Curiosity Board",
51+
"Curiosity",
8452
"Melody"
8553
],
8654
"additionalData": {

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@ static uint8_t flagCounter = 0;
5959
void Blink(void) {
6060
if (labState == NOT_RUNNING) {
6161
LEDs_SetLow();
62-
Timer1_Start();
62+
TMR1_Start();
6363

6464
labState = RUNNING;
6565
}
6666

6767
if (labState == RUNNING) {
68-
while(!Timer1_HasOverflowOccured());
68+
while(!TMR1_HasOverflowOccured());
6969
TMR1IF = 0;
70-
Timer1_Reload();
70+
TMR1_Reload();
7171
flagCounter++;
7272

7373
if(flagCounter == FLAG_COUNTER_MAX){
@@ -77,7 +77,7 @@ void Blink(void) {
7777
}
7878

7979
if (switchEvent) {
80-
Timer1_Stop();
80+
TMR1_Stop();
8181
labState = NOT_RUNNING;
8282
}
8383
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ void PWM(void) {
6161
if (labState == NOT_RUNNING) {
6262
LEDs_SetLow();
6363
PWM_Output_D5_Enable();
64-
Timer2_Start();
64+
TMR2_Start();
6565

6666
labState = RUNNING;
6767
}
@@ -74,7 +74,7 @@ void PWM(void) {
7474
}
7575

7676
if (switchEvent) {
77-
Timer2_Stop();
77+
TMR2_Stop();
7878
PWM_Output_D5_Disable();
7979
labState = NOT_RUNNING;
8080
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ void Timers(void) {
6060
//Initialize temporary register to begin at 1
6161
rotateReg = 1;
6262

63-
Timer1_Start();
63+
TMR1_Start();
6464
labState = RUNNING;
6565
}
6666

6767
if (labState == RUNNING) {
68-
while(!Timer1_HasOverflowOccured());
68+
while(!TMR1_HasOverflowOccured());
6969
TMR1IF = 0;
70-
Timer1_Reload();
70+
TMR1_Reload();
7171

7272
rotateReg <<= 1;
7373

@@ -81,7 +81,7 @@ void Timers(void) {
8181
}
8282

8383
if (switchEvent) {
84-
Timer1_Stop();
84+
TMR1_Stop();
8585
labState = NOT_RUNNING;
8686
}
8787
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void Interrupt(void) {
6868
INTERRUPT_PeripheralInterruptEnable();
6969
INTERRUPT_TMR0InterruptEnable();
7070

71-
Timer0_OverflowCallbackRegister(LAB_ISR);
71+
TMR0_OverflowCallbackRegister(LAB_ISR);
7272
labState = RUNNING;
7373
}
7474

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/**
4747
Section: Macro Declaration
4848
*/
49-
#define EEAddr 0x0000 // EEPROM starting address
49+
#define EEAddr 0x310000 // EEPROM starting address
5050

5151
/**
5252
Section: Local Variable Declarations
@@ -68,10 +68,11 @@ void EEPROM(void) {
6868
if (labState == RUNNING) {
6969
//Get the top 4 MSBs of the ADC and write them to EEPROM
7070
adcResult = ADCC_GetSingleConversion(POT_CHANNEL) >> 12;
71-
DATAEE_WriteByte(EEAddr, adcResult);
71+
NVM_UnlockKeySet(UNLOCK_KEY_WORD_BYTE_WRITE);
72+
EEPROM_Write(EEAddr, adcResult);
7273

7374
//Load whatever is in EEPROM to the LED Display
74-
ledDisplay = DATAEE_ReadByte(EEAddr);
75+
ledDisplay = EEPROM_Read(EEAddr);
7576

7677
//Determine which LEDs will light up
7778
LEDs = ledDisplay << 4;

pic18f47q10-curiosity-hpc-demo-code.X/defmplabxtrace.log

Whitespace-only changes.
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
dist/free/debug\doprnt.p1: \
2+
C:\Program\ Files\Microchip\xc8\v2.41\pic\sources\c99\common\doprnt.c

0 commit comments

Comments
 (0)