Skip to content

Commit 55b618f

Browse files
committed
MPAE-11426 repo update
1 parent f832b63 commit 55b618f

File tree

13 files changed

+56
-17
lines changed

13 files changed

+56
-17
lines changed

.main-meta/main.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metaDataVersion": "1.1.0",
66
"name": "com.microchip.mcu8.mplabx.project.pic16f18446-sensor-board-battery-measurement",
77
"version": "1.0.1",
8-
"displayName": "Sensor Board Battery Measurement",
8+
"displayName": "PIC16F18446 Sensor Board Battery Measurement",
99
"projectName": "pic16f18446-sensor-board-battery-measurement",
1010
"shortDescription": "Battery (Vdd) level measurement is performed while the display is turned on. The percentage level of the remaining charge in the batteries is shown as a battery icon with proportional filling in the top-right corner of the display. Additionally, the battery voltage in Volts and percentage graph are displayed.",
1111
"ide": {
@@ -39,14 +39,15 @@
3939
"author": "Microchip",
4040
"subcategories": [
4141
[
42-
"Peripherals", "ADCC"
42+
"Peripherals",
43+
"ADCC"
4344
]
4445
],
4546
"peripherals": [
4647
"ADCC"
4748
],
4849
"keywords": [
49-
"Battery level"
50+
"Battery Level"
5051
],
5152
"additionalData": {
5253
"longDescription": {

LICENSE.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
(c) 2021 Microchip Technology Inc. and its subsidiaries.
2+
3+
Subject to your compliance with these terms, you may use Microchip software
4+
and any derivatives exclusively with Microchip products. You're responsible
5+
for complying with 3rd party license terms applicable to your use of 3rd
6+
party software (including open source software) that may accompany Microchip
7+
software.
8+
9+
SOFTWARE IS "AS IS." NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY,
10+
APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
11+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
12+
13+
IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
14+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
15+
WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
16+
HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
17+
THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
18+
CLAIMS RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY,
19+
YOU PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
20+

README.md

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,56 @@
1-
<div id="readme" class="Box-body readme blob js-code-block-container">
2-
<article class="markdown-body entry-content p-3 p-md-6" itemprop="text"><p><a href="https://www.microchip.com" rel="nofollow"><img src="https://camo.githubusercontent.com/5fb5505f69a28ff407841612dfe2b7004f210594/68747470733a2f2f636c6475702e636f6d2f553071684c7742696a462e706e67" alt="MCHP" data-canonical-src="https://cldup.com/U0qhLwBijF.png" style="max-width:100%;"></a></p>
1+
[![MCHP](images/microchip.png)](https://www.microchip.com)
32

43

5-
# Introduction
4+
# PIC16F18446 Sensor Board Battery Measurement
5+
66
The PIC16F184xx family has a new Analog to Digital Converter with Computation (ADCC) with a 12-bit resolution. This project shows how the PIC can internally measure its Vdd using the ADCC and FVR.
77

8-
# Description
98
In this example we will be using the PIC16F18446 Sensor Board. Battery (Vdd) level measurement is performed while the display is turned on. The percentage level of the remaining charge in the batteries is shown as a battery icon with proportional filing in the top-right corner of the display. Additionally, the battery voltage in Volts and percentage graph are displayed.
109

11-
![Battery Measurement](image/display.png)
10+
## Related Documentation
11+
- [PIC16F18446 Product Family Page](https://www.microchip.com/design-centers/8-bit/pic-mcus/device-selection/pic16f18446)
12+
- [PIC16F18446 datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/40001985B.pdf) for more information or specifications.
13+
14+
15+
## Software Used
16+
- MPLAB® X IDE 5.30 or newer [(microchip.com/mplab/mplab-x-ide)](http://www.microchip.com/mplab/mplab-x-ide)
17+
- MPLAB® XC8 2.10 or a newer compiler [(microchip.com/mplab/compilers)](http://www.microchip.com/mplab/compilers)
18+
- MPLAB® Code Configurator (MCC) 3.95.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
19+
- MPLAB® Code Configurator (MCC) Device Libraries 8-bit AVR MCUs 2.3.0 or newer [(microchip.com/mplab/mplab-code-configurator)](https://www.microchip.com/mplab/mplab-code-configurator)
20+
- PIC16F1xxxx DFP 1.2.99 or newer Device Pack
21+
22+
## Hardware Used
23+
- [PIC16F18446 Sensor Board Demonstration](https://www.microchip.com/promo/pic16f18446-sensor-board-demonstration)
24+
25+
26+
## Setup
1227

1328
To get the Vdd voltage, ADCC is used to measure the FVR (which is configured to 1.024V) with Vdd as positive reference. Then the Vdd is calculated using this formula: Vdd = 1.024V * 4096 / ADC_Reading.
1429

15-
# MCC Settings
30+
### MCC Settings
1631

1732
Here are the settings used for MSSP, CLC, FVR, and ADCC. MSSP + CLC are used for the LCD control.
1833
### MSSP Settings
19-
![MSSP Settings](image/MSSP1.png)
34+
<br><img src="images/MSSP1.png" width="600">
2035

2136
### CCL Settings
22-
![CCL1 Settings](image/CLC1.png)
37+
<br><img src="images/CLC1.png" width="600">
2338

24-
![CCL2 Settings](image/CLC2.png)
39+
<br><img src="images/CLC2.png" width="600">
2540

2641
### FVR Settings
27-
![FVR Settings](image/FVR.png)
42+
<br><img src="images/FVR.png" width="600">
2843

2944
### ADCC settings
30-
![ADCC Settings](image/ADCC1.png)
45+
<br><img src="images/ADCC1.png" width="600">
3146
ADRPT register is set to 0x40, to average a burst of 64 samples.
32-
![ADCC Registers](image/ADCC2.png)
47+
<br><img src="images/ADCC2.png" width="600">
3348

3449
### PIN Grid
35-
![PIN Grid](image/PIN_Grid.png)
50+
<br><img src="images/PIN_Grid.png" width="600">
3651

3752
### PIN Module
38-
![PIN Module](image/PIN_Module.png)
53+
<br><img src="images/PIN_Module.png" width="600">
54+
55+
## Demo
56+
<br><img src="images/display.png" width="600">
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)