Skip to content

Commit fce61fd

Browse files
committed
Merge pull request #2 in MCU16CE/pic24f-lcd-usb-curiosity-lcd-power from ~I15232/pic24f-lcd-usb-curiosity-lcd-power:feature/MCU16GITHUB-108-add-or-update-mplab-x-project to develop
* commit '443a90336d09c6d95f848b2b8b9d7530f142a86c': Updated the board image and board link removed additionalData from main.json Call to SYSTEM_Initialize blowing away RTCC time. Call needed to initialize the SPI and associated pins so the TC77 can shutdown properly. fixing issue if starting in battery mode. Microchip and BoE not printed. USB mode working. Updated code Project updated Removed BSL entry from MC3 file Removed unwanted pin configurations Updated the project using MCC Generated files
2 parents 0fe3607 + 443a903 commit fce61fd

Some content is hidden

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

81 files changed

+42582
-3711
lines changed

.main-meta/main.json

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
"name":"PIC24F_GL_GU_DFP",
2121
"semverRange":"^1.3.38"
2222
},
23+
"configurator": {
24+
"name": "MCC",
25+
"semverRange": ">=4.0.1"
26+
},
2327
"device":{
2428
"metaDataVersion":"1.0.0",
2529
"category":"com.microchip.portal.contentRef",
@@ -41,16 +45,5 @@
4145
"LCD",
4246
"USB"
4347
]
44-
},
45-
"additionalData":{
46-
"longDescription":{
47-
"metaDataVersion":"1.0.0",
48-
"category":"com.microchip.portal.fileRef",
49-
"content":{
50-
"metaDataVersion":"1.0.0",
51-
"fileName":"./README.md",
52-
"mimeType":"text/markdown"
53-
}
54-
}
5548
}
5649
}

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Summary
66

7-
This is the demo software which runs on PIC24F LCD USB Curiosity Development Board (DM240017). The PIC24F LCD USB Curiosity Development Board is a cost-effective, fully integrated development platform targeted at first-time users, Makers, and those seeking a feature-rich rapid prototyping board. Refer to https://www.microchip.com/pic24flcdcuriosity for additional details about the board.
7+
This is the demo software which runs on PIC24F LCD USB Curiosity Development Board (DM240018). The PIC24F LCD USB Curiosity Development Board is a cost-effective, fully integrated development platform targeted at first-time users, Makers, and those seeking a feature-rich rapid prototyping board. Refer to https://www.microchip.com/pic24flcdusbcuriosity for additional details about the board.
88

99

1010
## Related Documentation
@@ -15,12 +15,13 @@ This is the demo software which runs on PIC24F LCD USB Curiosity Development Boa
1515

1616
## Hardware Used
1717

18-
- PIC24F LCD USB Curiosity Development Board (https://www.microchip.com/DM240017)
18+
- PIC24F LCD USB Curiosity Development Board (https://www.microchip.com/pic24flcdusbcuriosity)
1919

2020
## Software Used
2121

2222
- MPLAB® X IDE v5.40 or newer (https://www.microchip.com/mplabx)
2323
- MPLAB® XC16 v1.50 or newer (https://www.microchip.com/xc)
24+
- MPLAB® Code Configurator v4.0.1 (https://www.microchip.com/mplab/mcc)
2425

2526

2627
## Operation
@@ -46,4 +47,4 @@ The CPU wakes up once a minute in this mode to update the time on the screen. LE
4647

4748
To measure the power consumption of the board, a meter can be placed between the pins 2 and 3 of jumper J9 (that goes to the battery housing. To measure the current of the CPU, cut the trace on the bottom of the board under jumper J1 and place a meter between the two pins.
4849

49-
![image](images/PIC24FLCDCuriosity.jpg)
50+
![image](images/pic24f_lcdusbcuriosity.jpg)

images/PIC24FLCDCuriosity.jpg

-485 KB
Binary file not shown.

images/pic24f_lcdusbcuriosity.jpg

268 KB
Loading

pic24f-lcd-usb-curiosity-lcd-power.X/MyConfig.mc3

Lines changed: 36005 additions & 0 deletions
Large diffs are not rendered by default.

pic24f-lcd-usb-curiosity-lcd-power.X/battery_operational_mode.c renamed to pic24f-lcd-usb-curiosity-lcd-power.X/application/battery_operational_mode.c

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,41 +16,45 @@ limitations under the License.
1616

1717
#include "operational_mode.h"
1818
#include "power.h"
19-
#include "lcd1.h"
20-
#include "adc.h"
19+
#include "mcc_generated_files/lcd.h"
20+
#include "mcc_generated_files/adc1.h"
2121
#include "mcc_generated_files/rtcc.h"
2222
#include "tc77.h"
2323
#include "lcd_demo.h"
2424

2525
#include <xc.h>
2626

27-
static void Initialize(void);
28-
static void Deinitialize(void);
29-
static void Tasks(void);
27+
static void BatteryModeTasks_Initialize(void);
28+
static void BatteryModeTasks_Deinitialize(void);
29+
static void BatteryModeTasks(void);
3030
static void UpdateBatteryStatusIcon(void);
3131

3232
static struct tm date_time;
3333

3434
const struct OPERATIONAL_MODE battery_operational_mode = {
35-
&Initialize,
36-
&Deinitialize,
37-
&Tasks
35+
&BatteryModeTasks_Initialize,
36+
&BatteryModeTasks_Deinitialize,
37+
&BatteryModeTasks
3838
};
3939

40-
static void Initialize(void)
40+
static void BatteryModeTasks_Initialize(void)
4141
{
42-
LCD_DEMO_LowPowerModeEnable(true);
43-
42+
PIN_MANAGER_Initialize();
43+
SPI1_Initialize();
4444
TC77_Shutdown();
4545
}
4646

47-
static void Tasks(void)
47+
static void BatteryModeTasks(void)
4848
{
4949
POWER_SetMode(POWER_MODE_LOW);
5050

5151
RTCC_TimeGet(&date_time);
52-
LCD_DEMO_PrintTime(date_time.tm_hour, date_time.tm_min);
5352

53+
ADC1_Initialize();
54+
ANCFGbits.VBGEN3 = 1;
55+
56+
LCD_DEMO_PrintTime(date_time.tm_hour, date_time.tm_min);
57+
LCD_SetPowerMode(LCD_POWER_MODE_HIGH);
5458
UpdateBatteryStatusIcon();
5559

5660
POWER_SetMode(POWER_MODE_SLEEP);
@@ -62,7 +66,7 @@ static void Tasks(void)
6266
Sleep();
6367
}
6468

65-
static void Deinitialize(void)
69+
static void BatteryModeTasks_Deinitialize(void)
6670
{
6771
POWER_SetMode(POWER_MODE_FULL);
6872
}

0 commit comments

Comments
 (0)