Skip to content

Commit a23d69b

Browse files
MPAE-17916: updated libraries
1 parent b3298c2 commit a23d69b

File tree

15 files changed

+93
-101
lines changed

15 files changed

+93
-101
lines changed

.main-meta/main.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"content": {
55
"metaDataVersion": "1.3.0",
66
"name": "com.microchip.mcu8.mplabx.project.pic16f13145-quadrature-decoder-timers-mplab-mcc",
7-
"version": "1.1.0",
7+
"version": "1.1.1",
88
"displayName": "Quadrature Decoder — Use Case for Configurable Logic Block (CLB) using the PIC16F13145 Microcontroller with MCC Melody",
99
"projectName": "pic16f13145-quadrature-decoder-timers-mplab-mcc",
1010
"shortDescription": "This repository provides an MPLAB X project that implements a quadrature decoder circuit using the CLB peripheral and device timers.",
@@ -20,11 +20,11 @@
2020
],
2121
"dfp": {
2222
"name": "PIC16F1xxx_DFP",
23-
"semverRange": "^1.24.387"
23+
"semverRange": "^1.25.389"
2424
},
2525
"configurator": {
2626
"name": "MCC",
27-
"semverRange": ">=5.5.0"
27+
"semverRange": ">=5.5.1"
2828
},
2929
"device": {
3030
"metaDataVersion": "1.0.0",

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ More details and code examples on the PIC16F13145 can be found at the following
2626

2727
- [MPLAB X IDE v6.20 or newer](https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_Apps_PIC16F13145&utm_content=pic16f13145-quadrature-decoder-timers-mplab-mcc&utm_bu=MCU08)
2828
- [MPLAB® XC8 v2.46 or newer](https://www.microchip.com/en-us/tools-resources/develop/mplab-xc-compilers?utm_source=GitHub&utm_medium=TextLink&utm_campaign=MCU8_Apps_PIC16F13145&utm_content=pic16f13145-quadrature-decoder-timers-mplab-mcc&utm_bu=MCU08)
29-
- [PIC16F1xxxx_DFP v1.24.387 or newer](https://packs.download.microchip.com/)
29+
- [PIC16F1xxxx_DFP v1.25.389 or newer](https://packs.download.microchip.com/)
3030

3131
## Hardware Used
3232

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/clb/clb1.h

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* @brief This file contains the prototypes and other data types for the CLB1 driver
1010
*
11-
* @version CLB1 Driver Version 1.0.0
11+
* @version CLB1 Driver Version 1.1.0
1212
*/
1313
/*
1414
© [2024] Microchip Technology Inc. and its subsidiaries.
@@ -34,6 +34,8 @@
3434
#ifndef CLB1_H
3535
#define CLB1_H
3636

37+
#define BITSTREAM_SIZE 102UL
38+
3739
/**
3840
Section: Included Files
3941
*/
@@ -126,14 +128,6 @@ uint16_t CLB1_SWIN_Read16(void);
126128
*/
127129
uint32_t CLB1_SWIN_Read32(void);
128130

129-
/**
130-
* @ingroup clb1
131-
* @brief Gets the data from the CLB Data registers.
132-
* @param None.
133-
* @return uint32_t data - CLB output data.
134-
*/
135-
uint32_t CLB1_GetCLBSWOUT(void);
136-
137131

138132
#endif // CLB1_H
139133
/**

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/clb/src/clb1.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* @brief This file contains the implementation of public and private functions for the CLB1 driver.
99
*
10-
* @version CLB1 Driver Version 1.0.0
10+
* @version CLB1 Driver Version 1.1.0
1111
*/
1212
/*
1313
© [2024] Microchip Technology Inc. and its subsidiaries.
@@ -110,7 +110,7 @@ void CLB1_Configure(uint16_t start_address)
110110

111111
uint16_t end_address;
112112

113-
end_address = start_address + 102;
113+
end_address = start_address + BITSTREAM_SIZE;
114114

115115
// Set the bitstream address
116116
CRC_SetScannerAddressLimit(start_address, end_address);
@@ -190,18 +190,3 @@ uint32_t CLB1_SWIN_Read32(void)
190190
return result;
191191
}
192192

193-
uint32_t CLB1_GetCLBSWOUT(void)
194-
{
195-
uint32_t result = 0x00;
196-
197-
result = (uint32_t)CLBSWOUTL;
198-
result = result | ((uint32_t)CLBSWOUTM << 8);
199-
result = result | ((uint32_t)CLBSWOUTH << 16);
200-
result = result | ((uint32_t)CLBSWOUTU << 24);
201-
202-
return result;
203-
}
204-
205-
206-
207-

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/clb/src/clbBitstream.s

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33
*
44
* @brief CLB bitstream data for the PIC16F13145 device family
55
*
6-
* @copyright (c) 2023 Microchip Technology Inc. and its subsidiaries.
7-
*
8-
* Subject to your compliance with these terms, you may use Microchip software
9-
* and any derivatives exclusively with Microchip products. You're responsible
10-
* for complying with 3rd party license terms applicable to your use of 3rd
11-
* party software (including open source software) that may accompany
12-
* Microchip software.
13-
*
14-
* SOFTWARE IS "AS IS." NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY,
15-
* APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF
16-
* NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
17-
*
18-
* IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
19-
* INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
20-
* WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
21-
* BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
22-
* FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
23-
* RELATED TO THE SOFTWARE WILL NOT EXCEED AMOUNT OF FEES, IF ANY, YOU PAID
24-
* DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
256
**/
7+
/*
8+
© [2024] Microchip Technology Inc. and its subsidiaries.
269
10+
Subject to your compliance with these terms, you may use Microchip
11+
software and any derivatives exclusively with Microchip products.
12+
You are responsible for complying with 3rd party license terms
13+
applicable to your use of 3rd party software (including open source
14+
software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
15+
NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
16+
SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
17+
MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
18+
WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
19+
INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
20+
KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
21+
MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
22+
FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
23+
TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
24+
EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
25+
THIS SOFTWARE.
26+
*/
2727

2828
/*
2929
The bitstream data can be accesed from C source code by referencing the 'start_clb_config' symbol as such:

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/system/clock.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*
88
* @brief This file contains the API prototypes and other data types for the Clock driver.
99
*
10-
* @version Driver Version 2.0.3
10+
* @version Driver Version 2.0.4
11+
*
12+
* @version Package Version 4.3.6
1113
*
1214
*/
1315

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/system/config_bits.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/**
2-
* CONFIGURATION BITS Generated Driver Header File
2+
* Configuration Bits Generated Driver Header File
33
*
44
* @file config_bits.h
55
*
66
* @defgroup config_bitsdriver CONFIGBITS Driver
77
*
88
* @brief This file contains the API prototype for the Configuration Bits driver.
99
*
10-
* @version Driver Version 2.0.1
10+
* @version Driver Version 2.0.2
11+
*
12+
* @version Package Version 4.1.4
1113
*/
1214

1315
/*
@@ -36,7 +38,7 @@
3638

3739
#include "../system/clock.h"
3840

39-
#endif //CONFIG_BITS_H
41+
#endif /* CONFIG_BITS_H */
4042
/**
4143
End of File
4244
*/

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/system/src/clock.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
*
88
* @brief This file contains the API prototypes for the Clock driver.
99
*
10-
* @version Driver Version 2.0.3
10+
* @version Driver Version 2.0.4
11+
*
12+
* @version Package Version 4.3.6
1113
*/
1214

1315
/*
@@ -37,16 +39,17 @@
3739
void CLOCK_Initialize(void)
3840
{
3941
// Set the CLOCK CONTROL module to the options selected in the user interface.
40-
//NDIV 1; NOSC HFINTOSC;
41-
OSCCON1 = 0x60;
42-
//CSWHOLD may proceed;
43-
OSCCON3 = 0x0;
44-
//EXTOEN disabled; HFOEN disabled; MFOEN disabled; LFOEN disabled; ADOEN disabled; PLLEN disabled;
45-
OSCEN = 0x0;
46-
//HFFRQ 32_MHz;
47-
OSCFRQ = 0x5;
48-
//TUN undefined;
49-
OSCTUNE = 0x0;
42+
OSCCON1 = (0 << _OSCCON1_NDIV_POSN) // NDIV 1
43+
| (6 << _OSCCON1_NOSC_POSN); // NOSC HFINTOSC
44+
OSCCON3 = (0 << _OSCCON3_CSWHOLD_POSN); // CSWHOLD may proceed
45+
OSCEN = (0 << _OSCEN_EXTOEN_POSN) // EXTOEN disabled
46+
| (0 << _OSCEN_HFOEN_POSN) // HFOEN disabled
47+
| (0 << _OSCEN_MFOEN_POSN) // MFOEN disabled
48+
| (0 << _OSCEN_LFOEN_POSN) // LFOEN disabled
49+
| (0 << _OSCEN_ADOEN_POSN) // ADOEN disabled
50+
| (0 << _OSCEN_PLLEN_POSN); // PLLEN disabled
51+
OSCFRQ = (5 << _OSCFRQ_FRQ_POSN); // FRQ 32_MHz
52+
OSCTUNE = (0 << _OSCTUNE_TUN_POSN); // TUN 0x0
5053

5154
}
5255
/**

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/system/src/config_bits.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
/**
2-
* CONFIGURATION BITS Generated Driver Source File
2+
* Configuration Bits Generated Driver Source File
33
*
44
* @file config_bits.c
55
*
66
* @ingroup config_bitsdriver
77
*
88
* @brief This file contains the API Implementation for the Device Configuration Bits driver.
99
*
10-
* @version Driver Version 2.0.1
10+
* @version Driver Version 2.0.2
11+
*
12+
* @version Package Version 4.1.4
1113
*/
1214

1315
/*
@@ -50,7 +52,6 @@
5052
#pragma config BORV = LO // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (VBOR) set to 1.9V
5153
#pragma config PPS1WAY = ON // Peripheral Pin Select one-way control->The PPSLOCKED bit can be cleared and set only once after an unlocking sequence is executed; once PPSLOCKED is set, all future changes to PPS registers are prevented
5254
#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable bit->Stack Overflow or Underflow will cause a reset
53-
#pragma config DEBUG = OFF // Background Debugger->Background Debugger disabled
5455

5556
//CONFIG3
5657
#pragma config WDTCPS = WDTCPS_31 // WDT Period Select bits->Divider ratio 1:65536; software control of WDTPS

pic16f13145-quadrature-decoder-timers-mplab-mcc.X/mcc_generated_files/system/src/pins.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void PIN_MANAGER_Initialize(void)
5656
*/
5757
ANSELA = 0x33;
5858
ANSELB = 0xF0;
59-
ANSELC = 0x4F;
59+
ANSELC = 0x4C;
6060

6161
/**
6262
WPUx registers

0 commit comments

Comments
 (0)