diff --git a/.main-meta/main.json b/.main-meta/main.json
index e667b18..b36ac8c 100644
--- a/.main-meta/main.json
+++ b/.main-meta/main.json
@@ -2,29 +2,29 @@
"metaDataVersion": "1.0.0",
"category": "com.microchip.ide.project",
"content": {
- "metaDataVersion": "1.1.0",
+ "metaDataVersion": "1.3.0",
"name": "com.microchip.mcu8.mplabx.project.avr128db48-getting-started-with-opamp-mplab-mcc",
- "version": "1.0.1",
+ "version": "2.0.0",
"displayName": "Getting Started with Analog Signal Conditioning (OPAMP)",
"projectName": "avr128db48-getting-started-with-opamp-mplab-mcc",
- "shortDescription": "These MPLAB X MCC examples in Getting Started with Analog Signal Conditioning (OPAMP) (TB3286), show how the OPAMP can be used on the AVR DB family of microcontrollers.The OPAMP peripheral features up to three internal operational amplifiers.",
+ "shortDescription": "These MPLAB X MCC examples in Getting Started with Analog Signal Conditioning (OPAMP) (TB3286), show how the OPAMP can be used on the AVR DB family of microcontrollers.The OPAMP peripheral features up to three internal operational amplifiers.",
"ide": {
"name": "MPLAB X",
- "semverRange": ">=5.40.0"
+ "semverRange": ">=6.20.0"
},
"compiler": [
{
"name": "XC8",
- "semverRange": "^2.30.0"
+ "semverRange": "^2.50.0"
}
],
"dfp": {
"name": "AVR-Dx_DFP",
- "semverRange": "^1.4.75"
+ "semverRange": "^2.6.303"
},
"configurator": {
"name": "MCC",
- "semverRange": ">=4.0.0"
+ "semverRange": ">=5.5.1"
},
"device": {
"metaDataVersion": "1.0.0",
@@ -36,45 +36,12 @@
"versionRange": "*"
}
},
- "author": "Martin Mostad",
- "subcategories": [
- [
- "Peripherals",
- "OPAMP"
- ],
- [
- "Peripherals",
- "ADC"
- ],
- [
- "Peripherals",
- "DAC"
- ],
- [
- "Development Kit",
- "AVR128DB48 Curiosity Nano"
- ],
- [
- "Supporting Tools",
- "MPLAB Data Visualizer"
- ],
- [
- "Supporting Tools",
- "MPLAB Mindi"
- ]
- ],
- "peripherals": [
- "OPAMP",
- "ADC",
- "DAC"
- ],
+ "author": "Microchip",
+ "peripherals": ["OPAMP", "DAC", "ADC", "TCB", "RTC", "USART"],
"keywords": [
- "Analog Signal Conditioning",
"Getting Started",
"Digital-to-Analog Converter",
"Resistor Ladder",
- "Adjustable Gain",
- "Programmable Gain",
"Operational Amplifier",
"Op Amp",
"Simulation",
@@ -84,12 +51,7 @@
"Battery Monitoring",
"Programmable Gain Amplifier",
"PGA",
- "Differential Amplifier",
- "Instrumentation Amplifier",
- "Wheatstone Bridge",
- "AVR-DB",
- "AVRDB",
- "getting-started-with-opamp"
+ "Data Streamer"
],
"additionalData": {
"longDescription": {
diff --git a/README.md b/README.md
index 51a094c..d7fa49f 100644
--- a/README.md
+++ b/README.md
@@ -3,36 +3,38 @@
# Getting Started with Analog Signal Conditioning (OPAMP)
-The Analog Signal Conditioning (OPAMP) peripheral features up to three internal operational amplifiers (op amps). The op amps can be configured to a multitude of different operations using internal multiplexers and resistor laders
+The Analog Signal Conditioning (OPAMP) peripheral features up to three internal operational amplifiers (op amps). The op amps can be configured to a multitude of different operations using internal multiplexers and resistor ladders.
-The main purpose of op amps is to condition the analog signals before acquisition in a microcontroller or to provide the necessary output drive in control applications
+The main purpose of op amps is to condition the analog signals before acquisition in a microcontroller or to provide the necessary output drive in control applications.
-These examples show the following configurations of the OPAMP peripheral on the AVR DB family of microcontrollers:
+These examples show the following configurations of the OPAMP peripheral on the AVR® DB family of microcontrollers:
* **Voltage Follower:**
-OP0 is configured as an voltage follower
+OP0 is configured as a voltage follower
* **Non-Inverting PGA:**
OP0 is configured as a non-inverting PGA
* **Differential Amplifier:**
-OP0 and OP1 are combined to create a differential amplifier
+OP0 and OP1 are combined to create a differential amplifier
* **Instrumentation Amplifier:**
OP0, OP1 and OP2 are combined to create an instrumentation amplifier
## Related Documentation
-* [TB3286 - Getting Started with Analog Signal Conditioning (OPAMP)](https://microchip.com/DS90003286)
+* [TB3286 - Getting Started With Analog Signal Conditioning (OPAMP)](https://microchip.com/DS90003286)
* [AVR128DB48 Device Page](https://www.microchip.com/wwwproducts/en/AVR128DB48)
* [AVR128DB48 Curiosity Nano User Guide](https://www.microchip.com/DS50003037)
## Software Used
-* [MPLAB® X IDE](https://www.microchip.com/mplab/mplab-x-ide) 5.40 or later
-* [MPLAB® Code Configurator (MCC)](https://www.microchip.com/mplab/mplab-code-configurator) 4.0.0 or later
-* MPLAB AVR-Dx_DFP version 1.4.75 or later
-* For the Atmel Start version of these projects, please go to [this repository](https://github.com/microchip-pic-avr-examples/avr128db48-getting-started-with-opamp-studio-start)
+* [MPLAB® X IDE](https://www.microchip.com/mplab/mplab-x-ide) v6.20 or later
+* [MPLAB® Code Configurator (MCC)](https://www.microchip.com/mplab/mplab-code-configurator) v5.5.1 or later
+* [MPLAB® XC8](http://www.microchip.com/mplab/compilers) v2.50 or later
+* MPLAB® AVR-Dx_DFP v2.6.303 or later
+* [MPLAB® Data Visualizer Stand alone](https://www.microchip.com/mplab/mplab-data-visualizer) v1.3.1677 or later
+* For the Atmel Start version of these projects, please refer to [this repository](https://github.com/microchip-pic-avr-examples/avr128db48-getting-started-with-opamp-studio-start)
## Hardware Used
@@ -40,17 +42,17 @@ OP0, OP1 and OP2 are combined to create an instrumentation amplifier
## Setup
-All examples can be completed using the AVR128DB48 Curiosity Nano without any extra components
+All examples can be completed using the AVR128DB48 Curiosity Nano without any extra components.
## Operation
* Connect the AVR128DB48 Curiosity Nano to a computer using a USB cable
* Clone the repository or download the zip to get the source code
-* Open the .X projects with MPLAB
-* Press *Make and Program Device* to run the example
-* To reconfigure the example press *MPLAB® Code Configurator*, reconfigure the project and then press *Generate*
+* Open the `.X` projects with MPLAB
+* Press **Make and Program Device** to run the example
+* To reconfigure the example press **MPLAB® Code Configurator**, reconfigure the project and then press **Generate**
## Conclusion
-After going through these examples you should have a better understanding of how to configure the the OPAMP peripheral to achieve different modes of operation.
+These examples facilitate a better understanding of how to configure the the OPAMP peripheral to achieve different modes of operation.
diff --git a/data-visualizer/differential-amplifier.json b/data-visualizer/differential-amplifier.json
index caa6046..61796aa 100644
--- a/data-visualizer/differential-amplifier.json
+++ b/data-visualizer/differential-amplifier.json
@@ -1 +1 @@
-{"scheme":2,"settings":{"chart":{"panels":{"primary-graph":{"cursors":[],"trackSizes":{"vertical":[],"horizontal":[]}}},"axisProps":{"9f4944ca-04af-4cf8-9dac-3e55ba84894a":{"panelId":"primary-graph","active":false,"offset":-511,"scale":1020,"type":"data"},"74f1d19a-2ebe-4137-a4f6-ee05c6d2ae00":{"panelId":"primary-graph","active":false,"offset":-511,"scale":1020,"type":"data"},"primary-graph":{"panelId":"primary-graph","active":true,"offset":4539.114441643243,"scale":0.11841535675830528,"type":"time"}},"axisPositions":{"9f4944ca-04af-4cf8-9dac-3e55ba84894a":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"74f1d19a-2ebe-4137-a4f6-ee05c6d2ae00":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"primary-graph":{"panelId":"primary-graph","orientation":"horizontal","alignment":"after","track":0,"order":0}},"plotProps":{"f6198e62-9287-4eac-9cfc-b8d482443f4b":{"panelId":"primary-graph","sourceId":"decoder-2b02e2f0-911d-11ea-8339-0319212e835d$diff_input","color":"#f44e3b","lineMode":"linear"},"ba015a6f-9b21-4757-a109-f66fe67cc9fc":{"panelId":"primary-graph","sourceId":"decoder-2b02e2f0-911d-11ea-8339-0319212e835d$diff_output","color":"#a4dd00","lineMode":"linear"}},"plotPositions":{"f6198e62-9287-4eac-9cfc-b8d482443f4b":{"panelId":"primary-graph","hAxes":[],"vAxes":["9f4944ca-04af-4cf8-9dac-3e55ba84894a"]},"ba015a6f-9b21-4757-a109-f66fe67cc9fc":{"panelId":"primary-graph","hAxes":[],"vAxes":["74f1d19a-2ebe-4137-a4f6-ee05c6d2ae00"]}},"cursorProps":{},"inspector":{"enabled":true,"yPosition":31},"activeDataAxisId":"74f1d19a-2ebe-4137-a4f6-ee05c6d2ae00","prevColorChoiceIndex":-1},"terminal":{"characterSet":"iso-8859-1","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"sidebars":{"left.sidebar":{"id":"left.sidebar","visible":true},"right.sidebar":{"id":"right.sidebar","visible":true}},"panels":{"connections.panel":{"id":"connections.panel","open":true},"connection.options.panel":{"id":"connection.options.panel","open":true}},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM27":{"id":"COM27","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}},"COM10":{"id":"COM10","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"":{"fields":[{"id":"$diff_input","name":"diff_input","type":1,"offset":0},{"id":"$diff_output","name":"diff_output","type":1,"offset":2}],"id":"","name":"Decoder 1","frame":{"mode":{"label":"Auto","id":"auto"},"startOfFrame":0}}}},"protocols":{"byId":{"decoder-2b02e2f0-911d-11ea-8339-0319212e835d":{"fields":[{"id":"$diff_input","name":"diff_input","offset":0,"type":1},{"id":"$diff_output","name":"diff_output","offset":2,"type":1}],"frame":{"mode":"auto","startOfFrame":0},"id":"decoder-2b02e2f0-911d-11ea-8339-0319212e835d","name":"Decoder 1","outputs":["decoder-2b02e2f0-911d-11ea-8339-0319212e835d$diff_output","decoder-2b02e2f0-911d-11ea-8339-0319212e835d$diff_input"]}},"shapeSelection":{"decoder-2b02e2f0-911d-11ea-8339-0319212e835d":""},"statisticsById":{"decoder-2b02e2f0-911d-11ea-8339-0319212e835d":{"discardedByteCount":2,"decodedFrameCount":17374,"decodeRate":808,"hasProtocolMismatch":false}}},"links":{"byId":{"e54ae7e0-b146-11ea-9e0b-addb9980769c":{"sourceId":"COM10","sinkId":"decoder-2b02e2f0-911d-11ea-8339-0319212e835d"}}}}}
+{"scheme":6,"settings":{"charts":{"byId":{"primary-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"15":{"type":"data","scale":512,"offset":-128,"active":true},"primary-graph":{"type":"time","scale":0.10308655552921664,"offset":587.0803539444768,"active":false}},"axisPositions":{"15":{"orientation":"vertical","track":0,"alignment":"before","order":0},"primary-graph":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"16":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$diff_input","lineMode":"linear","color":"#d13913","hidden":false},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$diff_output","lineMode":"linear","color":"#b9d26e","hidden":false}},"plotPositions":{"16":{"hAxes":[],"vAxes":["15"]},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"hAxes":[],"vAxes":["15"]}},"activeDataAxisId":"15","cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":0},"xy-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"17":{"type":"data","scale":256,"offset":0,"active":true},"18":{"type":"data","scale":256,"offset":0,"active":true}},"axisPositions":{"17":{"orientation":"vertical","track":0,"alignment":"before","order":0},"18":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"19":{"sourceId":"","lineMode":"linear","color":"#009ce0"},"20":{"sourceId":"","lineMode":"linear","color":"#009ce0"}},"plotPositions":{"19":{"hAxes":[],"vAxes":["17"]},"20":{"hAxes":["18"],"vAxes":[]}},"cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":-1}}},"terminal":{"characterSet":"iso-8859-1","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"panels":{"layout":{"type":"row","id":"#01b3ab14-526a-40a8-9782-80e2c18d31c1","children":[{"type":"row","id":"topColumn","children":[{"type":"tabset","id":"upper-tabset","children":[{"type":"tab","id":"graph","name":"Time Plot","component":"graph","config":{"id":"primary-graph","split":{"aWeight":0.75,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"dashboard","name":"Dashboard","component":"dashboard","config":{"split":{"aWeight":0.75}},"enableClose":true}],"active":true},{"type":"tabset","id":"lower-tabset","children":[{"type":"tab","id":"terminal","name":"Terminal","component":"terminal","config":{"split":{"aWeight":0.75}},"enableClose":true},{"type":"tab","id":"xy","name":"XY Plot","component":"xy","config":{"id":"xy-graph","split":{"aWeight":0.75}},"enableClose":true}]}]}]},"borders":[{"type":"border","selected":1,"size":275,"location":"left","children":[{"type":"tab","id":"connections","name":"Connections","component":"connections","config":{"split":{"aMaximized":true}},"enableClose":false},{"type":"tab","id":"streamers","name":"Variable Streamers","component":"streamers","config":{"split":{"aWeight":0.47619047619047616,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"templates","name":"Dashboard Widgets","component":"templates","config":{"split":{"aMaximized":true}},"enableClose":true}]}]},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM9":{"id":"COM9","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"624":{"frames":[{"fields":[{"id":"$diff_input","name":"diff_input","type":1,"offset":0},{"id":"$diff_output","name":"diff_output","type":1,"offset":2}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"name":"frame"}],"id":"624","name":"data_stream"}}},"protocols":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","name":"data_stream","type":"DataStreamProtocol","specific":{"auto-config-enabled":1},"settingsModel":[{"name":"auto-config-enabled","label":"Auto-config enabled","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}],"statusFields":{},"statusModel":[],"statisticsModel":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}],"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:Auto-configure":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}]},"outputs":["decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame"],"connected":false,"streaming":true,"frames":[{"name":"frame","fields":[{"id":"$diff_input","name":"diff_input","offset":0,"type":1,"expressionString":null},{"id":"$diff_output","name":"diff_output","offset":2,"type":1,"expressionString":null}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"columns":[],"fieldLimit":-1},{"name":"Auto-configure","fields":[],"mode":{"label":"Ones' Complement","id":"ones-complement"},"startOfFrame":95,"columns":[],"fieldLimit":-1}]}},"shapeSelection":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":"624"},"symbolsById":{}},"links":{"byId":{"5e6cda60-95eb-11ef-8507-9da600d12108":{"sourceId":"COM9","sinkId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108"}}},"pluginSettings":{"byId":{}},"dashboards":{"byId":{}},"autoConfig":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","props":{"search-path":"C:\\Users\\x55792\\MPLABXProjects\\avr128db48-getting-started-with-opamp-mplab-mcc\\voltage-follower.X","search-path-override":false,"recursive-search":1,"status":"INITIAL","maximize-dashboard":1},"type":"streamer","settingsModel":[{"name":"search-path","label":"Search path","tip":null,"type":"filepath","units":"","min":null,"max":null,"options":[]},{"name":"recursive-search","label":"Recursive search","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]},{"name":"maximize-dashboard","label":"Maximize dashboard","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}]}}}}}
\ No newline at end of file
diff --git a/data-visualizer/instrumentation-amplifier.json b/data-visualizer/instrumentation-amplifier.json
index b05bce3..c94af66 100644
--- a/data-visualizer/instrumentation-amplifier.json
+++ b/data-visualizer/instrumentation-amplifier.json
@@ -1 +1 @@
-{"scheme":2,"settings":{"chart":{"panels":{"primary-graph":{"cursors":[]}},"axisProps":{"01ac7941-a5e7-46fd-ab15-411719569eca":{"panelId":"primary-graph","active":false,"offset":0,"scale":3300,"type":"data"},"df84fd6c-5a67-4a92-815f-e21d2cb98942":{"panelId":"primary-graph","active":false,"offset":0,"scale":3300,"type":"data"},"primary-graph":{"panelId":"primary-graph","active":true,"offset":188.4618358489687,"scale":0.2720470510312225,"type":"time"}},"axisPositions":{"01ac7941-a5e7-46fd-ab15-411719569eca":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"df84fd6c-5a67-4a92-815f-e21d2cb98942":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"primary-graph":{"panelId":"primary-graph","orientation":"horizontal","alignment":"after","track":0,"order":0}},"plotProps":{"8e18288e-418d-4bd5-a325-4f46292097d4":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Differential Input","color":"#f44e3b","lineMode":"linear"},"552e5a74-8e29-4a0a-a874-1a02f83ff62c":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Instrumentation Amplifier (OUT)","color":"#a4dd00","lineMode":"linear"}},"plotPositions":{"8e18288e-418d-4bd5-a325-4f46292097d4":{"panelId":"primary-graph","hAxes":[],"vAxes":["01ac7941-a5e7-46fd-ab15-411719569eca"]},"552e5a74-8e29-4a0a-a874-1a02f83ff62c":{"panelId":"primary-graph","hAxes":[],"vAxes":["df84fd6c-5a67-4a92-815f-e21d2cb98942"]}},"cursorProps":{},"inspector":{"enabled":true,"yPosition":30},"activeDataAxisId":"01ac7941-a5e7-46fd-ab15-411719569eca","prevColorChoiceIndex":-1},"terminal":{"sourceId":"","characterSet":"hex","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"sidebars":{"left.sidebar":{"id":"left.sidebar","visible":true},"right.sidebar":{"id":"right.sidebar","visible":true}},"panels":{"connections.panel":{"id":"connections.panel","open":true},"connection.options.panel":{"id":"connection.options.panel","open":true}},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM27":{"id":"COM27","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}},"COM10":{"id":"COM10","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"":{"fields":[{"id":"$Differential Input","name":"Differential Input","type":4,"offset":0},{"id":"$Instrumentation Amplifier (OUT)","name":"Instrumentation Amplifier (OUT)","type":4,"offset":2}],"id":"","name":"Decoder 1","frame":{"mode":{"label":"Auto","id":"auto"},"startOfFrame":0}}}},"protocols":{"byId":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"fields":[{"id":"$Differential Input","name":"Differential Input","offset":0,"type":4},{"id":"$Instrumentation Amplifier (OUT)","name":"Instrumentation Amplifier (OUT)","offset":2,"type":4}],"frame":{"mode":"auto","startOfFrame":0},"id":"decoder-e8151bb0-5973-11ea-907c-eb810a612336","name":"Decoder 1","outputs":["decoder-e8151bb0-5973-11ea-907c-eb810a612336$Instrumentation Amplifier (OUT)","decoder-e8151bb0-5973-11ea-907c-eb810a612336$Differential Input"]}},"shapeSelection":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":""},"statisticsById":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"discardedByteCount":4,"decodedFrameCount":2800,"decodeRate":844,"hasProtocolMismatch":false}}},"links":{"byId":{"13ae2510-b13e-11ea-b36e-6d4a2a65c573":{"sourceId":"COM10","sinkId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336"}}}}}
+{"scheme":6,"settings":{"charts":{"byId":{"primary-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"15":{"type":"data","scale":512,"offset":-128,"active":true},"primary-graph":{"type":"time","scale":0.10308655552921664,"offset":838.9662837444797,"active":false}},"axisPositions":{"15":{"orientation":"vertical","track":0,"alignment":"before","order":0},"primary-graph":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"16":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$diff_input","lineMode":"linear","color":"#d13913","hidden":false},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$opampVal","lineMode":"linear","color":"#b9d26e","hidden":false}},"plotPositions":{"16":{"hAxes":[],"vAxes":["15"]},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"hAxes":[],"vAxes":["15"]}},"activeDataAxisId":"15","cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":0},"xy-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"17":{"type":"data","scale":256,"offset":0,"active":true},"18":{"type":"data","scale":256,"offset":0,"active":true}},"axisPositions":{"17":{"orientation":"vertical","track":0,"alignment":"before","order":0},"18":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"19":{"sourceId":"","lineMode":"linear","color":"#009ce0"},"20":{"sourceId":"","lineMode":"linear","color":"#009ce0"}},"plotPositions":{"19":{"hAxes":[],"vAxes":["17"]},"20":{"hAxes":["18"],"vAxes":[]}},"cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":-1}}},"terminal":{"characterSet":"iso-8859-1","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"panels":{"layout":{"type":"row","id":"#01b3ab14-526a-40a8-9782-80e2c18d31c1","children":[{"type":"row","id":"topColumn","children":[{"type":"tabset","id":"upper-tabset","children":[{"type":"tab","id":"graph","name":"Time Plot","component":"graph","config":{"id":"primary-graph","split":{"aWeight":0.75,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"dashboard","name":"Dashboard","component":"dashboard","config":{"split":{"aWeight":0.75}},"enableClose":true}],"active":true},{"type":"tabset","id":"lower-tabset","children":[{"type":"tab","id":"terminal","name":"Terminal","component":"terminal","config":{"split":{"aWeight":0.75}},"enableClose":true},{"type":"tab","id":"xy","name":"XY Plot","component":"xy","config":{"id":"xy-graph","split":{"aWeight":0.75}},"enableClose":true}]}]}]},"borders":[{"type":"border","selected":1,"size":275,"location":"left","children":[{"type":"tab","id":"connections","name":"Connections","component":"connections","config":{"split":{"aMaximized":true}},"enableClose":false},{"type":"tab","id":"streamers","name":"Variable Streamers","component":"streamers","config":{"split":{"aWeight":0.47619047619047616,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"templates","name":"Dashboard Widgets","component":"templates","config":{"split":{"aMaximized":true}},"enableClose":true}]}]},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM9":{"id":"COM9","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"624":{"frames":[{"fields":[{"id":"$diff_input","name":"diff_input","type":1,"offset":0},{"id":"$opampVal","name":"opampVal","type":1,"offset":2}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"name":"frame"}],"id":"624","name":"data_stream"}}},"protocols":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","name":"data_stream","type":"DataStreamProtocol","specific":{"auto-config-enabled":1},"settingsModel":[{"name":"auto-config-enabled","label":"Auto-config enabled","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}],"statusFields":{},"statusModel":[],"statisticsModel":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}],"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:Auto-configure":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}]},"outputs":["decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame"],"connected":false,"streaming":true,"frames":[{"name":"frame","fields":[{"id":"$diff_input","name":"diff_input","offset":0,"type":1,"expressionString":null},{"id":"$opampVal","name":"opampVal","offset":2,"type":1,"expressionString":null}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"columns":[],"fieldLimit":-1},{"name":"Auto-configure","fields":[],"mode":{"label":"Ones' Complement","id":"ones-complement"},"startOfFrame":95,"columns":[],"fieldLimit":-1}]}},"shapeSelection":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":"624"},"symbolsById":{}},"links":{"byId":{"5e6cda60-95eb-11ef-8507-9da600d12108":{"sourceId":"COM9","sinkId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108"}}},"pluginSettings":{"byId":{}},"dashboards":{"byId":{}},"autoConfig":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","props":{"search-path":"C:\\Users\\x55792\\MPLABXProjects\\avr128db48-getting-started-with-opamp-mplab-mcc\\instrumentation-amplifier.X","search-path-override":false,"recursive-search":1,"status":"INITIAL","maximize-dashboard":1},"type":"streamer","settingsModel":[{"name":"search-path","label":"Search path","tip":null,"type":"filepath","units":"","min":null,"max":null,"options":[]},{"name":"recursive-search","label":"Recursive search","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]},{"name":"maximize-dashboard","label":"Maximize dashboard","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}]}}}}}
\ No newline at end of file
diff --git a/data-visualizer/non-inverting-pga.json b/data-visualizer/non-inverting-pga.json
index 8ae5fc5..1ae8cf8 100644
--- a/data-visualizer/non-inverting-pga.json
+++ b/data-visualizer/non-inverting-pga.json
@@ -1 +1 @@
-{"scheme":2,"settings":{"chart":{"panels":{"primary-graph":{"cursors":["0ab90de2-039e-4448-ae60-26b681271b90","17e1e5f4-a327-403a-bab6-67a99550b915"]}},"axisProps":{"01ac7941-a5e7-46fd-ab15-411719569eca":{"panelId":"primary-graph","active":false,"offset":0,"scale":776,"type":"data"},"df84fd6c-5a67-4a92-815f-e21d2cb98942":{"panelId":"primary-graph","active":false,"offset":0,"scale":776,"type":"data"},"primary-graph":{"panelId":"primary-graph","active":true,"offset":33.50045464324047,"scale":0.11841535675921477,"type":"time"}},"axisPositions":{"01ac7941-a5e7-46fd-ab15-411719569eca":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"df84fd6c-5a67-4a92-815f-e21d2cb98942":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"primary-graph":{"panelId":"primary-graph","orientation":"horizontal","alignment":"after","track":0,"order":0}},"plotProps":{"8e18288e-418d-4bd5-a325-4f46292097d4":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Waveform Generator (DAC)","color":"#f44e3b","lineMode":"linear"},"552e5a74-8e29-4a0a-a874-1a02f83ff62c":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Non Inverting PGA (OPAMP)","color":"#a4dd00","lineMode":"linear"}},"plotPositions":{"8e18288e-418d-4bd5-a325-4f46292097d4":{"panelId":"primary-graph","hAxes":[],"vAxes":["01ac7941-a5e7-46fd-ab15-411719569eca"]},"552e5a74-8e29-4a0a-a874-1a02f83ff62c":{"panelId":"primary-graph","hAxes":[],"vAxes":["df84fd6c-5a67-4a92-815f-e21d2cb98942"]}},"cursorProps":{"0ab90de2-039e-4448-ae60-26b681271b90":{"panelId":"primary-graph","tag":"A","anchor":"domain","color":"#00F","offset":2577.4138224912617},"17e1e5f4-a327-403a-bab6-67a99550b915":{"panelId":"primary-graph","tag":"B","anchor":"domain","color":"#00F","offset":2577.433860545186}},"inspector":{"enabled":true,"yPosition":30},"activeDataAxisId":"df84fd6c-5a67-4a92-815f-e21d2cb98942","prevColorChoiceIndex":-1},"terminal":{"sourceId":"","characterSet":"hex","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"sidebars":{"left.sidebar":{"id":"left.sidebar","visible":true},"right.sidebar":{"id":"right.sidebar","visible":true}},"panels":{"connections.panel":{"id":"connections.panel","open":true},"connection.options.panel":{"id":"connection.options.panel","open":true}},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM27":{"id":"COM27","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}},"COM10":{"id":"COM10","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"":{"fields":[{"id":"$Waveform Generator (DAC)","name":"Waveform Generator (DAC)","type":4,"offset":0},{"id":"$Non Inverting PGA (OPAMP)","name":"Non Inverting PGA (OPAMP)","type":4,"offset":2}],"id":"","name":"Decoder 1","frame":{"mode":{"label":"Auto","id":"auto"},"startOfFrame":0}}}},"protocols":{"byId":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"fields":[{"id":"$Waveform Generator (DAC)","name":"Waveform Generator (DAC)","offset":0,"type":4},{"id":"$Non Inverting PGA (OPAMP)","name":"Non Inverting PGA (OPAMP)","offset":2,"type":4}],"frame":{"mode":"auto","startOfFrame":0},"id":"decoder-e8151bb0-5973-11ea-907c-eb810a612336","name":"Decoder 1","outputs":["decoder-e8151bb0-5973-11ea-907c-eb810a612336$Waveform Generator (DAC)","decoder-e8151bb0-5973-11ea-907c-eb810a612336$Non Inverting PGA (OPAMP)"]}},"shapeSelection":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":""},"statisticsById":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"discardedByteCount":7,"decodedFrameCount":38697,"decodeRate":1536,"hasProtocolMismatch":false}}},"links":{"byId":{"3783c1f0-b13b-11ea-a389-d1ee963536ba":{"sinkId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336","sourceId":"COM10"}}}}}
+{"scheme":6,"settings":{"charts":{"byId":{"primary-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"15":{"type":"data","scale":512,"offset":-128,"active":true},"primary-graph":{"type":"time","scale":0.11800000000005184,"offset":1007.277253899991,"active":false}},"axisPositions":{"15":{"orientation":"vertical","track":0,"alignment":"before","order":0},"primary-graph":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"16":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$dacVal","lineMode":"linear","color":"#d13913","hidden":false},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$opampVal","lineMode":"linear","color":"#b9d26e","hidden":false}},"plotPositions":{"16":{"hAxes":[],"vAxes":["15"]},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"hAxes":[],"vAxes":["15"]}},"activeDataAxisId":"15","cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":0},"xy-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"17":{"type":"data","scale":256,"offset":0,"active":true},"18":{"type":"data","scale":256,"offset":0,"active":true}},"axisPositions":{"17":{"orientation":"vertical","track":0,"alignment":"before","order":0},"18":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"19":{"sourceId":"","lineMode":"linear","color":"#009ce0"},"20":{"sourceId":"","lineMode":"linear","color":"#009ce0"}},"plotPositions":{"19":{"hAxes":[],"vAxes":["17"]},"20":{"hAxes":["18"],"vAxes":[]}},"cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":-1}}},"terminal":{"characterSet":"iso-8859-1","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"panels":{"layout":{"type":"row","id":"#01b3ab14-526a-40a8-9782-80e2c18d31c1","children":[{"type":"row","id":"topColumn","children":[{"type":"tabset","id":"upper-tabset","children":[{"type":"tab","id":"graph","name":"Time Plot","component":"graph","config":{"id":"primary-graph","split":{"aWeight":0.75,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"dashboard","name":"Dashboard","component":"dashboard","config":{"split":{"aWeight":0.75}},"enableClose":true}],"active":true},{"type":"tabset","id":"lower-tabset","children":[{"type":"tab","id":"terminal","name":"Terminal","component":"terminal","config":{"split":{"aWeight":0.75}},"enableClose":true},{"type":"tab","id":"xy","name":"XY Plot","component":"xy","config":{"id":"xy-graph","split":{"aWeight":0.75}},"enableClose":true}]}]}]},"borders":[{"type":"border","selected":1,"size":275,"location":"left","children":[{"type":"tab","id":"connections","name":"Connections","component":"connections","config":{"split":{"aMaximized":true}},"enableClose":false},{"type":"tab","id":"streamers","name":"Variable Streamers","component":"streamers","config":{"split":{"aWeight":0.47619047619047616,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"templates","name":"Dashboard Widgets","component":"templates","config":{"split":{"aMaximized":true}},"enableClose":true}]}]},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM9":{"id":"COM9","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"624":{"frames":[{"fields":[{"id":"$dacVal","name":"dacVal","type":4,"offset":0},{"id":"$opampVal","name":"opampVal","type":4,"offset":2}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"name":"frame"}],"id":"624","name":"data_stream"}}},"protocols":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","name":"data_stream","type":"DataStreamProtocol","specific":{"auto-config-enabled":1},"settingsModel":[{"name":"auto-config-enabled","label":"Auto-config enabled","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}],"statusFields":{},"statusModel":[],"statisticsModel":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}],"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:Auto-configure":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}]},"outputs":["decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame"],"connected":false,"streaming":true,"frames":[{"name":"frame","fields":[{"id":"$dacVal","name":"dacVal","offset":0,"type":4,"expressionString":null},{"id":"$opampVal","name":"opampVal","offset":2,"type":4,"expressionString":null}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"columns":[],"fieldLimit":-1},{"name":"Auto-configure","fields":[],"mode":{"label":"Ones' Complement","id":"ones-complement"},"startOfFrame":95,"columns":[],"fieldLimit":-1}]}},"shapeSelection":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":"624"},"symbolsById":{}},"links":{"byId":{"5e6cda60-95eb-11ef-8507-9da600d12108":{"sourceId":"COM9","sinkId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108"}}},"pluginSettings":{"byId":{}},"dashboards":{"byId":{}},"autoConfig":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","props":{"search-path":"C:\\Users\\x55792\\MPLABXProjects\\avr128db48-getting-started-with-opamp-mplab-mcc\\non-inverting-pga.X","search-path-override":false,"recursive-search":1,"status":"INITIAL","maximize-dashboard":1},"type":"streamer","settingsModel":[{"name":"search-path","label":"Search path","tip":null,"type":"filepath","units":"","min":null,"max":null,"options":[]},{"name":"recursive-search","label":"Recursive search","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]},{"name":"maximize-dashboard","label":"Maximize dashboard","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}]}}}}}
\ No newline at end of file
diff --git a/data-visualizer/voltage-follower.json b/data-visualizer/voltage-follower.json
index 81e874b..2a0fb77 100644
--- a/data-visualizer/voltage-follower.json
+++ b/data-visualizer/voltage-follower.json
@@ -1 +1 @@
-{"scheme":2,"settings":{"chart":{"panels":{"primary-graph":{"cursors":[]}},"axisProps":{"5dcb7c87-2c03-4070-92ac-0e59d6c011e4":{"panelId":"primary-graph","active":false,"offset":0,"scale":511.99999999999784,"type":"data"},"8cbdcc2e-f7a9-4c2a-aaa0-50856e26bf9a":{"panelId":"primary-graph","active":false,"offset":0,"scale":512,"type":"data"},"primary-graph":{"panelId":"primary-graph","active":true,"offset":3352.7735294248,"scale":0.08974205898414304,"type":"time"}},"axisPositions":{"5dcb7c87-2c03-4070-92ac-0e59d6c011e4":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"8cbdcc2e-f7a9-4c2a-aaa0-50856e26bf9a":{"panelId":"primary-graph","orientation":"vertical","alignment":"before","track":0,"order":0},"primary-graph":{"panelId":"primary-graph","orientation":"horizontal","alignment":"after","track":0,"order":0}},"plotProps":{"94bde793-6045-4342-9893-653269492c8c":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Waveform Generator (DAC)","color":"#f44e3b","lineMode":"linear"},"b8fb0417-f29c-426d-acc8-e78b508c518e":{"panelId":"primary-graph","sourceId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336$Voltage Follower (OPAMP)","color":"#a4dd00","lineMode":"linear"}},"plotPositions":{"94bde793-6045-4342-9893-653269492c8c":{"panelId":"primary-graph","hAxes":[],"vAxes":["5dcb7c87-2c03-4070-92ac-0e59d6c011e4"]},"b8fb0417-f29c-426d-acc8-e78b508c518e":{"panelId":"primary-graph","hAxes":[],"vAxes":["8cbdcc2e-f7a9-4c2a-aaa0-50856e26bf9a"]}},"cursorProps":{},"inspector":{"enabled":true,"yPosition":30},"activeDataAxisId":"5dcb7c87-2c03-4070-92ac-0e59d6c011e4","prevColorChoiceIndex":-1},"terminal":{"sourceId":"","characterSet":"hex","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"","terminalDirty":false},"ui":{"sidebars":{"left.sidebar":{"id":"left.sidebar","visible":true},"right.sidebar":{"id":"right.sidebar","visible":true}},"panels":{"connections.panel":{"id":"connections.panel","open":true},"connection.options.panel":{"id":"connection.options.panel","open":true}},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM27":{"id":"COM27","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}},"COM10":{"id":"COM10","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"":{"fields":[{"id":"$Waveform Generator (DAC)","name":"Waveform Generator (DAC)","type":4,"offset":0},{"id":"$Voltage Follower (OPAMP)","name":"Voltage Follower (OPAMP)","type":4,"offset":2}],"id":"","name":"Decoder 1","frame":{"mode":{"label":"Auto","id":"auto"},"startOfFrame":0}}}},"protocols":{"byId":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"fields":[{"id":"$Waveform Generator (DAC)","name":"Waveform Generator (DAC)","offset":0,"type":4},{"id":"$Voltage Follower (OPAMP)","name":"Voltage Follower (OPAMP)","offset":2,"type":4}],"frame":{"mode":"auto","startOfFrame":0},"id":"decoder-e8151bb0-5973-11ea-907c-eb810a612336","name":"Decoder 1","outputs":["decoder-e8151bb0-5973-11ea-907c-eb810a612336$Waveform Generator (DAC)","decoder-e8151bb0-5973-11ea-907c-eb810a612336$Voltage Follower (OPAMP)"]}},"shapeSelection":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":""},"statisticsById":{"decoder-e8151bb0-5973-11ea-907c-eb810a612336":{"discardedByteCount":18,"decodedFrameCount":161913,"decodeRate":808,"hasProtocolMismatch":false}}},"links":{"byId":{"cfff8270-b145-11ea-b36e-6d4a2a65c573":{"sourceId":"COM10","sinkId":"decoder-e8151bb0-5973-11ea-907c-eb810a612336"}}}}}
+{"scheme":6,"settings":{"charts":{"byId":{"primary-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"15":{"type":"data","scale":512,"offset":-128,"active":true},"primary-graph":{"type":"time","scale":0.10308655552921664,"offset":587.0803539444768,"active":false}},"axisPositions":{"15":{"orientation":"vertical","track":0,"alignment":"before","order":0},"primary-graph":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"16":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$dacVal","lineMode":"linear","color":"#d13913","hidden":false},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"sourceId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame$opampVal","lineMode":"linear","color":"#b9d26e","hidden":false}},"plotPositions":{"16":{"hAxes":[],"vAxes":["15"]},"9bef46bd-6d49-46af-ac6e-e1bf3eb2c731":{"hAxes":[],"vAxes":["15"]}},"activeDataAxisId":"15","cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":0},"xy-graph":{"panel":{"cursors":[],"trackSizes":{"horizontal":[],"vertical":[]}},"axisProps":{"17":{"type":"data","scale":256,"offset":0,"active":true},"18":{"type":"data","scale":256,"offset":0,"active":true}},"axisPositions":{"17":{"orientation":"vertical","track":0,"alignment":"before","order":0},"18":{"orientation":"horizontal","track":0,"alignment":"after","order":0}},"plotProps":{"19":{"sourceId":"","lineMode":"linear","color":"#009ce0"},"20":{"sourceId":"","lineMode":"linear","color":"#009ce0"}},"plotPositions":{"19":{"hAxes":[],"vAxes":["17"]},"20":{"hAxes":["18"],"vAxes":[]}},"cursorProps":{},"inspector":{"enabled":true},"powerAnalysis":{"enabled":false},"prevColorChoiceIndex":-1}}},"terminal":{"characterSet":"iso-8859-1","filterControlChars":false,"hexMode":false,"echo":true,"lineEnd":"\r\n","terminalDirty":false},"ui":{"panels":{"layout":{"type":"row","id":"#01b3ab14-526a-40a8-9782-80e2c18d31c1","children":[{"type":"row","id":"topColumn","children":[{"type":"tabset","id":"upper-tabset","children":[{"type":"tab","id":"graph","name":"Time Plot","component":"graph","config":{"id":"primary-graph","split":{"aWeight":0.75,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"dashboard","name":"Dashboard","component":"dashboard","config":{"split":{"aWeight":0.75}},"enableClose":true}],"active":true},{"type":"tabset","id":"lower-tabset","children":[{"type":"tab","id":"terminal","name":"Terminal","component":"terminal","config":{"split":{"aWeight":0.75}},"enableClose":true},{"type":"tab","id":"xy","name":"XY Plot","component":"xy","config":{"id":"xy-graph","split":{"aWeight":0.75}},"enableClose":true}]}]}]},"borders":[{"type":"border","selected":1,"size":275,"location":"left","children":[{"type":"tab","id":"connections","name":"Connections","component":"connections","config":{"split":{"aMaximized":true}},"enableClose":false},{"type":"tab","id":"streamers","name":"Variable Streamers","component":"streamers","config":{"split":{"aWeight":0.47619047619047616,"aMaximized":false}},"enableClose":true},{"type":"tab","id":"templates","name":"Dashboard Widgets","component":"templates","config":{"split":{"aMaximized":true}},"enableClose":true}]}]},"dialogs":[],"darkTheme":true,"devMode":false},"sourceSettings":{"byId":{"COM9":{"id":"COM9","formValues":{"baudRate":115200,"charLength":8,"stopBits":0,"parity":0,"invalid":-1}}}},"protocolShapes":{"byId":{"624":{"frames":[{"fields":[{"id":"$dacVal","name":"dacVal","type":4,"offset":0},{"id":"$opampVal","name":"opampVal","type":4,"offset":2}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"name":"frame"}],"id":"624","name":"data_stream"}}},"protocols":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","name":"data_stream","type":"DataStreamProtocol","specific":{"auto-config-enabled":1},"settingsModel":[{"name":"auto-config-enabled","label":"Auto-config enabled","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}],"statusFields":{},"statusModel":[],"statisticsModel":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}],"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:Auto-configure":[{"name":"decoded-frame-count","label":"Frames received","tip":"The number of frames decoded","type":"number","units":"","min":null,"max":null,"options":[]},{"name":"decoded-rate","label":"Frame rate","tip":"The rate at which frames are being decoded","type":"number","units":"/s","min":null,"max":null,"options":[]},{"name":"valid-byte-count","label":"Accepted data","tip":"The number of valid bytes received by this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]},{"name":"discarded-byte-count","label":"Discarded data","tip":"The number of bytes discarded during decoding for this frame","type":"number","units":"bytes","min":null,"max":null,"options":[]}]},"outputs":["decoder-4c60a4f0-95eb-11ef-8507-9da600d12108:frame"],"connected":false,"streaming":true,"frames":[{"name":"frame","fields":[{"id":"$dacVal","name":"dacVal","offset":0,"type":4,"expressionString":null},{"id":"$opampVal","name":"opampVal","offset":2,"type":4,"expressionString":null}],"mode":{"label":"Auto","id":"auto"},"startOfFrame":0,"columns":[],"fieldLimit":-1},{"name":"Auto-configure","fields":[],"mode":{"label":"Ones' Complement","id":"ones-complement"},"startOfFrame":95,"columns":[],"fieldLimit":-1}]}},"shapeSelection":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":"624"},"symbolsById":{}},"links":{"byId":{"5e6cda60-95eb-11ef-8507-9da600d12108":{"sourceId":"COM9","sinkId":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108"}}},"pluginSettings":{"byId":{}},"dashboards":{"byId":{}},"autoConfig":{"byId":{"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108":{"id":"decoder-4c60a4f0-95eb-11ef-8507-9da600d12108","props":{"search-path":"C:\\Users\\x55792\\MPLABXProjects\\avr128db48-getting-started-with-opamp-mplab-mcc\\voltage-follower.X","search-path-override":false,"recursive-search":1,"status":"INITIAL","maximize-dashboard":1},"type":"streamer","settingsModel":[{"name":"search-path","label":"Search path","tip":null,"type":"filepath","units":"","min":null,"max":null,"options":[]},{"name":"recursive-search","label":"Recursive search","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]},{"name":"maximize-dashboard","label":"Maximize dashboard","tip":null,"type":"checkbox","units":"","min":0,"max":1,"options":[]}]}}}}}
\ No newline at end of file
diff --git a/differential-amplifier.X/MyConfig.mc3 b/differential-amplifier.X/MyConfig.mc3
deleted file mode 100644
index 69afef4..0000000
--- a/differential-amplifier.X/MyConfig.mc3
+++ /dev/null
@@ -1,11636 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 100
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- TCB0
-
-
-
- 14
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDD/2
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- -0.040%
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 86956
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 2V048
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN6
-
-
-
- 1
-
-
-
- true
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP5
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 100
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
- OP1OUT
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- 23
-
-
-
- false
-
-
-
- 127
-
-
-
- Output Driver in Normal Mode
-
-
-
- RTC Clock / 32
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- LINKOUT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampDual
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 129
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 4R, R2 = 12R, R2/R1 = 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- NORMAL
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3.0
-
-
-
- 0
-
-
-
- VDD as reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- VREF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN5
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- enabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 2.048V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 4 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 133
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 177
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DAC output
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 5
-
-
-
- 7
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- false
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- CLK_PEP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- Full Input Range
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Link OP[n-1] output
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 1
-
-
-
- 7
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 3.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 12
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 37
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 2
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 128
-
-
-
- 65
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 18
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- Positive input pin for OPn
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- DAC
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INPUT_DISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDiffAmp
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
-
-
-
-
- INT
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- 1
-
-
-
- ISR_RTC_PIT
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 2.048
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OUT
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- 2000000
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDDDIV2
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- opNonInvPGA
-
-
-
- enabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 1
-
-
-
- 41
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- false
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- true
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- alternate
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- VDD
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2.048
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\include\pin_manager.h
- 213bc7fe4fc3913591f48376acb91e2e75267ce9ba99ba685f09e406369f3dbd
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- 664cf731a1f6f8b93a46a4041733047d1a3e5fe9116d32fd7a43ea38838751f0
-
-
- mcc_generated_files\include\tcb1.h
- 9d0a32ab9318678859c15e3168e8cdeaeed8bbecceb9b3d2492760ddf6e8c004
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\pin_manager.c
- 97969a9a5d6d52e0d0ca5cfbf570fca4cef3cebeac189da0f6c6f7d4932416dc
-
-
- mcc_generated_files\src\tcb1.c
- 273a8fa28040b7994c42af736726f4f37396359c7451d6375efae5b6194f69d7
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\src\tcb0.c
- b7c085eec9b3a2e01df339e0a3b722d2d86f87e41d95cd2c481da3ee3641de39
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- a7dc110928d190120af6cd5323667db71f3d6aa1b6e3b83947af50f6e746b744
-
-
- mcc_generated_files\src\usart3.c
- 8572b8c83d8f535a9fabb7a2e29c1c7d12d16b3627ca69daa9ec8358614c281d
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\mcc.h
- 2cabdb3b3f12f5065f28af6e9fd57899438917062dea25f5748876300fff6747
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\src\adc0.c
- 1fd274ef2f0c3c37ffedd021c6ccb15a6233df4dbed72cc707a0a4a70cdae2f1
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- fd32cc065a7a7689f961b1cba655e374fd30f68360afd758e871aeb6c9bdc53c
-
-
- mcc_generated_files\include\opamp.h
- d40542c2e8cabb716b03393bfd5abe293babd968bb7948ae05a162040b913fac
-
-
- mcc_generated_files\src\opamp.c
- 4ceda6c1e9ac8c6859c4826bcb49ccaa6d533e3aaaf1fdf505d494dea8f7eb24
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/differential-amplifier.X/MyConfig.mc3.bak b/differential-amplifier.X/MyConfig.mc3.bak
deleted file mode 100644
index a12e754..0000000
--- a/differential-amplifier.X/MyConfig.mc3.bak
+++ /dev/null
@@ -1,11640 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 100
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 14
-
-
-
- TCB0
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- false
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDD/2
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- DIV1
-
-
-
- 3.3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- -0.040%
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 86956
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 2V048
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN6
-
-
-
- 1
-
-
-
- true
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP5
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 100
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1V024
-
-
-
- true
-
-
-
- 1
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
- OP1OUT
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 23
-
-
-
- 127
-
-
-
- RTC Clock / 32
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- LINKOUT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampDual
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 129
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 4R, R2 = 12R, R2/R1 = 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- NORMAL
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3.0
-
-
-
- 0
-
-
-
- VDD as reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VREF
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN5
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 2.048V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 4 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 133
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 72
-
-
-
- 177
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 7
-
-
-
- 5
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- CLK_PEP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- Full Input Range
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Link OP[n-1] output
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 7
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 3
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 3.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 12
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 37
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 2
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 65
-
-
-
- 128
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 7
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 18
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- Positive input pin for OPn
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- DAC
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDiffAmp
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
- INT
-
-
-
-
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- ISR_RTC_PIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 2.048
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OUT
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2000000
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDDDIV2
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- opNonInvPGA
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 1
-
-
-
- 41
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- false
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- alternate
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- VDD
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- disabled
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 3
-
-
-
- 7
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2.048
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\include\pin_manager.h
- ab6aef031cc93c07d5e7d62fb26f8a8c62316f5b3a65fc622240e4ca09279228
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- f99940ca5c1f1a476aefb94b0ae0350fe7965e6ce033776a7cdb494d2116b482
-
-
- mcc_generated_files\src\pin_manager.c
- 23a5f883579cc4b5b891381e5c135ceb22baa0ced22ad9091454ac4773c06625
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\include\tcb1.h
- 48affc128bd0298e52e46a4e619fbcf1a699d041c2fc6d057e81a28ef6f2f95c
-
-
- mcc_generated_files\src\tcb1.c
- 3f164851af42f06ca7274eccb115b5e055054f3c754f625691c8e7260aea65ac
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\src\tcb0.c
- eb14c823736ca31b0bc3d1a7690505ac49bac351927d50250767f748557af01a
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- b516cde371e7d21c5557b3fce53d804baaa6777d33ec56ce3c8381f15296acf0
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\mcc.h
- a2fd467451db5431061f4edd1a93e0a485820c0b9e47aeda56d213e3aa7e184a
-
-
- mcc_generated_files\src\adc0.c
- c0bd01e8a7edca42758feba868ad3bc88a42ab326aee3d66310e200fa940a9da
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- fd32cc065a7a7689f961b1cba655e374fd30f68360afd758e871aeb6c9bdc53c
-
-
- mcc_generated_files\include\opamp.h
- d40542c2e8cabb716b03393bfd5abe293babd968bb7948ae05a162040b913fac
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\src\opamp.c
- 4ceda6c1e9ac8c6859c4826bcb49ccaa6d533e3aaaf1fdf505d494dea8f7eb24
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/differential-amplifier.X/data_stream.c b/differential-amplifier.X/data_stream.c
deleted file mode 100644
index 3d91b80..0000000
--- a/differential-amplifier.X/data_stream.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "data_stream.h"
-#include "mcc_generated_files/include/usart3.h"
-#include
-
-char TX_buffer[sizeof(data_stream)];
-
-void DS_sendData(void) {
- memcpy(TX_buffer, &data_stream, sizeof(data_stream));
-
- USART3.CTRLA = USART_DREIE_bm; /* Enable Transmit Complete interrupt*/
- USART3.TXDATAL = data_stream.start_token; /* Send the first byte of the buffer*/
- /* once the first byte is transmitted the ISR will kick in*/
-}
-
-void myUSART_3_ISR(void)
-{
- volatile static uint8_t tx_count = 1;
-
- if (data_stream.data_available) {
-
- if (tx_count < (sizeof(TX_buffer) - 1)) {
- USART3.TXDATAL = TX_buffer[tx_count];
- tx_count++;
- }
- else{
-
- tx_count = 1;
- data_stream.data_available = 0;
- USART3.CTRLA &= ~USART_DREIE_bm; /* Disable Transmit Complete interrupt*/
- /* No more bytes available*/
- }
- }
-}
\ No newline at end of file
diff --git a/differential-amplifier.X/data_stream.h b/differential-amplifier.X/data_stream.h
deleted file mode 100644
index 7f89572..0000000
--- a/differential-amplifier.X/data_stream.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef DATA_STREAM_H_
-#define DATA_STREAM_H_
-
-#include
-
-#define START_TOKEN 0x55
-
-typedef struct {
- uint8_t start_token;
- int16_t diff_input;
- int16_t diff_output;
- uint8_t end_token;
- uint8_t data_available;;
-}data_visualizer;
-
-data_visualizer data_stream;
-
-void DS_sendData(void);
-
-void myUSART_3_ISR(void);
-
-
-#endif /* DATA_STREAM_H_ */
\ No newline at end of file
diff --git a/differential-amplifier.X/differential-amplifier.mc3 b/differential-amplifier.X/differential-amplifier.mc3
new file mode 100644
index 0000000..fb56e85
--- /dev/null
+++ b/differential-amplifier.X/differential-amplifier.mc3
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ADC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Application Builder
+ class com.microchip.mcc.melody.module.FrameworkModule
+
+
+ CLKCTRL
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ CPUINT
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Configuration Bits
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ DAC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ MAIN MANAGER
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ OPAMP
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Pin Manager
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ RTC
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB1
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ USART3
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ VREF
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ meta
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ module0
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module1
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module19
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module2
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module23
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module3
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module4
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module46
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module48
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module5
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module70
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module77
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module8
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module80
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module81
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module9
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+
+
+
+
+
+
+ {}
+
+
+
+ {"userAddedModules":["module5","module4","module9","module8","module48","module1","module0","module3","module2","module46","module77","module70","module81","module80"],"version":"CURRENT","modules":{"module5":{"scriptId":"@mchp-mcc/scf-avr8-clkctrl-v3","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"scf_avr8_clkctrl_v3":{"interfaceId":{"name":"scf-avr8-clkctrl-v3","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CLKCTRL"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"configbits_basic_interface":{"interfaceId":{"name":"configbits-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"configbits_basic_interface"}},"config_device":{"interfaceId":{"name":"config-device","version":"^1"},"handle":{"providerId":"module1","exportId":"config_device"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"frqselOschfctrla":"4 MHz system clock (default)","penMclkctrlb":false,"pdivMclkctrlb":"6X"}}}},"module4":{"scriptId":"@mchp-mcc/scf-avr8-interrupt-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_interrupt_v1":{"interfaceId":{"name":"scf-avr8-interrupt-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CPUINT"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"iSreg":true}}}},"module9":{"scriptId":"@mchp-mcc/scf-avr8-vref-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_vref_v1":{"interfaceId":{"name":"scf-avr8-vref-v1","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"vdd":3.3,"alwaysonAdc0ref":true,"refselAdc0ref":"VDD as reference","alwaysonDac0ref":true,"refselDac0ref":"Internal 2.048V reference"}}}},"module8":{"scriptId":"@mchp-mcc/data-streamer-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic-drv-interface","version":"^2.1.0"},"handle":{"providerId":"module23","exportId":"uart_basic_drv_interface"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"software":{"dataStreamerTable":[{"rowId":0.0,"uid":"defaultRow_0","varName":"diff_input","varType":"int16_t"},{"rowId":1.0,"uid":"dynamicRow_1730713492275","dynamicallyAdded":true,"varName":"diff_output","varType":"int16_t"}]}}}},"module48":{"scriptId":"@mchp-mcc/scf-avr8-opamp-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"DAC":{"interfaceId":{"name":"dac-general-parameters-avr8","version":"^0.1.0"},"handle":{"providerId":"module70","exportId":"DAC"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_opamp_v1":{"interfaceId":{"name":"scf-avr8-opamp-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"OPAMP"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"mode":"Dual and Single OPAMPs","tripleOpampConfiguration":"Instrumentation Amplifier","op1Enabled":false,"op2Enabled":false,"op0Configuration":"Voltage Follower","enableSingleOpamp":false},"op0Hardware":{"muxposOp0inmux":"VDD/2","op0CustomGain":"3"},"op1Hardware":{"muxposOp1inmux":"DAC output","op1CustomGain":"3","muxwipOp1resmux":"R1 \u003d 4R, R2 \u003d 12R, R2/R1 \u003d 3"},"op2Hardware":{"op2CustomGain":"3"},"software":{"op0outAttribs":{"PD2":{"ioc":"NONE"}},"op1outAttribs":{"PD5":{"ioc":"NONE"}},"op2outAttribs":{"PE2":{"ioc":"NONE"}}},"global":{"irselPwrctrl":"FULL"}}}},"module1":{"scriptId":"@mchp-mcc/avr8-configuration-bits-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_main":{"interfaceId":{"name":"initializer-main","version":"^0.*"},"handle":{"providerId":"module0","exportId":"initializer_main"}},"avr8_configuration_bits_v1":{"interfaceId":{"name":"avr8-configuration-bits-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Configuration Bits"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module0":{"scriptId":"@mchp-mcc/main-manager","imports":{"main":{"interfaceId":{"name":"main-manager","version":"^1.*"},"handle":{"providerId":"mccDevice","exportId":"MAIN MANAGER"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module3":{"scriptId":"@mchp-mcc/pin-content-processor","imports":{"device-meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin-architecture":{"interfaceId":{"name":"pin-architecture","version":"1.0.0"},"handle":{"providerId":"module2","exportId":"pin-architecture"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"saved":{"meta":{"module":"module77"},"rows":{"pcp":{"GPIO$GPIO$input":{"pins":{"PB3":{"state":"MUL"}}},"GPIO$GPIO$output":{"pins":{"PB3":{"state":"L"}}}}},"userEditedData":{"cname":{"eview":{"PB3":"LED0"}}}}}},"module2":{"scriptId":"@mchp-mcc/avr8-pin-manager","imports":{"avr8-pin-manager":{"interfaceId":{"name":"avr8-pin-manager","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Pin Manager"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"adapterdata":{"cname":{"eview":{"dataMap":{"PB3":{"value":"LED0"}}}}}}},"module19":{"scriptId":"@mchp-mcc/scf-avr8-usart-v1","imports":{"osc_clock":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_usart_v1":{"interfaceId":{"name":"scf-avr8-usart-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"USART3"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"rxc":false},"hardware":{"rxenCtrlb":false}}}},"module46":{"scriptId":"@mchp-mcc/scf-avr8-rtc-v1","imports":{"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_rtc_v1":{"interfaceId":{"name":"scf-avr8-rtc-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"RTC"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"prescalerCtrla":"RTC Clock / 32","requestedPeriodValue":1.0,"requestedCompareValue":0.0}}}},"module23":{"scriptId":"@mchp-mcc/uart-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic","version":"^6.0.0"},"handle":{"providerId":"module19","exportId":"uart_basic","label":"UART3"}}},"framewSpecificState":{"userEditedImports":["uart_basic"]},"payload":{"main":{"interrupt":{"interruptDriven":false}}}},"module77":{"scriptId":"@mchp-mcc/scf-avr8-adc-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"adc_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0"},"handle":{"providerId":"module9","exportId":"VREF"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"scf_avr8_adc_v1":{"interfaceId":{"name":"scf-avr8-adc-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"ADC0"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"resselCtrla":"10-bit mode","leftadjCtrla":false,"muxposMuxpos":"ADC input pin 5","swConvmodeCtrla":true,"muxnegMuxneg":"ADC input pin 6"},"interrupt":{"resrdyIntctrl":true},"clockSettgins":{"sampnumCtrlb":"4 results accumulated","sampleLen":10.0,"prescCtrlc":"CLK_PER divided by 2"},"software":{"anxattribspinkey1":{}}}}},"module70":{"scriptId":"@mchp-mcc/scf-avr8-dac-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"scf_avr8_dac_v1":{"interfaceId":{"name":"scf-avr8-dac-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"DAC0"}},"dac_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0.1.0"},"handle":{"providerId":"module9","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"outenCtrla":true}}}},"module81":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB0"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"clkselCtrla":"DIV1","timerPeriod":4.3E-4},"advanced":{"runstdbyCtrla":true},"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true}}}},"module80":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB1"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true},"hardware":{"timerPeriod":0.00125}}}}},"content":{"@mchp-mcc/avr-8bit":"4.11.0","@mchp-mcc/scf-avr8-dac-v1":"4.0.10","@mchp-mcc/data-streamer-driver":"2.0.1","@mchp-mcc/scf-avr8-tcb-v1":"6.0.0","@mchp-mcc/avr8-pin-manager":"4.6.1","@mchp-mcc/scf-avr8-adc-v1":"4.2.6","@mchp-mcc/scf-avr8-interrupt-v1":"5.0.12","@mchp-mcc/scf-avr8-usart-v1":"10.2.0","@mchp-mcc/main-manager":"3.1.2","@mchp-mcc/scf-avr8-opamp-v1":"1.0.7","@mchp-mcc/scf-avr8-rtc-v1":"4.2.5","@mchp-mcc/pin-content-processor":"3.9.0","@mchp-mcc/uart-driver":"1.10.2","@mchp-mcc/scf-avr8-vref-v1":"4.0.3","@mchp-mcc/scf-avr8-clkctrl-v3":"2.0.10","@mchp-mcc/avr8-configuration-bits-v1":"4.2.14"}}
+
+
+
+
+ main.c
+ 8c0f34e8f96915ad988aa3ea4806527b58b1baf7cd2b4b48ea095186ec987daf
+
+
+ mcc_generated_files\adc\adc0.h
+ bc29e59ba37b476d46dacbaa5c66e58cf004266575ca91ac3e4bbb38bd59bbf4
+
+
+ mcc_generated_files\adc\src\adc0.c
+ 451e53e612ac714687adde330b9bab84fc26f7705b875957c62c83b65825ffb3
+
+
+ mcc_generated_files\dac\dac0.h
+ 0549c6cb256039e641849689faac07bd2cdf824d89e7651010b851bdabd5ae5d
+
+
+ mcc_generated_files\dac\src\dac0.c
+ 3b967ab389e7669b5b2fcd31bd20b78c67003f81104d14a98c27dca231cdff0b
+
+
+ mcc_generated_files\data_streamer\data_streamer.ds
+ cbe290996c7dce2521dad4443cf8c02b84208db44078f841a39164de0701e59c
+
+
+ mcc_generated_files\data_streamer\data_streamer.h
+ 8988eceec809a60103480b528dc5a3eb6bea03063b621a4c1b951fe65cdb5de4
+
+
+ mcc_generated_files\data_streamer\src\data_streamer.c
+ f6b1ef7fe11e0343605365ce7bfc7af81cdc33bf43770f5cfd78cf17a49534c5
+
+
+ mcc_generated_files\opamp\opamp.h
+ 31b48e620d00dff167761a063eb62a87d1a1b4c3767c95f8588a014c0d73beb8
+
+
+ mcc_generated_files\opamp\src\opamp.c
+ 0b80b1565470939729a1fd8b03e6ea3ff7a8f4ffbaf0f6e51eb98147d0ff3bdd
+
+
+ mcc_generated_files\system\ccp.h
+ 00d4c7f49db8510d0ad35d5b65b82db98d0da655c1ea8e81b657e00f49f2640e
+
+
+ mcc_generated_files\system\clock.h
+ 5342e3ba7f014024b35fe2eea86794d9bb9ec656c55311f8b96c34e9eac4b215
+
+
+ mcc_generated_files\system\config_bits.h
+ cfb3dfe72760dc2066638db643962b2a7db39169cfda29327dcb4d3ec4a26be3
+
+
+ mcc_generated_files\system\interrupt.h
+ 49902a470e198f90d0ea9db752f6313c7074811e1a4da98a4d1e8572db7378f5
+
+
+ mcc_generated_files\system\pins.h
+ 8b87bf80dcd74fffe5009a69ea34021efc506af37489ca2b780ae4c21e8b085e
+
+
+ mcc_generated_files\system\port.h
+ b11a993ebf82a6c6f20be03184935a8a4cd3798f435debebdb8cb65da36f64fb
+
+
+ mcc_generated_files\system\protected_io.h
+ 72f5b206c649b31773ab739c0828b1eb6f88d99a27e0fc63f6a9f4119e632370
+
+
+ mcc_generated_files\system\src\clock.c
+ 8de3793d4c564ef1697ce28b5d0955018bc0d17d3a8ecb550ac3e53fa4405f7b
+
+
+ mcc_generated_files\system\src\config_bits.c
+ da35086390f11b66ed0afa138a8c6f5adf00722322388b38601d7253b3bee4b1
+
+
+ mcc_generated_files\system\src\interrupt.c
+ e27867b94747dfcde0538b371a10abd3f95c1516a59d4180fc07d5ccf28697a4
+
+
+ mcc_generated_files\system\src\pins.c
+ 36396d92a04c5034fe7d1b6fb1191b2b409cdf0f0be0c9154a1fa2ffe453fddd
+
+
+ mcc_generated_files\system\src\protected_io.S
+ 4b140dbb376219b5a3da75f0eb4d64e14c8baef82193b7b562ad74cfed7d3348
+
+
+ mcc_generated_files\system\src\system.c
+ 7ec1ba179d9e866aa7ec5c242df4667903d9e9cfacb38b157e535969e92840a7
+
+
+ mcc_generated_files\system\system.h
+ d024b1816588238869dcbbafffa667f0d46215c13d079a5e1cfcf90c1d4641de
+
+
+ mcc_generated_files\system\utils\assembler.h
+ ef3dab91390b4a198c234566994c23272765931378bb3d0aa94670e39e6e0d26
+
+
+ mcc_generated_files\system\utils\assembler\gas.h
+ 667f6ffee6461d9ad79483b20b02a35dfc4ad60bf0418e2ecbd19df4991dc38d
+
+
+ mcc_generated_files\system\utils\assembler\iar.h
+ 53c9ca51da473f3a6ae6e42f4056df249a058f10ece6f749e5bdd1ea3ed7a385
+
+
+ mcc_generated_files\system\utils\atomic.h
+ 19307b79f5a6af4e7cc53b21a4736a674bc97bdaa5b381d8f0bdfd008bd48b9a
+
+
+ mcc_generated_files\system\utils\compiler.h
+ 7b9b32dc17152d0780506dc95a87e10ba2f9238d1f2e9d7ad8f7493000036fc0
+
+
+ mcc_generated_files\system\utils\interrupt_avr8.h
+ e4084c0e62035baf526b13eb8e403cde7b00331045cd04839520c845bb0707a6
+
+
+ mcc_generated_files\system\utils\utils.h
+ 1c920a9d95628ccae7945d16093b8d2407f5a5f27dc63c6256b9c52d3ec363f2
+
+
+ mcc_generated_files\system\utils\utils_assert.h
+ d347e0636652e48c7fb7c186ae4336f343801e0acdca339cc724db0807b4fff3
+
+
+ mcc_generated_files\timer\rtc.h
+ 30de4216e54591b4ce33fa8b85e391383b5612c6040cabae2de0dd78b7a2160e
+
+
+ mcc_generated_files\timer\src\rtc.c
+ 8306e8e939cd5445e08215704a3738c4d52084a12ab6b19f0d89add90d79386e
+
+
+ mcc_generated_files\timer\src\tcb0.c
+ cee852845480c8d90f838e23532e7b6058e717fc70e062fb71916779af420776
+
+
+ mcc_generated_files\timer\src\tcb1.c
+ 81c562f8f043f9648e8844fc8b485964b979a58be45985955bb94f93b103db00
+
+
+ mcc_generated_files\timer\tcb0.h
+ 7a1288fc46858406f1c51ae2f96e5853335aca54d6a69ba94fd1c4d7fe553a73
+
+
+ mcc_generated_files\timer\tcb0_deprecated.h
+ 694cb27180c8eefa7d095e8398ca24bf46b04b63a96cb3d13ffc5df87af08e9e
+
+
+ mcc_generated_files\timer\tcb1.h
+ fcee68e8303016d74505dc8d89515bd6562365c9e1416cf08a13b8f7dfe5e933
+
+
+ mcc_generated_files\timer\tcb1_deprecated.h
+ 7f72627208907e46457461ba1aa1514f055bfb43aec861be0d4c8362663c7766
+
+
+ mcc_generated_files\uart\src\usart3.c
+ 50b378761bf7037897f4212befb6d1ac88bdafd88d3cfddb712b3de22b66b91c
+
+
+ mcc_generated_files\uart\uart_drv_interface.h
+ ad5aaf8976724442bdcbffa3c53527147f62a3745058de17e68c8ef5c3204e6e
+
+
+ mcc_generated_files\uart\uart_types.h
+ b7d15f2c3333652fa797c51b4abb616deaa4fff2224347f096c4b40b39963aaa
+
+
+ mcc_generated_files\uart\usart3.h
+ a0408604af9d136ef752a2b7d35f8bc7ee8c385f66f2051433e88799dad7700b
+
+
+ mcc_generated_files\vref\src\vref.c
+ 791564c4f19ddf68ebc2317ce2090af65f178af966f8f03a8da580a7c2d932c0
+
+
+ mcc_generated_files\vref\vref.h
+ 45d7853bf4d55b39db01525bd3e376e180f317ac74992a5e49ca9436865cbc50
+
+
+
\ No newline at end of file
diff --git a/differential-amplifier.X/main.c b/differential-amplifier.X/main.c
index 0a64afd..46ee406 100644
--- a/differential-amplifier.X/main.c
+++ b/differential-amplifier.X/main.c
@@ -1,28 +1,27 @@
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
+ (c) 2018 Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip software and any
+ derivatives exclusively with Microchip products. It is your responsibility to comply with third party
+ license terms applicable to your use of third party software (including open source software) that
may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
+
+ THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
+ EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
+ IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
+
+ IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
+ WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
+ HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
+ THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
+ CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
+ OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
SOFTWARE.
-*/
+ */
-#include "mcc_generated_files/mcc.h"
-#include "data_stream.h"
+#include "mcc_generated_files/system/system.h"
#include
#define DEGREE 0.0245 //2pi /256 = 6.28/ 256.
@@ -36,7 +35,7 @@
#define SINE_WAVE_AMPLITUDE_VOLTS (0.128)
/*Offset Volts*/
#define SINE_DC_OFFSET_VOLTS (1.65)
-
+
/*DAC Voltage Reference*/
#define DAC_VOLTAGE_REF (2.048)
/* Number of steps for a sine wave period */
@@ -55,75 +54,78 @@ uint16_t sine_wave[SINE_WAVE_STEPS];
void myRTCISR(void);
void myTCB0ISR(void);
-void myTCB1ISR (void);
+void myTCB1ISR(void);
void sine_wave_table_init(void);
+void adc_resrdy(void);
/*
Main application
-*/
+ */
int main(void)
{
/* Initializes MCU, drivers and middleware */
SYSTEM_Initialize();
-
+
+ DataStreamer.diff_input = 0;
+ DataStreamer.diff_output = 0;
+
sine_wave_table_init();
-
+
+ ADC0_RegisterResrdyCallback(adc_resrdy);
RTC_SetOVFIsrCallback(myRTCISR);
- TCB0_SetCaptIsrCallback(myTCB0ISR);
- USART3_SetTXISRCb(myUSART_3_ISR);
- data_stream.start_token = START_TOKEN;
- data_stream.end_token = (~START_TOKEN);
- TCB1_SetCaptIsrCallback(myTCB1ISR);
+ TCB0_CaptureCallbackRegister(myTCB0ISR);
+ TCB1_CaptureCallbackRegister(myTCB1ISR);
/* Replace with your application code */
- while (1){
+ while (1)
+ {
}
}
-void myRTCISR(void){
+void myRTCISR(void)
+{
LED0_Toggle(); //Control LED
}
-void myTCB0ISR(void){
-
+void myTCB0ISR(void)
+{
+
volatile static uint16_t sine_wave_index = 0;
-
+
DAC0_SetOutput(sine_wave[sine_wave_index]); //Control LED
- data_stream.diff_input = (sine_wave[sine_wave_index] - SINE_DC_OFFSET) * (int16_t)(DAC_VOLTAGE_REF);
+ DataStreamer.diff_input = (sine_wave[sine_wave_index] - SINE_DC_OFFSET) * (int16_t) (DAC_VOLTAGE_REF);
sine_wave_index++;
sine_wave_index = sine_wave_index % SINE_WAVE_STEPS;
}
void sine_wave_table_init(void)
{
- for(uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
- {
- sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
- }
-
+ for (uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
+ {
+ sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
+ }
+
}
-void myTCB1ISR (void){
- if (data_stream.data_available == 0) {
+void myTCB1ISR(void)
+{
+ if (USART3_IsTxReady())
+ {
/* Start ADC conversion */
ADC0.COMMAND = ADC_STCONV_bm;
}
-
/* Clear interrupt flag */
- TCB1.INTFLAGS = 0xFF;
}
-ISR (ADC0_RESRDY_vect)
+void adc_resrdy(void)
{
- data_stream.data_available = 1;
- data_stream.diff_output = (int16_t)((int16_t)ADC0.RES >> 1);
- data_stream.diff_output = ((int16_t)(data_stream.diff_output*32)/10);
- DS_sendData();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
+ DataStreamer.diff_output = (int16_t) ((int16_t) ADC0.RES >> 1);
+ DataStreamer.diff_output = ((int16_t) (DataStreamer.diff_output * 32) / 10);
+ WriteFrame();
}
/**
End of File
-*/
\ No newline at end of file
+ */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/adc/adc0.h b/differential-amplifier.X/mcc_generated_files/adc/adc0.h
new file mode 100644
index 0000000..bfd76fc
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/adc/adc0.h
@@ -0,0 +1,275 @@
+/**
+ * ADC0 Generated Driver API Header File
+ *
+ * @file adc0.h
+ *
+ * @defgroup adc0 ADC0
+ *
+ * @brief API prototypes and other datatypes for the ADC0 module driver.
+ *
+ * @version ADC0 Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ADC0_H_INCLUDED
+#define ADC0_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup adc0
+ * @enum ADC0_window_mode_t
+ * @brief Window Comparator Modes
+ */
+typedef enum {
+ ADC0_window_disabled, /**
+#include
+
+/**
+ * @def Data Streamer Start Byte Macro.
+ * Macro that represents the byte that is sent to signify the beginning of the Data Streamer frame.
+ */
+#define DATA_STREAMER_START_BYTE 3
+
+/**
+ * @def Data Streamer End Byte Macro.
+ * Macro that represents the byte that is sent to signify the end of the Data Streamer frame.
+ */
+#define DATA_STREAMER_END_BYTE (255 - DATA_STREAMER_START_BYTE)
+
+/**
+ * @ingroup datastreamer
+ * @struct DATA_STREAMER_STRUCT
+ * @brief Structure containing the initial Data Streamer variables.
+ */
+struct __attribute__((packed)) DATA_STREAMER_STRUCT
+{
+ int16_t diff_input;
+ int16_t diff_output;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct PACKAGE_STRUCT
+ * @brief Structure containing a pointer assigned to a custom data package and its size which are set by the user.
+ */
+struct PACKAGE_STRUCT
+{
+ void * varStruct;
+ size_t length;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct DataStreamer
+ * @brief An instance of the DATA_STREAMER_STRUCT.
+ */
+extern struct DATA_STREAMER_STRUCT DataStreamer;
+
+/**
+ @ingroup datastreamer
+ @struct DATA_STREAMER_PACKAGE
+ @brief An instance of the PACKAGE_STRUCT.
+ */
+extern struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+/**
+ * @def Data Streamer Write Frame Macro.
+ * Macro used to write the frame to the Data Streamer.
+ */
+#define WriteFrame() DataStreamer_FrameSend(DATA_STREAMER_PACKAGE.varStruct,DATA_STREAMER_PACKAGE.length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Initializes the Data Streamer.
+ * @param None.
+ * @return None.
+ */
+void DataStreamer_Initialize(void);
+
+/**
+ * @ingroup datastreamer
+ * @brief Writes the frame to the Data Streamer.
+ * @param void * package - Pointer to the DATA_STREAMER_PACKAGE structure containing the variables to be sent.
+ * @param size_t length - Size of the DATA_STREAMER_PACKAGE structure in bytes.
+ * @return None.
+ */
+void DataStreamer_FrameSend(void * package, size_t length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Sets the package containing the variables to be sent by the Data Streamer.
+ * @param void * customStructHandler - Pointer to the user-defined structure containing the variables to be sent to the Data Streamer.
+ * @param size_t customlength - Size of the user-defined structure in bytes.
+ * @return None.
+ */
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength);
+
+#endif /* DATA_STREAMER_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c b/differential-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c
new file mode 100644
index 0000000..3b57f3c
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c
@@ -0,0 +1,69 @@
+/**
+ * DATASTREAMER Generated Driver API Source File.
+ *
+ * @file data_streamer.c
+ *
+ * @ingroup datastreamer
+ *
+ * @brief This file contains the implementation for the Data Streamer driver APIs.
+ *
+ * @version Data Streamer Driver Version 1.2.1
+ */
+ /*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../data_streamer.h"
+#include "../../uart/usart3.h"
+
+static const uart_drv_interface_t *DS_UART = &UART3;
+
+
+struct DATA_STREAMER_STRUCT DataStreamer;
+struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+void DataStreamer_Initialize(void)
+{
+ DataStreamer_PackageSet(&DataStreamer, sizeof (DataStreamer));
+}
+
+static void DataStreamer_VariableWrite(char var)
+{
+ while (!(DS_UART->IsTxReady()));
+ DS_UART->Write(var);
+};
+
+void DataStreamer_FrameSend(void * package, size_t length)
+{
+ char * dp = package;
+ DataStreamer_VariableWrite(DATA_STREAMER_START_BYTE);
+ while (length--)
+ {
+ DataStreamer_VariableWrite(*dp++);
+ }
+ DataStreamer_VariableWrite(DATA_STREAMER_END_BYTE);
+ while (!(DS_UART->IsTxDone()));
+};
+
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength)
+{
+ DATA_STREAMER_PACKAGE.varStruct = customStructHandler;
+ DATA_STREAMER_PACKAGE.length = customlength;
+};
diff --git a/differential-amplifier.X/mcc_generated_files/device_config.c b/differential-amplifier.X/mcc_generated_files/device_config.c
deleted file mode 100644
index 829d080..0000000
--- a/differential-amplifier.X/mcc_generated_files/device_config.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include
-
-/**
- * \Configures Fuse bits
- */
-
-FUSES =
-{
- .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
- .BOOTSIZE = 0,
- .CODESIZE = 0,
- .OSCCFG = CLKSEL_OSCHF_gc,
- .SYSCFG0 = CRCSEL_CRC32_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
- .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
- .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
-};
diff --git a/differential-amplifier.X/mcc_generated_files/include/adc0.h b/differential-amplifier.X/mcc_generated_files/include/adc0.h
deleted file mode 100644
index 37ac63f..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/adc0.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ADC0_H_INCLUDED
-#define ADC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- adc0_window_disabled,
- adc0_window_below,
- adc0_window_above,
- adc0_window_inside,
- adc0_window_outside
-} adc0_window_mode_t;
-
-/** Function pointer to callback function called by IRQ.
- NULL=default value: No callback function is to be used.
-*/
-typedef void (*adc_irq_cb_t)(void);
-
-/** Datatype for the result of the ADC conversion */
-typedef uint16_t adc_result_t;
-typedef int16_t diff_adc_result_t;
-
-//* Analog channel selection */
-typedef ADC_MUXPOS_t adc_0_channel_t;
-typedef ADC_MUXNEG_t adc_0_muxneg_channel_t;
-
-/**
- * \brief Initialize ADC interface
- * If module is configured to disabled state, the clock to the ADC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the ADC init was successful
- * \retval 1 the ADC init was not successful
- */
-int8_t ADC0_Initialize();
-
-/**
- * \brief Enable ADC0
- * 1. If supported by the clock system, enables the clock to the ADC
- * 2. Enables the ADC module by setting the enable-bit in the ADC control register
- *
- * \return Nothing
- */
-void ADC0_Enable();
-
-/**
- * \brief Disable ADC0
- * 1. Disables the ADC module by clearing the enable-bit in the ADC control register
- * 2. If supported by the clock system, disables the clock to the ADC
- *
- * \return Nothing
- */
-void ADC0_Disable();
-
-/**
- * \brief Enable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_EnableAutoTrigger();
-
-/**
- * \brief Disable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_DisableAutoTrigger();
-
-/**
- * \brief Set conversion window comparator high threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowHigh(adc_result_t high);
-
-/**
- * \brief Set conversion window comparator low threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowLow(adc_result_t low);
-
-/**
- * \brief Set conversion window mode
- *
- * \return Nothing
- */
-void ADC0_SetWindowMode(adc0_window_mode_t mode);
-
-/**
- * \brief Set ADC channel to be used for windowed conversion mode
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_SetWindowChannel(adc_0_channel_t channel);
-
-/**
- * \brief Start a conversion on ADC0
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion on ADC0
- *
- * \param[in] channel,channel1 The ADC channels to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Stop a conversion on ADC0
- *
- * \return Nothing
- */
-void ADC0_StopConversion();
-
-/**
- * \brief Check if the ADC conversion is done
- *
- * \return The status of ADC converison done check
- * \retval true The ADC conversion is done
- * \retval false The ADC converison is not done
- */
-bool ADC0_IsConversionDone();
-
-/**
- * \brief Read a conversion result from ADC0
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversionResult(void);
-
-/**
- * \brief Read the conversion window result from ADC0
- *
- * \return Returns true when a comparison results in a trigger condition, false otherwise.
- */
-bool ADC0_GetWindowResult(void);
-
-/**
- * \brief Start a conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Return the number of bits in the ADC conversion result
- *
- * \return The number of bits in the ADC conversion result
- */
-uint8_t ADC0_GetResolution();
-
-/**
- * \brief Register a callback function to be called if conversion satisfies window criteria.
- *
- * \param[in] f Pointer to function to be called
- *
- * \return Nothing.
- */
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ADC0_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/ccp.h b/differential-amplifier.X/mcc_generated_files/include/ccp.h
deleted file mode 100644
index 9f416a0..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/ccp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPU_CCP_H
-#define CPU_CCP_H
-
-#include "../utils/compiler.h"
-#include "../include/protected_io.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Write to a CCP-protected 8-bit I/O register
- *
- * \param addr Address of the I/O register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_io(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_IOREG_gc, value);
-}
-
-/** @} */
-
-/**
- * \brief Write to CCP-protected 8-bit SPM register
- *
- * \param addr Address of the SPM register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_spm(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_SPM_gc, value);
-}
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CCP_H */
diff --git a/differential-amplifier.X/mcc_generated_files/include/cpuint.h b/differential-amplifier.X/mcc_generated_files/include/cpuint.h
deleted file mode 100644
index 67c012c..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/cpuint.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPUINT_H_INCLUDED
-#define CPUINT_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include "ccp.h"
-#include "../utils/atomic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /** \
- * \brief Initialize cpuint interface \
- * \
- * \return Initialization status \
- */
-int8_t CPUINT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPUINT_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/dac0.h b/differential-amplifier.X/mcc_generated_files/include/dac0.h
deleted file mode 100644
index 70239d9..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/dac0.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef DAC0_H_INCLUDED
-#define DAC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Datatype for the resolution of the DAC */
-typedef uint16_t dac_resolution_t;
-
-/**
- * \brief Initialize DAC interface
- * If module is configured to disabled state, the clock to the DAC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the DAC init was successful
- * \retval 1 the DAC init was not successful
- */
-int8_t DAC0_Initialize();
-
-/**
- * \brief Enable DAC0
- * 1. If supported by the clock system, enables the clock to the DAC
- * 2. Enables the DAC module by setting the enable-bit in the DAC control register
- *
- * \return Nothing
- */
-void DAC0_Enable();
-
-/**
- * \brief Disable DAC0
- * 1. Disables the DAC module by clearing the enable-bit in the DAC control register
- * 2. If supported by the clock system, disables the clock to the DAC
- *
- * \return Nothing
- */
-void DAC0_Disable();
-
-/**
- * \brief Start a conversion on DAC0
- *
- * \param[in] value The digital value to be converted to analogue voltage by the DAC
- *
- * \return Nothing
- */
-void DAC0_SetOutput(dac_resolution_t value);
-
-/**
- * \brief Return the number of bits in the DAC resolution
- *
- * \return The number of bits in the DAC resolution
- */
-uint8_t DAC0_GetResolution();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DAC0_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/opamp.h b/differential-amplifier.X/mcc_generated_files/include/opamp.h
deleted file mode 100644
index b0dca50..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/opamp.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef OPAMP_H_INCLUDED
-#define OPAMP_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include
-
-#define OPAMP_TIMEBASE_VALUE (23)
-
-/**
- @Summary
- Initializes the OPAMP_Initialize.
-
- @Description
- This routine initializes the OPAMP_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- OPAMP_Initialize();
-
-*/
-void OPAMP_Initialize();
-
-/**
- * @brief Enables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_EnableSystem(void);
-
-/**
- * @brief Disables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_DisableSystem(void);
-
-//OP0 Differential Amplifier APIs
-
-/**
- * @brief Sets OP0's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets OP0's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP0SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP0's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP0Settled(void);
-
-/**
- * @brief Sets OP0's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
-
-//OP1 Differential Amplifier APIs
-
-/**
- * @brief Sets OP1's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets the R1 and R2 values of OP1's internal resistor ladder as per user selection
- * @return None
- * @param [in] Desired resistor selection
- For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
- */
-void OPAMP_SetOP1WiperResMux(OPAMP_OP1RESMUX_MUXWIP_t value);
-
-/**
- * @brief Sets OP1's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP1SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP1's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP1Settled(void);
-
-/**
- * @brief Sets OP1's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP1OffsetCalibration(uint8_t calValue);
-
-#endif /* OPAMP_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/pin_manager.h b/differential-amplifier.X/mcc_generated_files/include/pin_manager.h
deleted file mode 100644
index 281d8e8..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/pin_manager.h
+++ /dev/null
@@ -1,200 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef PINS_H_INCLUDED
-#define PINS_H_INCLUDED
-
-#include
-#include "port.h"
-
-//get/set PD5 aliases
-#define PD5_SetHigh() do { PORTD_OUTSET = 0x20; } while(0)
-#define PD5_SetLow() do { PORTD_OUTCLR = 0x20; } while(0)
-#define PD5_Toggle() do { PORTD_OUTTGL = 0x20; } while(0)
-#define PD5_GetValue() (VPORTD.IN & (0x1 << 5))
-#define PD5_SetDigitalInput() do { PORTD_DIRCLR = 0x20; } while(0)
-#define PD5_SetDigitalOutput() do { PORTD_DIRSET = 0x20; } while(0)
-#define PD5_SetPullUp() do { PORTD_PIN5CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD5_ResetPullUp() do { PORTD_PIN5CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD5_SetInverted() do { PORTD_PIN5CTRL |= PORT_INVEN_bm; } while(0)
-#define PD5_ResetInverted() do { PORTD_PIN5CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD5_DisableInterruptOnChange() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD5_EnableInterruptForBothEdges() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD5_EnableInterruptForRisingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD5_EnableInterruptForFallingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD5_DisableDigitalInputBuffer() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD5_EnableInterruptForLowLevelSensing() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set LED0 aliases
-#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
-#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
-#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
-#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
-#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
-#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
-#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA2 aliases
-#define PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
-#define PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
-#define PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
-#define PA2_GetValue() (VPORTA.IN & (0x1 << 2))
-#define PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
-#define PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
-#define PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD6 aliases
-#define PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
-#define PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
-#define PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
-#define PD6_GetValue() (VPORTD.IN & (0x1 << 6))
-#define PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
-#define PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
-#define PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
-#define PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA3 aliases
-#define PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
-#define PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
-#define PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
-#define PA3_GetValue() (VPORTA.IN & (0x1 << 3))
-#define PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
-#define PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
-#define PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB1 aliases
-#define PB1_SetHigh() do { PORTB_OUTSET = 0x2; } while(0)
-#define PB1_SetLow() do { PORTB_OUTCLR = 0x2; } while(0)
-#define PB1_Toggle() do { PORTB_OUTTGL = 0x2; } while(0)
-#define PB1_GetValue() (VPORTB.IN & (0x1 << 1))
-#define PB1_SetDigitalInput() do { PORTB_DIRCLR = 0x2; } while(0)
-#define PB1_SetDigitalOutput() do { PORTB_DIRSET = 0x2; } while(0)
-#define PB1_SetPullUp() do { PORTB_PIN1CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB1_ResetPullUp() do { PORTB_PIN1CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB1_SetInverted() do { PORTB_PIN1CTRL |= PORT_INVEN_bm; } while(0)
-#define PB1_ResetInverted() do { PORTB_PIN1CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB1_DisableInterruptOnChange() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB1_EnableInterruptForBothEdges() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB1_EnableInterruptForRisingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB1_EnableInterruptForFallingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB1_DisableDigitalInputBuffer() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB1_EnableInterruptForLowLevelSensing() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD2 aliases
-#define PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
-#define PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
-#define PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
-#define PD2_GetValue() (VPORTD.IN & (0x1 << 2))
-#define PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
-#define PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
-#define PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB0 aliases
-#define PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
-#define PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
-#define PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
-#define PB0_GetValue() (VPORTB.IN & (0x1 << 0))
-#define PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
-#define PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
-#define PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
-#define PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-void PIN_MANAGER_Initialize();
-void PORTD_PD5_DefaultInterruptHandler(void);
-void PORTD_PD5_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_LED0_DefaultInterruptHandler(void);
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA2_DefaultInterruptHandler(void);
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD6_DefaultInterruptHandler(void);
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA3_DefaultInterruptHandler(void);
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB1_DefaultInterruptHandler(void);
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD2_DefaultInterruptHandler(void);
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB0_DefaultInterruptHandler(void);
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-#endif /* PINS_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/include/port.h b/differential-amplifier.X/mcc_generated_files/include/port.h
deleted file mode 100644
index 6a314fd..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/port.h
+++ /dev/null
@@ -1,1383 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef PORT_INCLUDED
-#define PORT_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../utils/compiler.h"
-
-enum port_pull_mode {
- PORT_PULL_OFF,
- PORT_PULL_UP,
-};
-
-enum port_dir {
- PORT_DIR_IN,
- PORT_DIR_OUT,
- PORT_DIR_OFF,
-};
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= mask;
- } else {
- VPORTE.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= (1 << pin);
- } else {
- VPORTE.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTE_toggle_port_level(const uint8_t mask)
-{
- PORTE.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTE_toggle_pin_level(const uint8_t pin)
-{
- PORTE.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTE_get_port_level()
-{
- return VPORTE.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTE_get_pin_level(const uint8_t pin)
-{
- return VPORTE.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTE_write_port(const uint8_t value)
-{
- VPORTE.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= mask;
- } else {
- VPORTF.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= (1 << pin);
- } else {
- VPORTF.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTF_toggle_port_level(const uint8_t mask)
-{
- PORTF.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTF_toggle_pin_level(const uint8_t pin)
-{
- PORTF.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTF_get_port_level()
-{
- return VPORTF.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTF_get_pin_level(const uint8_t pin)
-{
- return VPORTF.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTF_write_port(const uint8_t value)
-{
- VPORTF.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= mask;
- } else {
- VPORTA.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= (1 << pin);
- } else {
- VPORTA.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTA_toggle_port_level(const uint8_t mask)
-{
- PORTA.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTA_toggle_pin_level(const uint8_t pin)
-{
- PORTA.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTA_get_port_level()
-{
- return VPORTA.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTA_get_pin_level(const uint8_t pin)
-{
- return VPORTA.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTA_write_port(const uint8_t value)
-{
- VPORTA.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= mask;
- } else {
- VPORTB.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= (1 << pin);
- } else {
- VPORTB.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTB_toggle_port_level(const uint8_t mask)
-{
- PORTB.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTB_toggle_pin_level(const uint8_t pin)
-{
- PORTB.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTB_get_port_level()
-{
- return VPORTB.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTB_get_pin_level(const uint8_t pin)
-{
- return VPORTB.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTB_write_port(const uint8_t value)
-{
- VPORTB.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= mask;
- } else {
- VPORTC.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= (1 << pin);
- } else {
- VPORTC.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTC_toggle_port_level(const uint8_t mask)
-{
- PORTC.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTC_toggle_pin_level(const uint8_t pin)
-{
- PORTC.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTC_get_port_level()
-{
- return VPORTC.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTC_get_pin_level(const uint8_t pin)
-{
- return VPORTC.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTC_write_port(const uint8_t value)
-{
- VPORTC.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= mask;
- } else {
- VPORTD.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= (1 << pin);
- } else {
- VPORTD.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTD_toggle_port_level(const uint8_t mask)
-{
- PORTD.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTD_toggle_pin_level(const uint8_t pin)
-{
- PORTD.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTD_get_port_level()
-{
- return VPORTD.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTD_get_pin_level(const uint8_t pin)
-{
- return VPORTD.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTD_write_port(const uint8_t value)
-{
- VPORTD.OUT = value;
-}
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/protected_io.h b/differential-amplifier.X/mcc_generated_files/include/protected_io.h
deleted file mode 100644
index ec8fcc3..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/protected_io.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_system_protected_io Protected IO
- * \ingroup doc_driver_system
- *
- * \section doc_driver_protected_io_rev Revision History
- * - v0.0.0.1 Initial Commit
- *
- *@{
- */
-
-#ifndef PROTECTED_IO_H
-#define PROTECTED_IO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__DOXYGEN__)
-//! \name IAR Memory Model defines.
-//@{
-
-/**
- * \def CONFIG_MEMORY_MODEL_TINY
- * \brief Configuration symbol to enable 8 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_TINY
-
-/**
- * \def CONFIG_MEMORY_MODEL_SMALL
- * \brief Configuration symbol to enable 16 bit pointers.
- * \note If no memory model is defined, SMALL is default.
- *
- */
-#define CONFIG_MEMORY_MODEL_SMALL
-
-/**
- * \def CONFIG_MEMORY_MODEL_LARGE
- * \brief Configuration symbol to enable 24 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_LARGE
-
-//@}
-#endif
-
-/**
- * \brief Write to am 8-bit I/O register protected by CCP or a protection bit
- *
- * \param addr Address of the I/O register
- * \param magic CCP magic value or Mask for protection bit
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
-
-/** @} */
-
-#endif /* PROTECTED_IO_H */
diff --git a/differential-amplifier.X/mcc_generated_files/include/rstctrl.h b/differential-amplifier.X/mcc_generated_files/include/rstctrl.h
deleted file mode 100644
index 538084b..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/rstctrl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RSTCTRL_INCLUDED
-#define RSTCTRL_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ccp.h"
-
-static inline void RSTCTRL_reset(void)
-{
- /* SWRR is protected with CCP */
- ccp_write_io((void *)&RSTCTRL.SWRR, 0x0);
-
-}
-
-static inline uint8_t RSTCTRL_get_reset_cause(void)
-{
- return RSTCTRL.RSTFR;
-}
-
-static inline void RSTCTRL_clear_reset_cause(void)
-{
- RSTCTRL.RSTFR
- = RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RSTCTRL_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/rtc.h b/differential-amplifier.X/mcc_generated_files/include/rtc.h
deleted file mode 100644
index 978d393..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/rtc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RTCDRIVER_H
-#define RTCDRIVER_H
-
-#include "../utils/compiler.h"
-#include
-#include
-
-/** Datatype used to hold the number of ticks until a timer expires */
-
-typedef void (*RTC_cb_t)(void);
-void RTC_SetOVFIsrCallback(RTC_cb_t cb);
-void RTC_SetCMPIsrCallback(RTC_cb_t cb);
-void RTC_SetPITIsrCallback(RTC_cb_t cb);
-int8_t RTC_Initialize();
-void RTC_WriteCounter(uint16_t timerVal);
-void RTC_WritePeroid(uint16_t timerVal);
-uint16_t RTC_ReadCounter();
-uint16_t RTC_ReadPeriod();
-void RTC_EnableCMPInterrupt();
-void RTC_DisableCMPInterrupt();
-void RTC_EnableOVFInterrupt();
-void RTC_DisableOVFInterrupt();
-void RTC_EnablePITInterrupt();
-void RTC_DisablePITInterrupt();
-void RTC_ClearOVFInterruptFlag();
-bool RTC_IsOVFInterruptEnabled();
-
-
-#endif /* RTCDRIVER_H */
-
-/** @}*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/tcb0.h b/differential-amplifier.X/mcc_generated_files/include/tcb0.h
deleted file mode 100644
index a1721c6..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/tcb0.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB0_H_INCLUDED
-#define TCB0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB0_cb_t)(void);
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb);
-void TCB0_SetOvfIsrCallback(TCB0_cb_t cb);
-int8_t TCB0_Initialize();
-void TCB0_EnableCaptInterrupt(void);
-void TCB0_DisableCaptInterrupt(void);
-uint16_t TCB0_ReadTimer(void);
-void TCB0_WriteTimer(uint16_t timerVal);
-void TCB0_ClearCaptInterruptFlag(void);
-bool TCB0_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/tcb1.h b/differential-amplifier.X/mcc_generated_files/include/tcb1.h
deleted file mode 100644
index 7bed96b..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/tcb1.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB1_H_INCLUDED
-#define TCB1_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB1_cb_t)(void);
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb);
-void TCB1_SetOvfIsrCallback(TCB1_cb_t cb);
-int8_t TCB1_Initialize();
-void TCB1_EnableCaptInterrupt(void);
-void TCB1_DisableCaptInterrupt(void);
-uint16_t TCB1_ReadTimer(void);
-void TCB1_WriteTimer(uint16_t timerVal);
-void TCB1_ClearCaptInterruptFlag(void);
-bool TCB1_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/usart3.h b/differential-amplifier.X/mcc_generated_files/include/usart3.h
deleted file mode 100644
index b1b355f..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/usart3.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef USART3_H_INCLUDED
-#define USART3_H_INCLUDED
-
-#include
-#include
-#include "../utils/compiler.h"
-#include "../utils/atomic.h"
-#include "../config/clock_config.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Normal Mode, Baud register value */
-#define USART3_BAUD_RATE(BAUD_RATE) (((float)24000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
-
-/* USART3 Ringbuffer */
-
-#define USART3_RX_BUFFER_SIZE 8
-#define USART3_TX_BUFFER_SIZE 8
-#define USART3_RX_BUFFER_MASK (USART3_RX_BUFFER_SIZE - 1)
-#define USART3_TX_BUFFER_MASK (USART3_TX_BUFFER_SIZE - 1)
-
-typedef enum { USART3_RX_CB = 1, USART3_TX_CB } usart3_cb_t;
-typedef void (*usart_callback)(void);
-
-/**
- * \brief Initialize USART interface
- * If module is configured to disabled state, the clock to the USART is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the USART init was successful
- * \retval 1 the USART init was not successful
- */
-void USART3_Initialize();
-
-/**
- * \brief Enable RX and TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX and TX enable-bits in the USART control register
- *
- * \return Nothing
- */
-void USART3_Enable();
-
-/**
- * \brief Enable RX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableRx();
-
-/**
- * \brief Enable TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the TX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableTx();
-
-/**
- * \brief Disable USART3
- * 1. Disables the USART module by clearing the enable-bit(s) in the USART control register
- * 2. If supported by the clock system, disables the clock to the USART
- *
- * \return Nothing
- */
-void USART3_Disable();
-
-/**
- * \brief Get recieved data from USART3
- *
- * \return Data register from USART3 module
- */
-uint8_t USART3_GetData();
-
-/**
- * \brief Check if the usart can accept data to be transmitted
- *
- * \return The status of USART TX data ready check
- * \retval false The USART can not receive data to be transmitted
- * \retval true The USART can receive data to be transmitted
- */
-bool USART3_IsTxReady();
-
-/**
- * \brief Check if the USART has received data
- *
- * \return The status of USART RX data ready check
- * \retval true The USART has received data
- * \retval false The USART has not received data
- */
-bool USART3_IsRxReady();
-
-/**
- * \brief Check if USART3 data is transmitted
- *
- * \return Receiver ready status
- * \retval true Data is not completely shifted out of the shift register
- * \retval false Data completely shifted out if the USART shift register
- */
-bool USART3_IsTxBusy();
-
-
-
-bool USART3_IsTxDone();
-/**
- * \brief Read one character from USART3
- *
- * Function will block if a character is not available.
- *
- * \return Data read from the USART3 module
- */
-uint8_t USART3_Read(void);
-
-/**
- * \brief Write one character to USART3
- *
- * Function will block until a character can be accepted.
- *
- * \param[in] data The character to write to the USART
- *
- * \return Nothing
- */
-void USART3_Write(const uint8_t data);
-
-/**
- * \brief Set call back function for USART3
- *
- * \param[in] cb The call back function to set
- *
- * \param[in] type The type of ISR to be set
- *
- * \return Nothing
- */
-
-void USART3_DefaultRxIsrCb(void);
-
-void USART3_DefaultTxIsrCb(void);
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type);
-
-void USART3_SetRXISRCb(usart_callback cb);
-
-void USART3_SetTXISRCb(usart_callback cb);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* USART3_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/include/vref.h b/differential-amplifier.X/mcc_generated_files/include/vref.h
deleted file mode 100644
index 9002df4..0000000
--- a/differential-amplifier.X/mcc_generated_files/include/vref.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef VREF_H_INCLUDED
-#define VREF_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- @Summary
- Initializes the VREF_Initialize.
-
- @Description
- This routine initializes the VREF_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- VREF_Initialize();
-
-*/
-int8_t VREF_Initialize(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CCL_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/mcc.c b/differential-amplifier.X/mcc_generated_files/mcc.c
deleted file mode 100644
index 0bdb0fa..0000000
--- a/differential-amplifier.X/mcc_generated_files/mcc.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "mcc.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void)
-{
- PIN_MANAGER_Initialize();
- //CPU_Initialize();
- BOD_Initialize();
- WDT_Initialize();
- SLPCTRL_Initialize();
- CLKCTRL_Initialize();
- OPAMP_Initialize();
- ADC0_Initialize();
- DAC0_Initialize();
- RTC_Initialize();
- TCB0_Initialize();
- USART3_Initialize();
- VREF_Initialize();
- CPUINT_Initialize();
- TCB1_Initialize();
-}
-
-/**
- * \brief Initialize bod interface
- */
-int8_t BOD_Initialize()
-{
- //SLEEP DIS;
- ccp_write_io((void*)&(BOD.CTRLA),0x00);
-
- //VLMCFG FALLING; VLMIE disabled;
- BOD.INTCTRL = 0x00;
-
- //VLMLVL OFF;
- BOD.VLMCTRLA = 0x00;
-
- return 0;
-}
-
-ISR(BOD_VLM_vect)
-{
- /* Insert your AC interrupt handling code here */
-
- /* The interrupt flag has to be cleared manually */
- BOD.INTFLAGS = BOD_VLMIE_bm;
-}
-
-/**
- * \brief Initialize clkctrl interface
- */
-int8_t CLKCTRL_Initialize()
-{
- //RUNSTDBY disabled;
- ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0x00);
-
- //RUNSTDBY disabled; CSUT 1K; SEL disabled; LPMODE disabled; ENABLE disabled;
- ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),0x00);
-
- //PDIV 6X; PEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),0x10);
-
- //CFDSRC CLKMAIN; CFDTST disabled; CFDEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),0x00);
-
- //INTTYPE INT; CFD disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),0x00);
-
- //CLKOUT disabled; CLKSEL OSCHF;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),0x00);
-
- //PLLS disabled; EXTS disabled; XOSC32KS disabled; OSC32KS disabled; OSCHFS disabled; SOSC disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKSTATUS),0x00);
-
- //RUNSTDBY disabled; FREQSEL 24M; AUTOTUNE disabled;
- ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),0x24);
-
- return 0;
-}
-
-/**
- * \brief Initialize slpctrl interface
- */
-int8_t SLPCTRL_Initialize()
-{
- //SMODE IDLE; SEN disabled;
- ccp_write_io((void*)&(SLPCTRL.CTRLA),0x00);
-
- return 0;
-}
-
-/**
- * \brief Initialize wdt interface
- */
-
-int8_t WDT_Initialize()
-{
- //WINDOW OFF; PERIOD OFF;
- ccp_write_io((void*)&(WDT.CTRLA),0x00);
-
- return 0;
-}
-/*TODO comment will remove once complier support will be available.
-int8_t CPU_Initialize()
-{
- return 0;
-
-}
-*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/mcc.h b/differential-amplifier.X/mcc_generated_files/mcc.h
deleted file mode 100644
index 34fff83..0000000
--- a/differential-amplifier.X/mcc_generated_files/mcc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef MCC_H
-#define MCC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "utils/compiler.h"
-#include "include/pin_manager.h"
-#include "include/opamp.h"
-#include "include/cpuint.h"
-#include "include/tcb0.h"
-#include "include/dac0.h"
-#include "include/tcb1.h"
-#include "include/usart3.h"
-#include "include/rtc.h"
-#include "include/adc0.h"
-#include "include/vref.h"
-#include "config/clock_config.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void);
-int8_t BOD_Initialize();
-int8_t CLKCTRL_Initialize();
-int8_t SLPCTRL_Initialize();
-int8_t WDT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* MCC_H */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/opamp/opamp.h b/differential-amplifier.X/mcc_generated_files/opamp/opamp.h
new file mode 100644
index 0000000..1864361
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/opamp/opamp.h
@@ -0,0 +1,144 @@
+/**
+ * OPAMP Generated Driver API Header File
+ *
+ * @file opamp.h
+ *
+ * @defgroup opamp OPAMP
+ *
+ * @brief This file contains API prototypes and other datatypes for the OPAMP module.
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef OPAMP_H_INCLUDED
+#define OPAMP_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+#include
+
+#define OPAMP_TIMEBASE_VALUE (3)
+
+/**
+ * @ingroup opamp
+ * @brief This routine initializes the OPAMP and must be called before any other OPAMP routine is called.
+ * This routine should only be called once during system initialization.
+ * @param void
+ * @return void
+ */
+void OPAMP_Initialize(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine enables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_EnableSystem(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine disables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_DisableSystem(void);
+
+//OP0 Differential Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP0SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP0's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP0 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP0Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
+
+//OP1 Differential Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets the R1 and R2 values of OP1's internal resistor ladder as per user selection
+ * @param value - desired resistor selection. For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP1WiperResMux(OPAMP_OP1RESMUX_MUXWIP_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP1SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP1's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP1 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP1Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP1OffsetCalibration(uint8_t calValue);
+
+#endif /* OPAMP_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/opamp/src/opamp.c b/differential-amplifier.X/mcc_generated_files/opamp/src/opamp.c
new file mode 100644
index 0000000..bc344c8
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/opamp/src/opamp.c
@@ -0,0 +1,160 @@
+/**
+ * OPAMP Generated Driver File
+ *
+ * @file opamp.c
+ *
+ * @ingroup opamp
+ *
+ * @brief This is the generated driver implementation file for the OPAMP driver using AVR MCUs
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../opamp.h"
+
+void OPAMP_Initialize(void)
+{
+ OPAMP_DisableSystem();
+
+ //TIMEBASE 3;
+ OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
+
+ //DBGRUN disabled;
+ OPAMP.DBGCTRL = 0x0;
+
+ //IRSEL FULL;
+ OPAMP.PWRCTRL = 0x0;
+
+ //OP0 Configuration : Differential Amplifier
+ //OP0 Gain : 1
+ //Differential Amplifier Gain : 3
+
+ //MUXNEG OPn output (unity gain); MUXPOS VDD/2;
+ OPAMP.OP0INMUX = 0x24;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP0RESMUX = 0x0;
+
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP0CTRLA = 0x5;
+
+ //SETTLE 127;
+ OPAMP.OP0SETTLE = 0x7F;
+
+ //OP1 Configuration : Differential Amplifier
+ //OP1 Gain : 3
+ //Differential Amplifier Gain : 3
+
+ //MUXNEG Wiper from OPn's resistor ladder; MUXPOS DAC output;
+ OPAMP.OP1INMUX = 0x12;
+
+ //MUXBOT Link OP[n-1] output; MUXTOP OPn output; MUXWIP R1 = 4R, R2 = 12R, R2/R1 = 3;
+ OPAMP.OP1RESMUX = 0xB1;
+
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP1CTRLA = 0x5;
+
+ //SETTLE 127;
+ OPAMP.OP1SETTLE = 0x7F;
+
+ //OP2 Configuration : Connected Directly to Pins
+
+ //MUXNEG Negative input pin for OPn; MUXPOS Positive input pin for OPn;
+ OPAMP.OP2INMUX = 0x0;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP2RESMUX = 0x0;
+
+ //ALWAYSON disabled; EVENTEN enabled; OUTMODE Output Driver Off; RUNSTBY disabled;
+ OPAMP.OP2CTRLA = 0x2;
+
+ //SETTLE 127;
+ OPAMP.OP2SETTLE = 0x7F;
+
+ OPAMP_EnableSystem();
+}
+
+void OPAMP_EnableSystem(void)
+{
+ OPAMP.CTRLA |= OPAMP_ENABLE_bm;
+}
+
+void OPAMP_DisableSystem(void)
+{
+ OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
+}
+
+//OP0 Differential Amplifier APIs
+
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
+{
+ OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
+}
+
+void OPAMP_SetOP0SettleTime(uint8_t settleTime)
+{
+ if (settleTime > 127) {
+ settleTime = 127;
+ }
+ OPAMP.OP0SETTLE = settleTime;
+}
+
+bool OPAMP_IsOP0Settled(void)
+{
+ return OPAMP.OP0STATUS > 0;
+}
+
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
+{
+ OPAMP.OP0CAL = calValue;
+}
+
+//OP1 Differential Amplifier APIs
+
+void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value)
+{
+ OPAMP.OP1INMUX = (OPAMP.OP1INMUX & ~OPAMP_MUXPOS_gm) | value;
+}
+
+void OPAMP_SetOP1WiperResMux(OPAMP_OP1RESMUX_MUXWIP_t value)
+{
+ OPAMP.OP1RESMUX = (OPAMP.OP1RESMUX & ~OPAMP_MUXWIP_gm) | value;
+}
+
+void OPAMP_SetOP1SettleTime(uint8_t settleTime)
+{
+ if (settleTime > 127) {
+ settleTime = 127;
+ }
+ OPAMP.OP1SETTLE = settleTime;
+}
+
+bool OPAMP_IsOP1Settled(void)
+{
+ return OPAMP.OP1STATUS > 0;
+}
+
+void OPAMP_SetOP1OffsetCalibration(uint8_t calValue)
+{
+ OPAMP.OP1CAL = calValue;
+}
diff --git a/differential-amplifier.X/mcc_generated_files/src/adc0.c b/differential-amplifier.X/mcc_generated_files/src/adc0.c
deleted file mode 100644
index 0868fe2..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/adc0.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/adc0.h"
-
-adc_irq_cb_t ADC0_window_cb = NULL;
-
-/**
- * \brief Initialize ADC interface
- */
-int8_t ADC0_Initialize()
-{
-
- //SAMPNUM ACC4;
- ADC0.CTRLB = 0x02;
-
- //PRESC DIV12;
- ADC0.CTRLC = 0x03;
-
- //INITDLY DLY0; SAMPDLY DLY0;
- ADC0.CTRLD = 0x00;
-
- //WINCM NONE;
- ADC0.CTRLE = 0x00;
-
- //DBGRUN disabled;
- ADC0.DBGCTRL = 0x00;
-
- //STARTEI disabled;
- ADC0.EVCTRL = 0x00;
-
- //WCMP disabled; RESRDY enabled;
- ADC0.INTCTRL = 0x01;
-
- //MUXPOS AIN5;
- ADC0.MUXPOS = 0x05;
-
- //MUXNEG AIN6;
- ADC0.MUXNEG = 0x06;
-
- //SAMPLEN 10;
- ADC0.SAMPCTRL = 0x0A;
-
- // Window comparator high threshold
- ADC0.WINHT = 0x00;
-
- // Window comparator low threshold
- ADC0.WINLT = 0x00;
-
- //RUNSTBY disabled; CONVMODE enabled; LEFTADJ disabled; RESSEL 10BIT; FREERUN disabled; ENABLE enabled;
- ADC0.CTRLA = 0x25;
-
-
- return 0;
-}
-
-void ADC0_Enable()
-{
- ADC0.CTRLA |= ADC_ENABLE_bm;
-}
-
-void ADC0_Disable()
-{
- ADC0.CTRLA &= ~ADC_ENABLE_bm;
-}
-
-void ADC0_EnableAutoTrigger()
-{
- ADC0.EVCTRL |= ADC_STARTEI_bm;
-}
-
-void ADC0_DisableAutoTrigger()
-{
- ADC0.EVCTRL &= ~ADC_STARTEI_bm;
-}
-
-void ADC0_SetWindowHigh(adc_result_t high)
-{
- ADC0.WINHT = high;
-}
-
-void ADC0_SetWindowLow(adc_result_t low)
-{
- ADC0.WINLT = low;
-}
-
-void ADC0_SetWindowMode(adc0_window_mode_t mode)
-{
- ADC0.CTRLE = mode;
-}
-
-void ADC0_SetWindowChannel(adc_0_channel_t channel)
-{
- ADC0.MUXPOS = channel;
-}
-
-void ADC0_StartConversion(adc_0_channel_t channel)
-{
- ADC0.CTRLA &= ~ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- ADC0.CTRLA |= ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.MUXNEG = channel1;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StopConversion()
-{
- ADC0.COMMAND = ADC_SPCONV_bm;
-}
-
-bool ADC0_IsConversionDone()
-{
- return (ADC0.INTFLAGS & ADC_RESRDY_bm);
-}
-
-adc_result_t ADC0_GetConversionResult(void)
-{
- return (ADC0.RES);
-}
-
-bool ADC0_GetWindowResult(void)
-{
- bool temp = (ADC0.INTFLAGS & ADC_WCMP_bm);
- ADC0.INTFLAGS = ADC_WCMP_bm; // Clear intflag if set
- return temp;
-}
-
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel)
-{
- adc_result_t res;
-
- ADC0_StartConversion(channel);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
- return res;
-}
-
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- diff_adc_result_t res;
-
- ADC0_StartDiffConversion(channel, channel1);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS |= ADC_RESRDY_bm;
- return res;
-}
-
-uint8_t ADC0_GetResolution()
-{
- return (ADC0.CTRLA & ADC_RESSEL0_bm) ? 10 : 12;
-}
-
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f)
-{
- ADC0_window_cb = f;
-}
-
-ISR(ADC0_WCMP_vect)
-{
-
- if (ADC0_window_cb != NULL) {
- ADC0_window_cb();
- }
-
- // Clear the interrupt flag
- ADC0.INTFLAGS = ADC_WCMP_bm;
-}
-
-//ISR(ADC0_RESRDY_vect)
-//{
-// /* Insert your ADC result ready interrupt handling code here */
-//
-// /* The interrupt flag has to be cleared manually */
-// ADC0.INTFLAGS = ADC_RESRDY_bm;
-//}
diff --git a/differential-amplifier.X/mcc_generated_files/src/cpuint.c b/differential-amplifier.X/mcc_generated_files/src/cpuint.c
deleted file mode 100644
index ea41199..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/cpuint.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/cpuint.h"
-
-/**
- * \brief Initialize cpuint interface
- */
-int8_t CPUINT_Initialize()
-{
- /* IVSEL and CVT are Configuration Change Protected */
-
- //IVSEL disabled; CVT disabled; LVL0RR disabled;
- ccp_write_io((void*)&(CPUINT.CTRLA),0x00);
-
- //LVL0PRI 0;
- CPUINT.LVL0PRI = 0x00;
-
- //LVL1VEC 0;
- CPUINT.LVL1VEC = 0x00;
-
- ENABLE_INTERRUPTS();
-
- return 0;
-}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/src/dac0.c b/differential-amplifier.X/mcc_generated_files/src/dac0.c
deleted file mode 100644
index 1aba646..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/dac0.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-
-#include "../include/dac0.h"
-/**
- * \brief Initialize DAC interface
- */
-int8_t DAC0_Initialize()
-{
- //RUNSTDBY disabled; OUTEN enabled; ENABLE enabled;
- DAC0.CTRLA = 0x41;
-
- //DATA 0;
- DAC0.DATA = 0x00;
-
- return 0;
-}
-
-void DAC0_Enable()
-{
- DAC0.CTRLA |= DAC_ENABLE_bm;
-}
-
-void DAC0_Disable()
-{
- DAC0.CTRLA &= ~DAC_ENABLE_bm;
-}
-
-void DAC0_SetOutput(dac_resolution_t value)
-{
- value = value << DAC_DATA_gp;
- value = value & 0xFFC0;
- DAC0.DATA = value;
-}
-
-uint8_t DAC0_GetResolution()
-{
- return 10;
-}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/src/opamp.c b/differential-amplifier.X/mcc_generated_files/src/opamp.c
deleted file mode 100644
index 4c7b5f6..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/opamp.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#include "../include/opamp.h"
-
-void OPAMP_Initialize()
-{
- OPAMP_DisableSystem();
-
- //TIMEBASE 23;
- OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
-
- //DBGRUN disabled;
- OPAMP.DBGCTRL = 0x00;
-
- //IRSEL FULL;
- OPAMP.PWRCTRL = 0x00;
-
- //OP0 Configuration : Differential Amplifier
- //OP0 Gain : 1
- //Differential Amplifier Gain : 3.0
-
- //MUXNEG OUT; MUXPOS VDDDIV2;
- OPAMP.OP0INMUX = 0x24;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP0RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP0CTRLA = 0x05;
-
- //SETTLE 127;
- OPAMP.OP0SETTLE = 0x7F;
-
- //OP1 Configuration : Differential Amplifier
- //OP1 Gain : 3.0
- //Differential Amplifier Gain : 3.0
-
- //MUXNEG WIP; MUXPOS DAC;
- OPAMP.OP1INMUX = 0x12;
-
- //MUXWIP WIP5; MUXBOT LINKOUT; MUXTOP OUT;
- OPAMP.OP1RESMUX = 0xB1;
-
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP1CTRLA = 0x05;
-
- //SETTLE 127;
- OPAMP.OP1SETTLE = 0x7F;
-
- //OP2 Configuration : Connected Directly to Pins
-
- //MUXNEG INN; MUXPOS INP;
- OPAMP.OP2INMUX = 0x00;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP2RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE OFF; EVENTEN enabled; ALWAYSON disabled;
- OPAMP.OP2CTRLA = 0x02;
-
- //SETTLE 127;
- OPAMP.OP2SETTLE = 0x7F;
-
- OPAMP_EnableSystem();
-}
-
-void OPAMP_EnableSystem(void)
-{
- OPAMP.CTRLA |= OPAMP_ENABLE_bm;
-}
-
-void OPAMP_DisableSystem(void)
-{
- OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
-}
-
-//OP0 Differential Amplifier APIs
-
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
-{
- OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
-}
-
-void OPAMP_SetOP0SettleTime(uint8_t settleTime)
-{
- if (settleTime > 127) {
- settleTime = 127;
- }
- OPAMP.OP0SETTLE = settleTime;
-}
-
-bool OPAMP_IsOP0Settled(void)
-{
- return OPAMP.OP0STATUS > 0;
-}
-
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
-{
- OPAMP.OP0CAL = calValue;
-}
-
-//OP1 Differential Amplifier APIs
-
-void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value)
-{
- OPAMP.OP1INMUX = (OPAMP.OP1INMUX & ~OPAMP_MUXPOS_gm) | value;
-}
-
-void OPAMP_SetOP1WiperResMux(OPAMP_OP1RESMUX_MUXWIP_t value)
-{
- OPAMP.OP1RESMUX = (OPAMP.OP1RESMUX & ~OPAMP_MUXWIP_gm) | value;
-}
-
-void OPAMP_SetOP1SettleTime(uint8_t settleTime)
-{
- if (settleTime > 127) {
- settleTime = 127;
- }
- OPAMP.OP1SETTLE = settleTime;
-}
-
-bool OPAMP_IsOP1Settled(void)
-{
- return OPAMP.OP1STATUS > 0;
-}
-
-void OPAMP_SetOP1OffsetCalibration(uint8_t calValue)
-{
- OPAMP.OP1CAL = calValue;
-}
diff --git a/differential-amplifier.X/mcc_generated_files/src/pin_manager.c b/differential-amplifier.X/mcc_generated_files/src/pin_manager.c
deleted file mode 100644
index 143f9a7..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/pin_manager.c
+++ /dev/null
@@ -1,302 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/pin_manager.h"
-static void (*PORTD_PD5_InterruptHandler)(void);
-static void (*PORTB_LED0_InterruptHandler)(void);
-static void (*PORTA_PA2_InterruptHandler)(void);
-static void (*PORTD_PD6_InterruptHandler)(void);
-static void (*PORTA_PA3_InterruptHandler)(void);
-static void (*PORTB_PB1_InterruptHandler)(void);
-static void (*PORTD_PD2_InterruptHandler)(void);
-static void (*PORTB_PB0_InterruptHandler)(void);
-
-void PORT_Initialize(void);
-
-void PIN_MANAGER_Initialize()
-{
- PORT_Initialize();
-
- /* DIR Registers Initialization */
- PORTA.DIR = 0x0C;
- PORTB.DIR = 0x01;
- PORTC.DIR = 0x00;
- PORTD.DIR = 0x64;
- PORTE.DIR = 0x00;
- PORTF.DIR = 0x00;
-
- /* OUT Registers Initialization */
- PORTA.OUT = 0x00;
- PORTB.OUT = 0x00;
- PORTC.OUT = 0x00;
- PORTD.OUT = 0x00;
- PORTE.OUT = 0x00;
- PORTF.OUT = 0x00;
-
- /* PINxCTRL registers Initialization */
- PORTA.PIN0CTRL = 0x00;
- PORTA.PIN1CTRL = 0x00;
- PORTA.PIN2CTRL = 0x00;
- PORTA.PIN3CTRL = 0x00;
- PORTA.PIN4CTRL = 0x00;
- PORTA.PIN5CTRL = 0x00;
- PORTA.PIN6CTRL = 0x00;
- PORTA.PIN7CTRL = 0x00;
- PORTB.PIN0CTRL = 0x00;
- PORTB.PIN1CTRL = 0x00;
- PORTB.PIN2CTRL = 0x00;
- PORTB.PIN3CTRL = 0x00;
- PORTB.PIN4CTRL = 0x00;
- PORTB.PIN5CTRL = 0x00;
- PORTB.PIN6CTRL = 0x00;
- PORTB.PIN7CTRL = 0x00;
- PORTC.PIN0CTRL = 0x00;
- PORTC.PIN1CTRL = 0x00;
- PORTC.PIN2CTRL = 0x00;
- PORTC.PIN3CTRL = 0x00;
- PORTC.PIN4CTRL = 0x00;
- PORTC.PIN5CTRL = 0x00;
- PORTC.PIN6CTRL = 0x00;
- PORTC.PIN7CTRL = 0x00;
- PORTD.PIN0CTRL = 0x00;
- PORTD.PIN1CTRL = 0x04;
- PORTD.PIN2CTRL = 0x04;
- PORTD.PIN3CTRL = 0x04;
- PORTD.PIN4CTRL = 0x04;
- PORTD.PIN5CTRL = 0x04;
- PORTD.PIN6CTRL = 0x04;
- PORTD.PIN7CTRL = 0x04;
- PORTE.PIN0CTRL = 0x00;
- PORTE.PIN1CTRL = 0x04;
- PORTE.PIN2CTRL = 0x00;
- PORTE.PIN3CTRL = 0x04;
- PORTE.PIN4CTRL = 0x00;
- PORTE.PIN5CTRL = 0x00;
- PORTE.PIN6CTRL = 0x00;
- PORTE.PIN7CTRL = 0x00;
- PORTF.PIN0CTRL = 0x00;
- PORTF.PIN1CTRL = 0x00;
- PORTF.PIN2CTRL = 0x00;
- PORTF.PIN3CTRL = 0x00;
- PORTF.PIN4CTRL = 0x00;
- PORTF.PIN5CTRL = 0x00;
- PORTF.PIN6CTRL = 0x00;
- PORTF.PIN7CTRL = 0x00;
-
- /* Multi-pin Config registers Initialization */
- PORTA.PINCONFIG = 0x00;
- PORTA.PINCTRLCLR = 0x00;
- PORTA.PINCTRLSET = 0x00;
- PORTA.PINCTRLUPD = 0x00;
- PORTB.PINCONFIG = 0x00;
- PORTB.PINCTRLCLR = 0x00;
- PORTB.PINCTRLSET = 0x00;
- PORTB.PINCTRLUPD = 0x00;
- PORTC.PINCONFIG = 0x00;
- PORTC.PINCTRLCLR = 0x00;
- PORTC.PINCTRLSET = 0x00;
- PORTC.PINCTRLUPD = 0x00;
- PORTD.PINCONFIG = 0x00;
- PORTD.PINCTRLCLR = 0x00;
- PORTD.PINCTRLSET = 0x00;
- PORTD.PINCTRLUPD = 0x00;
- PORTE.PINCONFIG = 0x00;
- PORTE.PINCTRLCLR = 0x00;
- PORTE.PINCTRLSET = 0x00;
- PORTE.PINCTRLUPD = 0x00;
- PORTF.PINCONFIG = 0x00;
- PORTF.PINCTRLCLR = 0x00;
- PORTF.PINCTRLSET = 0x00;
- PORTF.PINCTRLUPD = 0x00;
-
- /* PORTMUX Initialization */
- PORTMUX.ACROUTEA = 0x00;
- PORTMUX.CCLROUTEA = 0x00;
- PORTMUX.EVSYSROUTEA = 0x00;
- PORTMUX.SPIROUTEA = 0x00;
- PORTMUX.TCAROUTEA = 0x00;
- PORTMUX.TCBROUTEA = 0x00;
- PORTMUX.TCDROUTEA = 0x00;
- PORTMUX.TWIROUTEA = 0x00;
- PORTMUX.USARTROUTEA = 0x00;
- PORTMUX.USARTROUTEB = 0x00;
- PORTMUX.ZCDROUTEA = 0x00;
-
- // register default ISC callback functions at runtime; use these methods to register a custom function
- PORTD_PD5_SetInterruptHandler(PORTD_PD5_DefaultInterruptHandler);
- PORTB_LED0_SetInterruptHandler(PORTB_LED0_DefaultInterruptHandler);
- PORTA_PA2_SetInterruptHandler(PORTA_PA2_DefaultInterruptHandler);
- PORTD_PD6_SetInterruptHandler(PORTD_PD6_DefaultInterruptHandler);
- PORTA_PA3_SetInterruptHandler(PORTA_PA3_DefaultInterruptHandler);
- PORTB_PB1_SetInterruptHandler(PORTB_PB1_DefaultInterruptHandler);
- PORTD_PD2_SetInterruptHandler(PORTD_PD2_DefaultInterruptHandler);
- PORTB_PB0_SetInterruptHandler(PORTB_PB0_DefaultInterruptHandler);
-}
-
-void PORT_Initialize(void)
-{
- /* On AVR devices all peripherals are enable from power on reset, this
- * disables all peripherals to save power. Driver shall enable
- * peripheral if used */
-
- /* Set all pins to low power mode */
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
-}
-
-/**
- Allows selecting an interrupt handler for PORTD_PD5 at application runtime
-*/
-void PORTD_PD5_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD5_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD5_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD5 interrupt custom code
- // or set custom function using PORTD_PD5_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_LED0 at application runtime
-*/
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_LED0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_LED0_DefaultInterruptHandler(void)
-{
- // add your PORTB_LED0 interrupt custom code
- // or set custom function using PORTB_LED0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA2 at application runtime
-*/
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA2_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA2_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA2 interrupt custom code
- // or set custom function using PORTA_PA2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD6 at application runtime
-*/
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD6_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD6_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD6 interrupt custom code
- // or set custom function using PORTD_PD6_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA3 at application runtime
-*/
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA3_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA3_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA3 interrupt custom code
- // or set custom function using PORTA_PA3_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB1 at application runtime
-*/
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB1_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB1_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB1 interrupt custom code
- // or set custom function using PORTB_PB1_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD2 at application runtime
-*/
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD2_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD2_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD2 interrupt custom code
- // or set custom function using PORTD_PD2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB0 at application runtime
-*/
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB0_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB0 interrupt custom code
- // or set custom function using PORTB_PB0_SetInterruptHandler()
-}
diff --git a/differential-amplifier.X/mcc_generated_files/src/rtc.c b/differential-amplifier.X/mcc_generated_files/src/rtc.c
deleted file mode 100644
index 11771a9..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/rtc.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/rtc.h"
-
-/**
- * \brief Initialize rtc interface
- *
- * \return Initialization status.
- */
-
-void (*RTC_OVF_isr_cb)(void) = NULL;
-void (*RTC_CMP_isr_cb)(void) = NULL;
-void (*RTC_PIT_isr_cb)(void) = NULL;
-
-/**
- * \brief Initialize RTC interface
- */
-int8_t RTC_Initialize()
-{
- while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
- }
- //Compare
- RTC.CMP = 0x00;
-
- //Count
- RTC.CNT = 0x00;
-
- //Period
- RTC.PER = 0x3FF;
-
- //Clock selection
- RTC.CLKSEL = 0x00;
-
- //CMP disabled; OVF enabled;
- RTC.INTCTRL = 0x01;
-
- //RUNSTDBY disabled; PRESCALER DIV32; CORREN disabled; RTCEN enabled;
- RTC.CTRLA = 0x29;
-
- while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
- }
- //PI disabled;
- RTC.PITINTCTRL = 0x00;
-
-
- return 0;
-}
-
-void RTC_SetOVFIsrCallback(RTC_cb_t cb)
-{
- RTC_OVF_isr_cb = cb;
-}
-
-void RTC_SetCMPIsrCallback(RTC_cb_t cb)
-{
- RTC_CMP_isr_cb = cb;
-}
-
-void RTC_SetPITIsrCallback(RTC_cb_t cb)
-{
- RTC_PIT_isr_cb = cb;
-}
-
-ISR(RTC_CNT_vect)
-{
- if (RTC.INTFLAGS & RTC_OVF_bm )
- {
- if (RTC_OVF_isr_cb != NULL)
- {
- (*RTC_OVF_isr_cb)();
- }
- }
-
- if (RTC.INTFLAGS & RTC_CMP_bm )
- {
- if (RTC_CMP_isr_cb != NULL)
- {
- (*RTC_CMP_isr_cb)();
- }
- }
- RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
-}
-
-ISR(RTC_PIT_vect)
-{
- if (RTC_PIT_isr_cb != NULL)
- {
- (*RTC_PIT_isr_cb)();
- }
- RTC.PITINTFLAGS = RTC_PI_bm;
-}
-
-inline void RTC_WriteCounter(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_CNTBUSY_bm);
- RTC.CNT = timerVal;
-}
-
-inline uint16_t RTC_ReadCounter(void)
-{
- return RTC.CNT;
-}
-
-inline void RTC_WritePeroid(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_PERBUSY_bm);
- RTC.PER = timerVal;
-}
-
-inline uint16_t RTC_ReadPeriod(void)
-{
- return RTC.PER;
-}
-
-inline void RTC_EnableCMPInterrupt(void)
-{
- RTC.INTCTRL |= RTC_CMP_bm;
-}
-
-inline void RTC_DisableCMPInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_CMP_bm;
-}
-
-inline void RTC_EnableOVFInterrupt(void)
-{
- RTC.INTCTRL |= RTC_OVF_bm;
-}
-
-inline void RTC_DisableOVFInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_OVF_bm;
-}
-
-inline void RTC_EnablePITInterrupt(void)
-{
- RTC.PITINTCTRL |= RTC_PI_bm;
-}
-
-inline void RTC_DisablePITInterrupt(void)
-{
- RTC.PITINTCTRL &= ~RTC_PI_bm;
-}
-
-inline void RTC_ClearOVFInterruptFlag(void)
-{
- RTC.INTFLAGS &= ~RTC_OVF_bm;
-}
-
-inline bool RTC_IsOVFInterruptEnabled(void)
-{
- return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
-}
diff --git a/differential-amplifier.X/mcc_generated_files/src/tcb0.c b/differential-amplifier.X/mcc_generated_files/src/tcb0.c
deleted file mode 100644
index 368d94a..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/tcb0.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb0.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB0_CAPT_isr_cb)(void) = NULL;
-
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb)
-{
- TCB0_CAPT_isr_cb = cb;
-}
-
-ISR(TCB0_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB0.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB0_CAPT_isr_cb != NULL)
- {
- (*TCB0_CAPT_isr_cb)();
- }
-
- TCB0.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB0_Initialize()
-{
- //Compare or Capture
- TCB0.CCMP = 0x284F;
-
- //Count
- TCB0.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB0.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB0.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB0.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB0.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB0.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB0.TEMP = 0x00;
-
- //RUNSTDBY enabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB0.CTRLA = 0x41;
-
- return 0;
-}
-
-void TCB0_WriteTimer(uint16_t timerVal)
-{
- TCB0.CNT=timerVal;
-}
-
-uint16_t TCB0_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB0.CNT;
-
- return readVal;
-}
-
-void TCB0_EnableCaptInterrupt(void)
-{
- TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB0_DisableCaptInterrupt(void)
-{
- TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB0_ClearCaptInterruptFlag(void)
-{
- TCB0.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB0_IsCaptInterruptEnabled(void)
-{
- return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/differential-amplifier.X/mcc_generated_files/src/tcb1.c b/differential-amplifier.X/mcc_generated_files/src/tcb1.c
deleted file mode 100644
index 5146d75..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/tcb1.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb1.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB1_CAPT_isr_cb)(void) = NULL;
-
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb)
-{
- TCB1_CAPT_isr_cb = cb;
-}
-
-ISR(TCB1_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB1.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB1_CAPT_isr_cb != NULL)
- {
- (*TCB1_CAPT_isr_cb)();
- }
-
- TCB1.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB1_Initialize()
-{
- //Compare or Capture
- TCB1.CCMP = 0x752F;
-
- //Count
- TCB1.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB1.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB1.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB1.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB1.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB1.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB1.TEMP = 0x00;
-
- //RUNSTDBY disabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB1.CTRLA = 0x01;
-
- return 0;
-}
-
-void TCB1_WriteTimer(uint16_t timerVal)
-{
- TCB1.CNT=timerVal;
-}
-
-uint16_t TCB1_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB1.CNT;
-
- return readVal;
-}
-
-void TCB1_EnableCaptInterrupt(void)
-{
- TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB1_DisableCaptInterrupt(void)
-{
- TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB1_ClearCaptInterruptFlag(void)
-{
- TCB1.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB1_IsCaptInterruptEnabled(void)
-{
- return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/differential-amplifier.X/mcc_generated_files/src/usart3.c b/differential-amplifier.X/mcc_generated_files/src/usart3.c
deleted file mode 100644
index 908fe38..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/usart3.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/usart3.h"
-
-#if defined(__GNUC__)
-
-int USART3_printCHAR(char character, FILE *stream)
-{
- USART3_Write(character);
- return 0;
-}
-
-FILE USART3_stream = FDEV_SETUP_STREAM(USART3_printCHAR, NULL, _FDEV_SETUP_WRITE);
-
-#elif defined(__ICCAVR__)
-
-int putchar(int outChar)
-{
- USART3_Write(outChar);
- return outChar;
-}
-#endif
-
-/* Static Variables holding the ringbuffer used in IRQ mode */
-static uint8_t USART3_rxbuf[USART3_RX_BUFFER_SIZE];
-static volatile uint8_t USART3_rx_head;
-static volatile uint8_t USART3_rx_tail;
-static volatile uint8_t USART3_rx_elements;
-static uint8_t USART3_txbuf[USART3_TX_BUFFER_SIZE];
-static volatile uint8_t USART3_tx_head;
-static volatile uint8_t USART3_tx_tail;
-static volatile uint8_t USART3_tx_elements;
-
-void (*USART3_rx_isr_cb)(void) = &USART3_DefaultRxIsrCb;
-
-void (*USART3_tx_isr_cb)(void) = &USART3_DefaultTxIsrCb;
-
-void USART3_DefaultRxIsrCb(void)
-{
- uint8_t data;
- uint8_t tmphead;
-
- /* Read the received data */
- data = USART3.RXDATAL;
- /* Calculate buffer index */
- tmphead = (USART3_rx_head + 1) & USART3_RX_BUFFER_MASK;
-
- if (tmphead == USART3_rx_tail) {
- /* ERROR! Receive buffer overflow */
- }else {
- /*Store new index*/
- USART3_rx_head = tmphead;
-
- /* Store received data in buffer */
- USART3_rxbuf[tmphead] = data;
- USART3_rx_elements++;
- }
-}
-
-void USART3_DefaultTxIsrCb(void)
-{
- uint8_t tmptail;
-
- /* Check if all data is transmitted */
- if (USART3_tx_elements != 0) {
- /* Calculate buffer index */
- tmptail = (USART3_tx_tail + 1) & USART3_TX_BUFFER_MASK;
- /* Store new index */
- USART3_tx_tail = tmptail;
- /* Start transmission */
- USART3.TXDATAL = USART3_txbuf[tmptail];
-
- USART3_tx_elements--;
- }
-
- if (USART3_tx_elements == 0) {
- /* Disable Tx interrupt */
- USART3.CTRLA &= ~(1 << USART_DREIE_bp);
- }
-}
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type)
-{
- switch (type) {
- case USART3_RX_CB:
- USART3_rx_isr_cb = cb;
- break;
- case USART3_TX_CB:
- USART3_tx_isr_cb = cb;
- break;
- default:
- // do nothing
- break;
- }
-}
-
-void USART3_SetRXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_RX_CB);
-}
-
-void USART3_SetTXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_TX_CB);
-}
-
-/* Interrupt service routine for RX complete */
-ISR(USART3_RXC_vect)
-{
- if (USART3_rx_isr_cb != NULL)
- {
- (*USART3_rx_isr_cb)();
- }
-}
-
-/* Interrupt service routine for Data Register Empty */
-ISR(USART3_DRE_vect)
-{
- if (USART3_tx_isr_cb != NULL)
- {
- (*USART3_tx_isr_cb)();
- }
-}
-
-ISR(USART3_TXC_vect)
-{
- USART3.STATUS |= USART_TXCIF_bm;
-}
-
-bool USART3_IsTxReady()
-{
- return (USART3_tx_elements != USART3_TX_BUFFER_SIZE);
-}
-
-bool USART3_IsRxReady()
-{
- return (USART3_rx_elements != 0);
-}
-
-bool USART3_IsTxBusy()
-{
- return (!(USART3.STATUS & USART_TXCIF_bm));
-}
-
-bool USART3_IsTxDone()
-{
- return (USART3.STATUS & USART_TXCIF_bm);
-}
-
-uint8_t USART3_Read(void)
-{
- uint8_t tmptail;
-
- /* Wait for incoming data */
- while (USART3_rx_elements == 0)
- ;
- /* Calculate buffer index */
- tmptail = (USART3_rx_tail + 1) & USART3_RX_BUFFER_MASK;
- /* Store new index */
- USART3_rx_tail = tmptail;
- ENTER_CRITICAL(R);
- USART3_rx_elements--;
- EXIT_CRITICAL(R);
-
- /* Return data */
- return USART3_rxbuf[tmptail];
-}
-
-void USART3_Write(const uint8_t data)
-{
- uint8_t tmphead;
-
- /* Calculate buffer index */
- tmphead = (USART3_tx_head + 1) & USART3_TX_BUFFER_MASK;
- /* Wait for free space in buffer */
- while (USART3_tx_elements == USART3_TX_BUFFER_SIZE)
- ;
- /* Store data in buffer */
- USART3_txbuf[tmphead] = data;
- /* Store new index */
- USART3_tx_head = tmphead;
- ENTER_CRITICAL(W);
- USART3_tx_elements++;
- EXIT_CRITICAL(W);
- /* Enable Tx interrupt */
- USART3.CTRLA |= (1 << USART_DREIE_bp);
-}
-
-void USART3_Initialize()
-{
- //set baud rate register
- USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
-
- //RXCIE disabled; TXCIE disabled; DREIE enabled; RXSIE disabled; LBME disabled; ABEIE disabled; RS485 DISABLE;
- USART3.CTRLA = 0x20;
-
- //RXEN disabled; TXEN enabled; SFDEN disabled; ODME disabled; RXMODE NORMAL; MPCM disabled;
- USART3.CTRLB = 0x40;
-
- //CMODE ASYNCHRONOUS; PMODE DISABLED; SBMODE 1BIT; CHSIZE 8BIT; UDORD disabled; UCPHA disabled;
- USART3.CTRLC = 0x03;
-
- //DBGCTRL_DBGRUN
- USART3.DBGCTRL = 0x00;
-
- //EVCTRL_IREI
- USART3.EVCTRL = 0x00;
-
- //RXPLCTRL_RXPL
- USART3.RXPLCTRL = 0x00;
-
- //TXPLCTRL_TXPL
- USART3.TXPLCTRL = 0x00;
-
-
- uint8_t x;
-
- /* Initialize ringbuffers */
- x = 0;
-
- USART3_rx_tail = x;
- USART3_rx_head = x;
- USART3_rx_elements = x;
- USART3_tx_tail = x;
- USART3_tx_head = x;
- USART3_tx_elements = x;
-
-#if defined(__GNUC__)
- stdout = &USART3_stream;
-#endif
-
-}
-
-void USART3_Enable()
-{
- USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
-}
-
-void USART3_EnableRx()
-{
- USART3.CTRLB |= USART_RXEN_bm;
-}
-
-void USART3_EnableTx()
-{
- USART3.CTRLB |= USART_TXEN_bm;
-}
-
-void USART3_Disable()
-{
- USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
-}
-
-uint8_t USART3_GetData()
-{
- return USART3.RXDATAL;
-}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/src/vref.c b/differential-amplifier.X/mcc_generated_files/src/vref.c
deleted file mode 100644
index fdbf6e7..0000000
--- a/differential-amplifier.X/mcc_generated_files/src/vref.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/vref.h"
-
-int8_t VREF_Initialize()
-{
- //ALWAYSON disabled; REFSEL 1V024;
- VREF.ACREF = 0x00;
-
- //ALWAYSON enabled; REFSEL VDD;
- VREF.ADC0REF = 0x85;
-
- //ALWAYSON enabled; REFSEL 2V048;
- VREF.DAC0REF = 0x81;
-
- return 0;
-}
diff --git a/differential-amplifier.X/mcc_generated_files/system/ccp.h b/differential-amplifier.X/mcc_generated_files/system/ccp.h
new file mode 100644
index 0000000..9fb8a16
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/ccp.h
@@ -0,0 +1,72 @@
+/**
+ * CCP Header File
+ *
+ * @file ccp.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the Configuration Change Protection (CCP) header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CPU_CCP_H
+#define CPU_CCP_H
+
+#include "../system/utils/compiler.h"
+#include "../system/protected_io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Writes to a CCP-protected 8-bit I/O register.
+ * @param addr Address of the I/O register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_io(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_IOREG_gc, value);
+}
+
+/**
+ * @brief Writes to a CCP-protected 8-bit SPM register.
+ * @param addr Address of the SPM register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impacton calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_spm(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_SPM_gc, value);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CPU_CCP_H */
diff --git a/differential-amplifier.X/mcc_generated_files/system/clock.h b/differential-amplifier.X/mcc_generated_files/system/clock.h
new file mode 100644
index 0000000..c769897
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/clock.h
@@ -0,0 +1,70 @@
+
+/**
+ * CLKCTRL Generated Driver API Header File
+ *
+ * @file clkctrl.h
+ *
+ * @defgroup clkctrl CLKCTRL
+ *
+ * @brief This header file provides APIs for the CLKCTRL driver.
+ *
+ * @version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CLOCK_H
+#define CLOCK_H
+
+#ifndef F_CPU
+#define F_CPU 4000000UL
+#endif
+
+#include "ccp.h"
+
+/**
+ * @ingroup clkctrl
+ * @brief Initializes the CLKCTRL module.
+ * @param None.
+ * @return None.
+ */
+void CLOCK_Initialize(void);
+
+/**
+ * @ingroup clkctrl
+ * @brief Enables the Clock Failure Detection on the main clock.
+ * @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
+ * @return None.
+ */
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);
+
+/**
+ * @ingroup clkctrl
+ * @brief Disables the Clock Failure Detection on the main clock.
+ * @param None.
+ * @return None.
+ */
+void CFD_Disable(void);
+
+#endif // CLOCK_H
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/config_bits.h b/differential-amplifier.X/mcc_generated_files/system/config_bits.h
new file mode 100644
index 0000000..4a4e1b6
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/config_bits.h
@@ -0,0 +1,44 @@
+/**
+ * CONFIGURATION BITS Generated Driver Header File
+ *
+ * @file config_bits.h
+ *
+ * @defgroup config_bitsdriver CONFIGBITS Driver
+ *
+ * @brief This file contains the API Prototypes for the Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef CONFIG_BITS_H
+#define CONFIG_BITS_H
+
+#include "../system/clock.h"
+
+#endif //CONFIG_BITS_H
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/interrupt.h b/differential-amplifier.X/mcc_generated_files/system/interrupt.h
new file mode 100644
index 0000000..d2a9281
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/interrupt.h
@@ -0,0 +1,57 @@
+/**
+ * Interrupt Manager Generated Driver API Header File.
+ *
+ * @file interrupt.h
+ *
+ * @defgroup interrupt INTERRUPT
+ *
+ * @brief This file contains the API prototype for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef INTERRUPT_H
+#define INTERRUPT_H
+
+#include "../system/utils/compiler.h"
+#include "ccp.h"
+#include "../system/utils/atomic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup interrupt
+ * @brief Initializes the Interrupt module.
+ * @retval 0 - Initialization is successful.
+ */
+int8_t CPUINT_Initialize();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INTERRUPT_H */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/pins.h b/differential-amplifier.X/mcc_generated_files/system/pins.h
new file mode 100644
index 0000000..7f9d8e7
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/pins.h
@@ -0,0 +1,328 @@
+/**
+ * Generated Pins header File
+ *
+ * @file pins.h
+ *
+ * @defgroup pinsdriver Pins Driver
+ *
+ * @brief This is generated driver header for pins.
+ * This header file provides APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PINS_H_INCLUDED
+#define PINS_H_INCLUDED
+
+#include
+#include "./port.h"
+
+//get/set IO_PB0 aliases
+#define IO_PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
+#define IO_PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
+#define IO_PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
+#define IO_PB0_GetValue() (VPORTB.IN & (0x1 << 0))
+#define IO_PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
+#define IO_PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
+#define IO_PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB0_SetInterruptHandler IO_PB0_SetInterruptHandler
+
+//get/set IO_PD2 aliases
+#define IO_PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
+#define IO_PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
+#define IO_PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
+#define IO_PD2_GetValue() (VPORTD.IN & (0x1 << 2))
+#define IO_PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
+#define IO_PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
+#define IO_PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD2_SetInterruptHandler IO_PD2_SetInterruptHandler
+
+//get/set IO_PD5 aliases
+#define IO_PD5_SetHigh() do { PORTD_OUTSET = 0x20; } while(0)
+#define IO_PD5_SetLow() do { PORTD_OUTCLR = 0x20; } while(0)
+#define IO_PD5_Toggle() do { PORTD_OUTTGL = 0x20; } while(0)
+#define IO_PD5_GetValue() (VPORTD.IN & (0x1 << 5))
+#define IO_PD5_SetDigitalInput() do { PORTD_DIRCLR = 0x20; } while(0)
+#define IO_PD5_SetDigitalOutput() do { PORTD_DIRSET = 0x20; } while(0)
+#define IO_PD5_SetPullUp() do { PORTD_PIN5CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD5_ResetPullUp() do { PORTD_PIN5CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD5_SetInverted() do { PORTD_PIN5CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD5_ResetInverted() do { PORTD_PIN5CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD5_DisableInterruptOnChange() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD5_EnableInterruptForBothEdges() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD5_EnableInterruptForRisingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD5_EnableInterruptForFallingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD5_DisableDigitalInputBuffer() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD5_EnableInterruptForLowLevelSensing() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD5_SetInterruptHandler IO_PD5_SetInterruptHandler
+
+//get/set IO_PD6 aliases
+#define IO_PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
+#define IO_PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
+#define IO_PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
+#define IO_PD6_GetValue() (VPORTD.IN & (0x1 << 6))
+#define IO_PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
+#define IO_PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
+#define IO_PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD6_SetInterruptHandler IO_PD6_SetInterruptHandler
+
+//get/set IO_PA3 aliases
+#define IO_PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
+#define IO_PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
+#define IO_PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
+#define IO_PA3_GetValue() (VPORTA.IN & (0x1 << 3))
+#define IO_PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
+#define IO_PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
+#define IO_PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA3_SetInterruptHandler IO_PA3_SetInterruptHandler
+
+//get/set IO_PA2 aliases
+#define IO_PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
+#define IO_PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
+#define IO_PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
+#define IO_PA2_GetValue() (VPORTA.IN & (0x1 << 2))
+#define IO_PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
+#define IO_PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
+#define IO_PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA2_SetInterruptHandler IO_PA2_SetInterruptHandler
+
+//get/set LED0 aliases
+#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
+#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
+#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
+#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
+#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
+#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
+#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB3_SetInterruptHandler LED0_SetInterruptHandler
+
+/**
+ * @ingroup pinsdriver
+ * @brief GPIO and peripheral I/O initialization
+ * @param none
+ * @return none
+ */
+void PIN_MANAGER_Initialize();
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PB0 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PB0_SetInterruptHandler() method.
+ * This handler is called every time the IO_PB0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PB0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PB0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PB0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD5 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD5_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD5 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD5_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD5 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD5 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD5_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD6 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD6_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD6 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD6_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD6 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD6 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA3 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA3_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA3 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA3_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA3 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA3 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for LED0 pin.
+ * This is a predefined interrupt handler to be used together with the LED0_SetInterruptHandler() method.
+ * This handler is called every time the LED0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void LED0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for LED0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for LED0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+#endif /* PINS_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/system/port.h b/differential-amplifier.X/mcc_generated_files/system/port.h
new file mode 100644
index 0000000..0272de1
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/port.h
@@ -0,0 +1,1320 @@
+/**
+ * Generated Ports header File
+ *
+ * @file port.h
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This Source file provides APIs.
+ *
+ * @version Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef PORT_INCLUDED
+#define PORT_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "utils/compiler.h"
+
+/* @ingroup pinsdriver
+ * @enum port_pull_mode
+ * Defines the pullup modes.
+ */
+enum port_pull_mode {
+ PORT_PULL_OFF,
+ PORT_PULL_UP,
+};
+
+/* @ingroup pinsdriver
+ * @enum port_dir
+ * Defines the port directions.
+ */
+enum port_dir {
+ PORT_DIR_IN,
+ PORT_DIR_OUT,
+ PORT_DIR_OFF,
+};
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= mask;
+ } else {
+ VPORTA.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= (1 << pin);
+ } else {
+ VPORTA.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTA_toggle_port_level(const uint8_t mask)
+{
+ PORTA.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTA_toggle_pin_level(const uint8_t pin)
+{
+ PORTA.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTA_get_port_level()
+{
+ return VPORTA.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTA_get_pin_level(const uint8_t pin)
+{
+ return VPORTA.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTA_write_port(const uint8_t value)
+{
+ VPORTA.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= mask;
+ } else {
+ VPORTB.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= (1 << pin);
+ } else {
+ VPORTB.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTB_toggle_port_level(const uint8_t mask)
+{
+ PORTB.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTB_toggle_pin_level(const uint8_t pin)
+{
+ PORTB.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTB_get_port_level()
+{
+ return VPORTB.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTB_get_pin_level(const uint8_t pin)
+{
+ return VPORTB.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTB_write_port(const uint8_t value)
+{
+ VPORTB.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= mask;
+ } else {
+ VPORTC.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= (1 << pin);
+ } else {
+ VPORTC.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTC_toggle_port_level(const uint8_t mask)
+{
+ PORTC.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTC_toggle_pin_level(const uint8_t pin)
+{
+ PORTC.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTC_get_port_level()
+{
+ return VPORTC.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTC_get_pin_level(const uint8_t pin)
+{
+ return VPORTC.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTC_write_port(const uint8_t value)
+{
+ VPORTC.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= mask;
+ } else {
+ VPORTD.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= (1 << pin);
+ } else {
+ VPORTD.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTD_toggle_port_level(const uint8_t mask)
+{
+ PORTD.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTD_toggle_pin_level(const uint8_t pin)
+{
+ PORTD.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTD_get_port_level()
+{
+ return VPORTD.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTD_get_pin_level(const uint8_t pin)
+{
+ return VPORTD.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTD_write_port(const uint8_t value)
+{
+ VPORTD.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= mask;
+ } else {
+ VPORTE.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= (1 << pin);
+ } else {
+ VPORTE.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTE_toggle_port_level(const uint8_t mask)
+{
+ PORTE.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTE_toggle_pin_level(const uint8_t pin)
+{
+ PORTE.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTE_get_port_level()
+{
+ return VPORTE.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTE_get_pin_level(const uint8_t pin)
+{
+ return VPORTE.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTE_write_port(const uint8_t value)
+{
+ VPORTE.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= mask;
+ } else {
+ VPORTF.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= (1 << pin);
+ } else {
+ VPORTF.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTF_toggle_port_level(const uint8_t mask)
+{
+ PORTF.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTF_toggle_pin_level(const uint8_t pin)
+{
+ PORTF.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTF_get_port_level()
+{
+ return VPORTF.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTF_get_pin_level(const uint8_t pin)
+{
+ return VPORTF.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTF_write_port(const uint8_t value)
+{
+ VPORTF.OUT = value;
+}
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/protected_io.h b/differential-amplifier.X/mcc_generated_files/system/protected_io.h
new file mode 100644
index 0000000..74e1fb5
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/protected_io.h
@@ -0,0 +1,80 @@
+/**
+ * protected_io Header File
+ *
+ * @file protected_io.h
+ *
+ * @defgroup doc_driver_system_protected_io Protected IO
+ *
+ * @brief This file contains the generated prtected_io header file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
+ *
+ *@{
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PROTECTED_IO_H
+#define PROTECTED_IO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__DOXYGEN__)
+//! \name IAR Memory Model defines.
+//@{
+
+/**
+ * @def CONFIG_MEMORY_MODEL_TINY
+ * @brief Configuration symbol to enable 8 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_TINY
+
+/**
+ * @def CONFIG_MEMORY_MODEL_SMALL
+ * @brief Configuration symbol to enable 16 bit pointers.
+ * NOTE: If no memory model is defined, SMALL is default.
+ */
+#define CONFIG_MEMORY_MODEL_SMALL
+
+/**
+ * @def CONFIG_MEMORY_MODEL_LARGE
+ * @brief Configuration symbol to enable 24 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_LARGE
+
+//@}
+#endif
+
+/**
+ * @brief Writes to an 8-bit I/O register protected by CCP or a protection bit.
+ * @param addr Address of the I/O register.
+ * @param magic CCP magic value or Mask for protection bit.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
+
+/** @} */
+
+#endif /* PROTECTED_IO_H */
diff --git a/differential-amplifier.X/mcc_generated_files/system/src/clock.c b/differential-amplifier.X/mcc_generated_files/system/src/clock.c
new file mode 100644
index 0000000..f0a30a7
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/src/clock.c
@@ -0,0 +1,104 @@
+
+
+/**
+ * CLKCTRL Generated Driver File
+ *
+ * @file clkctrl.c
+ *
+ * @ingroup clkctrl
+ *
+ * @brief This file contains the driver code for CLKCTRL module.
+ *
+ * version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../clock.h"
+
+void CLOCK_Initialize(void)
+{
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),(0 << CLKCTRL_CLKOUT_bp) // CLKOUT disabled
+ | CLKCTRL_CLKSEL_OSCHF_gc // CLKSEL Internal high-frequency oscillator
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc // PDIV 6X
+ | (0 << CLKCTRL_PEN_bp) // PEN disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),(0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),(0 << CLKCTRL_AUTOTUNE_bp) // AUTOTUNE disabled
+ | CLKCTRL_FRQSEL_4M_gc // FRQSEL 4 MHz system clock (default)
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFTUNE),0x0 // TUNE 0x0
+ );
+ ccp_write_io((void*)&(CLKCTRL.PLLCTRLA),CLKCTRL_MULFAC_DISABLE_gc // MULFAC PLL is disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | CLKCTRL_SOURCE_OSCHF_gc // SOURCE OSCHF
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc // CSUT 1k cycles
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | (0 << CLKCTRL_LPMODE_bp) // LPMODE disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << CLKCTRL_SEL_bp) // SEL disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),(0 << CLKCTRL_CFDEN_bp) // CFDEN disabled
+ | CLKCTRL_CFDSRC_CLKMAIN_gc // CFDSRC CLKMAIN
+ | (0 << CLKCTRL_CFDTST_bp) // CFDTST disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ | CLKCTRL_INTTYPE_INT_gc // INTTYPE INT
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTFLAGS),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSCHFCTRLA),CLKCTRL_CSUTHF_256_gc // CSUTHF 256
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | CLKCTRL_FRQRANGE_8M_gc // FRQRANGE 8M
+ | (0 << CLKCTRL_RUNSTBY_bp) // RUNSTBY disabled
+ | CLKCTRL_SELHF_XTAL_gc // SELHF XTAL
+ );
+
+ // System clock stability check by polling the status register.
+ while(!(CLKCTRL.MCLKSTATUS & CLKCTRL_OSCHFS_bm))
+ {
+ }
+
+}
+
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source)
+{
+ /* Enable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, cfd_source | CLKCTRL_CFDEN_bm);
+}
+
+void CFD_Disable(void)
+{
+ /* Disable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, CLKCTRL.MCLKCTRLC & ~CLKCTRL_CFDEN_bm);
+}
+
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/src/config_bits.c b/differential-amplifier.X/mcc_generated_files/system/src/config_bits.c
new file mode 100644
index 0000000..f785fe7
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/src/config_bits.c
@@ -0,0 +1,49 @@
+/**
+ * CONFIGURATION BITS Generated Driver Source File
+ *
+ * @file config_bits.c
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the API implementation for the Device Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include
+
+/**
+ * Configures the Fuse bits.
+ */
+FUSES =
+{
+ .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
+ .BOOTSIZE = 0x0,
+ .CODESIZE = 0x0,
+ .OSCCFG = CLKSEL_OSCHF_gc,
+ .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
+ .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
+ .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
+};
diff --git a/differential-amplifier.X/mcc_generated_files/system/src/interrupt.c b/differential-amplifier.X/mcc_generated_files/system/src/interrupt.c
new file mode 100644
index 0000000..f5169f3
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/src/interrupt.c
@@ -0,0 +1,53 @@
+/**
+ * Interrupt Manager Generated Driver File.
+ *
+ * @file interrupt.c
+ *
+ * @ingroup interrupt
+ *
+ * @brief This file contains the API implementation for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../interrupt.h"
+
+int8_t CPUINT_Initialize()
+{
+ /* IVSEL and CVT are Configuration Change Protected */
+
+ //CVT disabled; IVSEL disabled; LVL0RR disabled;
+ ccp_write_io((void*)&(CPUINT.CTRLA),0x0);
+
+ //LVL0PRI 0;
+ CPUINT.LVL0PRI = 0x0;
+
+ //LVL1VEC 0;
+ CPUINT.LVL1VEC = 0x0;
+
+ ENABLE_INTERRUPTS();
+
+ return 0;
+}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/src/pins.c b/differential-amplifier.X/mcc_generated_files/system/src/pins.c
new file mode 100644
index 0000000..682b6bf
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/src/pins.c
@@ -0,0 +1,297 @@
+/**
+ * Generated Driver File
+ *
+ * @file pins.c
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This is generated driver implementation for pins.
+ * This file provides implementations for pin APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../pins.h"
+
+static void (*IO_PB0_InterruptHandler)(void);
+static void (*IO_PD2_InterruptHandler)(void);
+static void (*IO_PD5_InterruptHandler)(void);
+static void (*IO_PD6_InterruptHandler)(void);
+static void (*IO_PA3_InterruptHandler)(void);
+static void (*IO_PA2_InterruptHandler)(void);
+static void (*LED0_InterruptHandler)(void);
+
+void PIN_MANAGER_Initialize()
+{
+
+ /* OUT Registers Initialization */
+ PORTA.OUT = 0x0;
+ PORTB.OUT = 0x1;
+ PORTC.OUT = 0x0;
+ PORTD.OUT = 0x0;
+ PORTE.OUT = 0x0;
+ PORTF.OUT = 0x0;
+
+ /* DIR Registers Initialization */
+ PORTA.DIR = 0xC;
+ PORTB.DIR = 0x9;
+ PORTC.DIR = 0x0;
+ PORTD.DIR = 0x40;
+ PORTE.DIR = 0x0;
+ PORTF.DIR = 0x0;
+
+ /* PINxCTRL registers Initialization */
+ PORTA.PIN0CTRL = 0x0;
+ PORTA.PIN1CTRL = 0x0;
+ PORTA.PIN2CTRL = 0x0;
+ PORTA.PIN3CTRL = 0x0;
+ PORTA.PIN4CTRL = 0x0;
+ PORTA.PIN5CTRL = 0x0;
+ PORTA.PIN6CTRL = 0x0;
+ PORTA.PIN7CTRL = 0x0;
+ PORTB.PIN0CTRL = 0x0;
+ PORTB.PIN1CTRL = 0x0;
+ PORTB.PIN2CTRL = 0x0;
+ PORTB.PIN3CTRL = 0x0;
+ PORTB.PIN4CTRL = 0x0;
+ PORTB.PIN5CTRL = 0x0;
+ PORTB.PIN6CTRL = 0x0;
+ PORTB.PIN7CTRL = 0x0;
+ PORTC.PIN0CTRL = 0x0;
+ PORTC.PIN1CTRL = 0x0;
+ PORTC.PIN2CTRL = 0x0;
+ PORTC.PIN3CTRL = 0x0;
+ PORTC.PIN4CTRL = 0x0;
+ PORTC.PIN5CTRL = 0x0;
+ PORTC.PIN6CTRL = 0x0;
+ PORTC.PIN7CTRL = 0x0;
+ PORTD.PIN0CTRL = 0x0;
+ PORTD.PIN1CTRL = 0x0;
+ PORTD.PIN2CTRL = 0x4;
+ PORTD.PIN3CTRL = 0x0;
+ PORTD.PIN4CTRL = 0x0;
+ PORTD.PIN5CTRL = 0x4;
+ PORTD.PIN6CTRL = 0x0;
+ PORTD.PIN7CTRL = 0x0;
+ PORTE.PIN0CTRL = 0x0;
+ PORTE.PIN1CTRL = 0x0;
+ PORTE.PIN2CTRL = 0x0;
+ PORTE.PIN3CTRL = 0x0;
+ PORTE.PIN4CTRL = 0x0;
+ PORTE.PIN5CTRL = 0x0;
+ PORTE.PIN6CTRL = 0x0;
+ PORTE.PIN7CTRL = 0x0;
+ PORTF.PIN0CTRL = 0x0;
+ PORTF.PIN1CTRL = 0x0;
+ PORTF.PIN2CTRL = 0x0;
+ PORTF.PIN3CTRL = 0x0;
+ PORTF.PIN4CTRL = 0x0;
+ PORTF.PIN5CTRL = 0x0;
+ PORTF.PIN6CTRL = 0x0;
+ PORTF.PIN7CTRL = 0x0;
+
+ /* PORTMUX Initialization */
+ PORTMUX.ACROUTEA = 0x0;
+ PORTMUX.CCLROUTEA = 0x0;
+ PORTMUX.EVSYSROUTEA = 0x0;
+ PORTMUX.SPIROUTEA = 0x0;
+ PORTMUX.TCAROUTEA = 0x0;
+ PORTMUX.TCBROUTEA = 0x0;
+ PORTMUX.TCDROUTEA = 0x0;
+ PORTMUX.TWIROUTEA = 0x0;
+ PORTMUX.USARTROUTEA = 0x0;
+ PORTMUX.USARTROUTEB = 0x0;
+ PORTMUX.ZCDROUTEA = 0x0;
+
+ // register default ISC callback functions at runtime; use these methods to register a custom function
+ IO_PB0_SetInterruptHandler(IO_PB0_DefaultInterruptHandler);
+ IO_PD2_SetInterruptHandler(IO_PD2_DefaultInterruptHandler);
+ IO_PD5_SetInterruptHandler(IO_PD5_DefaultInterruptHandler);
+ IO_PD6_SetInterruptHandler(IO_PD6_DefaultInterruptHandler);
+ IO_PA3_SetInterruptHandler(IO_PA3_DefaultInterruptHandler);
+ IO_PA2_SetInterruptHandler(IO_PA2_DefaultInterruptHandler);
+ LED0_SetInterruptHandler(LED0_DefaultInterruptHandler);
+}
+
+/**
+ Allows selecting an interrupt handler for IO_PB0 at application runtime
+*/
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PB0_InterruptHandler = interruptHandler;
+}
+
+void IO_PB0_DefaultInterruptHandler(void)
+{
+ // add your IO_PB0 interrupt custom code
+ // or set custom function using IO_PB0_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD2 at application runtime
+*/
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD2_InterruptHandler = interruptHandler;
+}
+
+void IO_PD2_DefaultInterruptHandler(void)
+{
+ // add your IO_PD2 interrupt custom code
+ // or set custom function using IO_PD2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD5 at application runtime
+*/
+void IO_PD5_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD5_InterruptHandler = interruptHandler;
+}
+
+void IO_PD5_DefaultInterruptHandler(void)
+{
+ // add your IO_PD5 interrupt custom code
+ // or set custom function using IO_PD5_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD6 at application runtime
+*/
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD6_InterruptHandler = interruptHandler;
+}
+
+void IO_PD6_DefaultInterruptHandler(void)
+{
+ // add your IO_PD6 interrupt custom code
+ // or set custom function using IO_PD6_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA3 at application runtime
+*/
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA3_InterruptHandler = interruptHandler;
+}
+
+void IO_PA3_DefaultInterruptHandler(void)
+{
+ // add your IO_PA3 interrupt custom code
+ // or set custom function using IO_PA3_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA2 at application runtime
+*/
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA2_InterruptHandler = interruptHandler;
+}
+
+void IO_PA2_DefaultInterruptHandler(void)
+{
+ // add your IO_PA2 interrupt custom code
+ // or set custom function using IO_PA2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for LED0 at application runtime
+*/
+void LED0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ LED0_InterruptHandler = interruptHandler;
+}
+
+void LED0_DefaultInterruptHandler(void)
+{
+ // add your LED0 interrupt custom code
+ // or set custom function using LED0_SetInterruptHandler()
+}
+ISR(PORTA_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTA.INTFLAGS & PORT_INT3_bm)
+ {
+ IO_PA3_InterruptHandler();
+ }
+ if(VPORTA.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PA2_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTA.INTFLAGS = 0xff;
+}
+
+ISR(PORTB_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTB.INTFLAGS & PORT_INT0_bm)
+ {
+ IO_PB0_InterruptHandler();
+ }
+ if(VPORTB.INTFLAGS & PORT_INT3_bm)
+ {
+ LED0_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTB.INTFLAGS = 0xff;
+}
+
+ISR(PORTC_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTC.INTFLAGS = 0xff;
+}
+
+ISR(PORTD_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTD.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PD2_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT5_bm)
+ {
+ IO_PD5_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT6_bm)
+ {
+ IO_PD6_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTD.INTFLAGS = 0xff;
+}
+
+ISR(PORTE_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTE.INTFLAGS = 0xff;
+}
+
+ISR(PORTF_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTF.INTFLAGS = 0xff;
+}
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/src/protected_io.S b/differential-amplifier.X/mcc_generated_files/system/src/protected_io.S
similarity index 62%
rename from non-inverting-pga.X/mcc_generated_files/src/protected_io.S
rename to differential-amplifier.X/mcc_generated_files/system/src/protected_io.S
index b93dd68..6aaf66e 100644
--- a/non-inverting-pga.X/mcc_generated_files/src/protected_io.S
+++ b/differential-amplifier.X/mcc_generated_files/system/src/protected_io.S
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * protected_io Source Code File
+ *
+ * @file protected_io.S
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated protected_io source code file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/differential-amplifier.X/mcc_generated_files/system/src/system.c b/differential-amplifier.X/mcc_generated_files/system/src/system.c
new file mode 100644
index 0000000..ffdd246
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/src/system.c
@@ -0,0 +1,52 @@
+/**
+ * System Driver Source File
+ *
+ * @file system.c
+ *
+ * @ingroup systemdriver
+ *
+ * @brief This file contains the API implementation for the System driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../system.h"
+
+void SYSTEM_Initialize(void)
+{
+ CLOCK_Initialize();
+ PIN_MANAGER_Initialize();
+ TCB0_Initialize();
+ TCB1_Initialize();
+ ADC0_Initialize();
+ DAC0_Initialize();
+ DataStreamer_Initialize();
+ OPAMP_Initialize();
+ RTC_Initialize();
+ USART3_Initialize();
+ VREF_Initialize();
+ CPUINT_Initialize();
+}
+
diff --git a/differential-amplifier.X/mcc_generated_files/system/system.h b/differential-amplifier.X/mcc_generated_files/system/system.h
new file mode 100644
index 0000000..dba0220
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/system.h
@@ -0,0 +1,71 @@
+/**
+ * System Driver Header File
+ *
+ * @file system.h
+ *
+ * @defgroup systemdriver System Driver
+ *
+ * @brief This file contains the API prototype for the System Driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef MCC_H
+#define MCC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../system/utils/compiler.h"
+#include "config_bits.h"
+#include "../system/pins.h"
+#include "../adc/adc0.h"
+#include "../dac/dac0.h"
+#include "../data_streamer/data_streamer.h"
+#include "../opamp/opamp.h"
+#include "../timer/rtc.h"
+#include "../uart/usart3.h"
+#include "../vref/vref.h"
+#include "../system/interrupt.h"
+#include "../system/clock.h"
+#include "../timer/tcb0.h"
+#include "../timer/tcb1.h"
+/**
+ * @ingroup systemdriver
+ * @brief Initializes the System module. This routine is called only once during system initialization, before calling any other API.
+ * @param None.
+ * @return None.
+*/
+void SYSTEM_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MCC_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/assembler.h b/differential-amplifier.X/mcc_generated_files/system/utils/assembler.h
new file mode 100644
index 0000000..0c6484a
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/assembler.h
@@ -0,0 +1,49 @@
+/**
+ * Assembler Header File
+ *
+ * @file assembler.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the assembler header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ASSEMBLER_H_INCLUDED
+#define ASSEMBLER_H_INCLUDED
+
+#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__)
+#error This file may only be included from assembly files
+#endif
+
+#if defined(__ASSEMBLER__)
+#include "assembler/gas.h"
+#include
+#elif defined(__IAR_SYSTEMS_ASM__)
+#include "assembler/iar.h"
+#include
+#endif
+
+#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/assembler/gas.h b/differential-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
similarity index 67%
rename from non-inverting-pga.X/mcc_generated_files/utils/assembler/gas.h
rename to differential-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
index a164306..871a60a 100644
--- a/non-inverting-pga.X/mcc_generated_files/utils/assembler/gas.h
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * GAS Header File
+ *
+ * @file gas.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated GAS header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
@@ -50,7 +50,11 @@
.if \is_public
.global \name
.endif
+ #ifdef __XC8
+ .section .text.\name, code
+ #else
.section .text.\name, "ax", @progbits
+ #endif
.type \name, @function
\name :
.endm
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/assembler/iar.h b/differential-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
similarity index 61%
rename from non-inverting-pga.X/mcc_generated_files/utils/assembler/iar.h
rename to differential-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
index 69650d6..c52425f 100644
--- a/non-inverting-pga.X/mcc_generated_files/utils/assembler/iar.h
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * IAR Header File
+ *
+ * @file iar.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated IAR header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/atomic.h b/differential-amplifier.X/mcc_generated_files/system/utils/atomic.h
new file mode 100644
index 0000000..2f71dc3
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/atomic.h
@@ -0,0 +1,87 @@
+/**
+ * CONFIGURATION BITS Generated Atomic Header File
+ *
+ * @file atomic.h
+ *
+ * @defgroup doc_driver_utils_atomic Atomic memory access and critical sections
+ *
+ * @brief This file contains the atomic memory access and critical sections header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ATOMIC_H
+#define ATOMIC_H
+
+/* clang-format off */
+
+#if defined(__GNUC__) || defined (__DOXYGEN__)
+
+/**
+ * @brief Enters critical region. Saves the contents of the status register, including the Global Interrupt Enable bit, so that it can be restored upon leaving the critical region.
+ * Thereafter, clears the Global Interrupt Enable Bit.This macro takes a parameter P that is unused for the GCC compiler,but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler declares a variable with the name of the parameter forholding the SREG value.
+ * Compilation will fail when the variable declared in the macro is not unique within the scope that the critical region is declared within.
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG.
+ */
+
+#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "in __tmp_reg__, __SREG__" "\n\t" \
+ "cli" "\n\t" \
+ "push __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+/**
+ * @brief Exits a critical region. Restores the contents of the status register, including the Global Interrupt Enable bit, as it was when entering the critical region.
+ * This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler uses this parameter as the name of a variable that holds the SREG value.
+ * The parameter must be identical to the parameter used in the corresponding ENTER_CRITICAL().
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
+ */
+
+#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "pop __tmp_reg__" "\n\t" \
+ "out __SREG__, __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
+#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
+
+#elif defined(__ICCAVR__)
+
+#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
+#define EXIT_CRITICAL(P) __restore_interrupt(P);
+
+#define DISABLE_INTERRUPTS() __disable_interrupt();
+#define ENABLE_INTERRUPTS() __enable_interrupt();
+
+#else
+# error Unsupported compiler.
+#endif
+
+/* clang-format on */
+
+#endif /* ATOMIC_H */
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/compiler.h b/differential-amplifier.X/mcc_generated_files/system/utils/compiler.h
new file mode 100644
index 0000000..682900b
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/compiler.h
@@ -0,0 +1,72 @@
+/**
+ * Compiler Header File
+ *
+ * @file compiler.h
+ *
+ * @defgroup doc_driver_utils_compiler Compiler abstraction
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for 8-bit AVR. This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef UTILS_COMPILER_H
+#define UTILS_COMPILER_H
+
+#if defined(__GNUC__)
+#include
+#include
+#if defined(__XC8__)
+#include
+#endif
+#elif defined(__ICCAVR__)
+#define ENABLE_BIT_DEFINITIONS 1
+#include
+#include
+
+#ifndef CCP_IOREG_gc
+#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
+#endif
+#ifndef CCP_SPM_gc
+#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
+#endif
+
+#else
+#error Unsupported compiler.
+#endif
+
+#include
+#include
+#include
+#include
+
+#include "interrupt_avr8.h"
+
+/**
+ * @def UNUSED
+ * @brief Marking \a v as a unused parameter or value.
+ */
+#define UNUSED(v) (void)(v)
+
+#endif /* UTILS_COMPILER_H */
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h b/differential-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h
new file mode 100644
index 0000000..99068db
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h
@@ -0,0 +1,88 @@
+/**
+ * interrupt_avr8 Header File
+ *
+ * @file interrupt_avr8.h
+ *
+ * @defgroup doc_driver_utils_interrupts ISR abstraction
+ *
+ * @brief Interrupt-related functionality.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_INTERRUPT_AVR8_H
+#define UTILS_INTERRUPT_AVR8_H
+
+/**
+ * \weakgroup interrupt_group
+ *
+ * @{
+ */
+
+#ifdef ISR_CUSTOM_H
+#include ISR_CUSTOM_H
+#else
+
+/**
+ * @def ISR
+ * @brief Define service routine for specified interrupt vector.
+ * @code
+ ISR(FOO_vect)
+ {
+ ...
+ }
+ * @endcode
+ *
+ * @param vect Interrupt vector name as found in the device header files.
+ */
+#if defined(__DOXYGEN__)
+#define ISR(vect)
+#elif defined(__GNUC__)
+#include
+#elif defined(__ICCAVR__)
+#define __ISR(x) _Pragma(#x)
+#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
+#endif
+#endif // ISR_CUSTOM_H
+
+#ifdef __GNUC__
+#define cpu_irq_enable() sei()
+#define cpu_irq_disable() cli()
+#else
+#define cpu_irq_enable() __enable_interrupt()
+#define cpu_irq_disable() __disable_interrupt()
+#endif
+
+//! @}
+
+/**
+ * \weakgroup interrupt_deprecated_group
+ * @{
+ */
+// Deprecated definitions.
+#define Enable_global_interrupt() cpu_irq_enable()
+#define Disable_global_interrupt() cpu_irq_disable()
+#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
+//! @}
+
+#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/utils.h b/differential-amplifier.X/mcc_generated_files/system/utils/utils.h
new file mode 100644
index 0000000..a7b1b42
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/utils.h
@@ -0,0 +1,52 @@
+/**
+ * utils Header File
+ *
+ * @file system.h
+ *
+ * @defgroup doc_driver_utils AVR Code utility functions
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for AVR.This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.1
+ * \{
+ *
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_H_INCLUDED
+#define UTILS_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Retrieve array size
+ */
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTILS_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/system/utils/utils_assert.h b/differential-amplifier.X/mcc_generated_files/system/utils/utils_assert.h
new file mode 100644
index 0000000..b603f51
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/system/utils/utils_assert.h
@@ -0,0 +1,60 @@
+/**
+ * utils_assert Header File
+ *
+ * @file utils_assert.h
+ *
+ * @defgroup doc_driver_utils_assert Functionality for assert
+ *
+ * @brief This file contains the generated utils_assert header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef _ASSERT_H_INCLUDED
+#define _ASSERT_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/**
+ * @brief Assert macro
+ * Macro used to throw asserts. It can be mapped to different function based on debug level.
+ * @param[in] condition A condition to be checked; assert is thrown if the given condition is false.
+ */
+
+#ifdef DEBUG
+#define ASSERT(condition) \
+ if (!(condition)) \
+ while (true) \
+ ;
+#else
+#define ASSERT(condition) ((void)0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ASSERT_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/timer/rtc.h b/differential-amplifier.X/mcc_generated_files/timer/rtc.h
new file mode 100644
index 0000000..10a822f
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/rtc.h
@@ -0,0 +1,193 @@
+/**
+ * RTC Generated Driver API Header File.
+ *
+ * @file rtc.h
+ *
+ * @defgroup rtc RTC
+ *
+ * @brief This file contains the API prototypes of the RTC driver.
+ *
+ * @version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef RTCDRIVER_H
+#define RTCDRIVER_H
+
+#include "../system/utils/compiler.h"
+#include
+#include
+
+/**
+ * @ingroup rtc
+ * @typedef void RTC_cb_t
+ * @brief Function pointer to callback function called by the RTC. The default value is set to NULL which means that no callback function will be used.
+ */
+typedef void (*RTC_cb_t)(void);
+/**
+ * @ingroup rtc
+ * @brief Interrupt Service Routine (ISR) callback function to be called if Overflow (OVF) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on Overflow event.
+ * @return None.
+ */
+void RTC_SetOVFIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if Compare (CMP) match Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on compare match event.
+ * @return None.
+ */
+void RTC_SetCMPIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if the Periodic Interrupt Timer (PIT) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on periodic interrupt event.
+ * @return None.
+ */
+void RTC_SetPITIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief Initializes the RTC module.
+ * @param None.
+ * @retval 0 - the RTC initialization is successful
+ * @retval 1 - the RTC initialization is not successful
+ */
+int8_t RTC_Initialize(void);
+/**
+ * @ingroup rtc
+ * @brief Starts the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Start(void);
+/**
+ * @ingroup rtc
+ * @brief Stops the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Stop(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Counter register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Counter register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCounter(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Period register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Period register of the RTC.
+ * @return None.
+ */
+void RTC_WritePeriod(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Returns the counter value from the Counter register.
+ * @param None.
+ * @return uint16_t - Value of the Counter register.
+ */
+uint16_t RTC_ReadCounter(void);
+/**
+ * @ingroup rtc
+ * @brief Returns the value of the Period register.
+ * @param None.
+ * @return uint16_t - Value of the Period register.
+ */
+uint16_t RTC_ReadPeriod(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Compare (CMP) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the CMP Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Overflow (OVF) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the OVF Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Periodic Interrupt Timer (PIT) interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the PIT Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Clears the OVF Interrupt flag.
+ * @param None.
+ * @return None.
+ */
+void RTC_ClearOVFInterruptFlag(void);
+/**
+ * @ingroup rtc
+ * @brief Checks if Overflow interrupt has occurred.
+ * @param None.
+ * @retval True - Interrupt is enabled.
+ * @retval False - Interrupt is disabled.
+ */
+bool RTC_IsOVFInterruptEnabled(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the CMP register of the RTC module.
+ * @param uint16_t value - Value to be written to the CMP register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCMPRegister(uint16_t value);
+/**
+ * @ingroup rtc
+ * @brief Returns the value from the CMP register.
+ * @param None.
+ * @return uint16_t - Value of the Compare register.
+ */
+uint16_t RTC_ReadCMPRegister(void);
+
+
+#endif /* RTCDRIVER_H */
+
+/** @}*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/timer/src/rtc.c b/differential-amplifier.X/mcc_generated_files/timer/src/rtc.c
new file mode 100644
index 0000000..1d6c1eb
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/src/rtc.c
@@ -0,0 +1,202 @@
+/**
+ * RTC Generated Driver API Source File.
+ *
+ * @file rtc.c
+ *
+ * @ingroup rtc
+ *
+ * @brief This file contains the API implementations for the RTC driver.
+ *
+ * version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../rtc.h"
+
+void (*RTC_OVF_isr_cb)(void) = NULL;
+void (*RTC_CMP_isr_cb)(void) = NULL;
+void (*RTC_PIT_isr_cb)(void) = NULL;
+
+int8_t RTC_Initialize(void)
+{
+ while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ //Compare
+ RTC.CMP = 0x0;
+
+ //Count
+ RTC.CNT = 0x0;
+
+ //Period
+ RTC.PER = 0x3FF;
+
+ //Clock selection
+ RTC.CLKSEL = 0x0;
+
+
+ // CMP disabled; OVF enabled;
+ RTC.INTCTRL = 0x1;
+
+ // DBGRUN disabled;
+ RTC.DBGCTRL = 0x0;
+
+ // CORREN disabled; PRESCALER RTC Clock / 32; RTCEN enabled; RUNSTDBY disabled;
+ RTC.CTRLA = 0x29;
+
+
+ while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ // PI disabled;
+ RTC.PITINTCTRL = 0x0;
+
+ // DBGRUN disabled;
+ RTC.PITDBGCTRL = 0x0;
+
+ return 0;
+}
+
+void RTC_Start(void)
+{
+ RTC.CTRLA |= RTC_RTCEN_bm;
+}
+
+void RTC_Stop(void)
+{
+ RTC.CTRLA &= ~RTC_RTCEN_bm;
+}
+
+void RTC_SetOVFIsrCallback(RTC_cb_t cb)
+{
+ RTC_OVF_isr_cb = cb;
+}
+
+void RTC_SetCMPIsrCallback(RTC_cb_t cb)
+{
+ RTC_CMP_isr_cb = cb;
+}
+
+void RTC_SetPITIsrCallback(RTC_cb_t cb)
+{
+ RTC_PIT_isr_cb = cb;
+}
+
+ISR(RTC_CNT_vect)
+{
+ if ( (RTC.INTCTRL & RTC_OVF_bm) && (RTC.INTFLAGS & RTC_OVF_bm) )
+ {
+ if (RTC_OVF_isr_cb != NULL)
+ {
+ (*RTC_OVF_isr_cb)();
+ }
+ }
+
+ if ( (RTC.INTCTRL & RTC_CMP_bm) && (RTC.INTFLAGS & RTC_CMP_bm) )
+ {
+ if (RTC_CMP_isr_cb != NULL)
+ {
+ (*RTC_CMP_isr_cb)();
+ }
+ }
+ RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
+}
+
+ISR(RTC_PIT_vect)
+{
+ if (RTC_PIT_isr_cb != NULL)
+ {
+ (*RTC_PIT_isr_cb)();
+ }
+ RTC.PITINTFLAGS = RTC_PI_bm;
+}
+
+inline void RTC_WriteCounter(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_CNTBUSY_bm);
+ RTC.CNT = timerVal;
+}
+
+inline uint16_t RTC_ReadCounter(void)
+{
+ return RTC.CNT;
+}
+
+inline void RTC_WritePeriod(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_PERBUSY_bm);
+ RTC.PER = timerVal;
+}
+
+inline uint16_t RTC_ReadPeriod(void)
+{
+ return RTC.PER;
+}
+
+inline void RTC_EnableCMPInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_CMP_bm;
+}
+
+inline void RTC_DisableCMPInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_CMP_bm;
+}
+
+inline void RTC_EnableOVFInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_OVF_bm;
+}
+
+inline void RTC_DisableOVFInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_OVF_bm;
+}
+
+inline void RTC_EnablePITInterrupt(void)
+{
+ RTC.PITINTCTRL |= RTC_PI_bm;
+}
+
+inline void RTC_DisablePITInterrupt(void)
+{
+ RTC.PITINTCTRL &= ~RTC_PI_bm;
+}
+
+inline void RTC_ClearOVFInterruptFlag(void)
+{
+ RTC.INTFLAGS = RTC_OVF_bm;
+}
+
+inline bool RTC_IsOVFInterruptEnabled(void)
+{
+ return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
+}
+
+inline void RTC_WriteCMPRegister(uint16_t value)
+{
+ RTC.CMP = value;
+}
+
+inline uint16_t RTC_ReadCMPRegister(void)
+{
+ return RTC.CMP;
+}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/timer/src/tcb0.c b/differential-amplifier.X/mcc_generated_files/timer/src/tcb0.c
new file mode 100644
index 0000000..cf0217c
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/src/tcb0.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB0 Generated Driver File
+ *
+ * @file tcb0.c
+ *
+ * @ingroup tcb0
+ *
+ * @brief This file contains the API implementation for the TCB0 module driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb0.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB0_OVF_isr_cb)(void);
+static void TCB0_DefaultOverflowCallback(void);
+static void (*TCB0_CAPT_isr_cb)(void);
+static void TCB0_DefaultCaptureCallback(void);
+
+void TCB0_Initialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB0.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB0.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB0.CCMP = 0x6B8U; // CCMP 0x6B8
+
+ TCB0.CNT = 0x0; // CNT 0xNAN
+
+ TCB0.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_OverflowCallbackRegister(TCB0_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_CaptureCallbackRegister(TCB0_DefaultCaptureCallback);
+
+ TCB0.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB0.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (1 << TCB_RUNSTDBY_bp) // RUNSTDBY enabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB0_Deinitialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CCMP = 0x0;
+
+ TCB0.CNT = 0x0;
+
+ TCB0.CTRLB = 0x0;
+
+ TCB0.DBGCTRL = 0x0;
+
+ TCB0.EVCTRL = 0x0;
+
+ TCB0.INTCTRL = 0x0;
+
+ TCB0.TEMP = 0x0;
+
+ TCB0.CTRLA = 0x0;
+
+ TCB0.INTFLAGS = ~0x0;
+}
+
+void TCB0_Start(void)
+{
+ TCB0.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB0_Stop(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB0_CounterSet(uint16_t timerVal)
+{
+ TCB0.CNT = timerVal;
+}
+
+uint16_t TCB0_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB0.CNT;
+
+ return readVal;
+}
+void TCB0_PeriodSet(uint16_t periodVal)
+{
+ TCB0.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB0_PeriodGet(void)
+{
+ return (uint16_t)TCB0.CCMP;
+}
+
+uint16_t TCB0_MaxCountGet(void)
+{
+ return TCB0_MAX_COUNT;
+}
+
+void TCB0_CAPTInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB0_CAPTInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB0_OVFInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB0_OVFInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB0_IsCaptInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB0_IsOvfInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB0_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB0_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB0_INT_vect)
+{
+ if (0U != (TCB0.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB0_CAPT_isr_cb != NULL)
+ {
+ (*TCB0_CAPT_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB0.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB0_OVF_isr_cb != NULL)
+ {
+ (*TCB0_OVF_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/differential-amplifier.X/mcc_generated_files/timer/src/tcb1.c b/differential-amplifier.X/mcc_generated_files/timer/src/tcb1.c
new file mode 100644
index 0000000..e539285
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/src/tcb1.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB1 Generated Driver File
+ *
+ * @file tcb1.c
+ *
+ * @ingroup tcb1
+ *
+ * @brief This file contains the API implementation for the TCB1 module driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb1.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB1_OVF_isr_cb)(void);
+static void TCB1_DefaultOverflowCallback(void);
+static void (*TCB1_CAPT_isr_cb)(void);
+static void TCB1_DefaultCaptureCallback(void);
+
+void TCB1_Initialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB1.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB1.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB1.CCMP = 0x1388U; // CCMP 0x1388
+
+ TCB1.CNT = 0x0; // CNT 0xNAN
+
+ TCB1.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_OverflowCallbackRegister(TCB1_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_CaptureCallbackRegister(TCB1_DefaultCaptureCallback);
+
+ TCB1.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB1.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (0 << TCB_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB1_Deinitialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CCMP = 0x0;
+
+ TCB1.CNT = 0x0;
+
+ TCB1.CTRLB = 0x0;
+
+ TCB1.DBGCTRL = 0x0;
+
+ TCB1.EVCTRL = 0x0;
+
+ TCB1.INTCTRL = 0x0;
+
+ TCB1.TEMP = 0x0;
+
+ TCB1.CTRLA = 0x0;
+
+ TCB1.INTFLAGS = ~0x0;
+}
+
+void TCB1_Start(void)
+{
+ TCB1.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB1_Stop(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB1_CounterSet(uint16_t timerVal)
+{
+ TCB1.CNT = timerVal;
+}
+
+uint16_t TCB1_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB1.CNT;
+
+ return readVal;
+}
+void TCB1_PeriodSet(uint16_t periodVal)
+{
+ TCB1.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB1_PeriodGet(void)
+{
+ return (uint16_t)TCB1.CCMP;
+}
+
+uint16_t TCB1_MaxCountGet(void)
+{
+ return TCB1_MAX_COUNT;
+}
+
+void TCB1_CAPTInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB1_CAPTInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB1_OVFInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB1_OVFInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB1_IsCaptInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB1_IsOvfInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB1_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB1_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB1_INT_vect)
+{
+ if (0U != (TCB1.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB1_CAPT_isr_cb != NULL)
+ {
+ (*TCB1_CAPT_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB1.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB1_OVF_isr_cb != NULL)
+ {
+ (*TCB1_OVF_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/differential-amplifier.X/mcc_generated_files/timer/tcb0.h b/differential-amplifier.X/mcc_generated_files/timer/tcb0.h
new file mode 100644
index 0000000..cdca1b9
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/tcb0.h
@@ -0,0 +1,205 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the API prototypes and other data types for TCB0.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_H_INCLUDED
+#define TCB0_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb0_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 maximum count value
+ */
+#define TCB0_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Initializes the TCB0 module
+ * @param None.
+ * @return None.
+ */
+void TCB0_Initialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Deinitializes the TCB0 module.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Deinitialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Starts the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Start(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Stops the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Stop(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB0_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb0
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB0_CounterGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB0_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB0_PeriodGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB0_MaxCountGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h b/differential-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h
new file mode 100644
index 0000000..bc8bb5a
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB0 driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_DEPRECATED_H
+#define TCB0_DEPRECATED_H
+
+#warning "The tcb0_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterGet API.
+ * The TCB0_Read will be deprecated in the future release. Use TCB0_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Read TCB0_CounterGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_Write will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Write TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptEnable API.
+ * The TCB0_EnableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableCaptInterrupt TCB0_CAPTInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptDisable API.
+ * The TCB0_DisableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableCaptInterrupt TCB0_CAPTInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptEnable API.
+ * The TCB0_EnableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableOvfInterrupt TCB0_OVFInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptDisable API.
+ * The TCB0_DisableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableOvfInterrupt TCB0_OVFInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusClear API.
+ * The TCB0_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearOvfInterruptFlag TCB0_OverflowStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusClear API.
+ * The TCB0_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearCaptInterruptFlag TCB0_CaptureStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusGet API.
+ * The TCB0_IsOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsOvfInterruptFlag TCB0_OverflowStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusGet API.
+ * The TCB0_IsCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsCaptInterruptFlag TCB0_CaptureStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Start API.
+ * The TCB0_PWM_Enable will be deprecated in the future release. Use TCB0_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Enable TCB0_Start
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Stop API.
+ * The TCB0_PWM_Disable will be deprecated in the future release. Use TCB0_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Disable TCB0_Stop
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_load_counter will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_counter TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_PeriodSet API.
+ * The TCB0_load_top will be deprecated in the future release. Use TCB0_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_top TCB0_PeriodSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_DutyCycleSet API.
+ * The TCB0_load_duty_cycle will be deprecated in the future release. Use TCB0_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_duty_cycle TCB0_DutyCycleSet
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+#endif // TCB0_DEPRECATED_H
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/timer/tcb1.h b/differential-amplifier.X/mcc_generated_files/timer/tcb1.h
new file mode 100644
index 0000000..d253414
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/tcb1.h
@@ -0,0 +1,205 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the API prototypes and other data types for TCB1.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_H_INCLUDED
+#define TCB1_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb1_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 maximum count value
+ */
+#define TCB1_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Initializes the TCB1 module
+ * @param None.
+ * @return None.
+ */
+void TCB1_Initialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Deinitializes the TCB1 module.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Deinitialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Starts the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Start(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Stops the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Stop(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB1_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb1
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB1_CounterGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB1_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB1_PeriodGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB1_MaxCountGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h b/differential-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h
new file mode 100644
index 0000000..8c47aed
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB1 driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_DEPRECATED_H
+#define TCB1_DEPRECATED_H
+
+#warning "The tcb1_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterGet API.
+ * The TCB1_Read will be deprecated in the future release. Use TCB1_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Read TCB1_CounterGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_Write will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Write TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptEnable API.
+ * The TCB1_EnableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableCaptInterrupt TCB1_CAPTInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptDisable API.
+ * The TCB1_DisableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableCaptInterrupt TCB1_CAPTInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptEnable API.
+ * The TCB1_EnableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableOvfInterrupt TCB1_OVFInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptDisable API.
+ * The TCB1_DisableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableOvfInterrupt TCB1_OVFInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusClear API.
+ * The TCB1_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearOvfInterruptFlag TCB1_OverflowStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusClear API.
+ * The TCB1_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearCaptInterruptFlag TCB1_CaptureStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusGet API.
+ * The TCB1_IsOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsOvfInterruptFlag TCB1_OverflowStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusGet API.
+ * The TCB1_IsCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsCaptInterruptFlag TCB1_CaptureStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Start API.
+ * The TCB1_PWM_Enable will be deprecated in the future release. Use TCB1_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Enable TCB1_Start
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Stop API.
+ * The TCB1_PWM_Disable will be deprecated in the future release. Use TCB1_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Disable TCB1_Stop
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_load_counter will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_counter TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_PeriodSet API.
+ * The TCB1_load_top will be deprecated in the future release. Use TCB1_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_top TCB1_PeriodSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_DutyCycleSet API.
+ * The TCB1_load_duty_cycle will be deprecated in the future release. Use TCB1_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_duty_cycle TCB1_DutyCycleSet
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+#endif // TCB1_DEPRECATED_H
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/uart/src/usart3.c b/differential-amplifier.X/mcc_generated_files/uart/src/usart3.c
new file mode 100644
index 0000000..8ce1b02
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/uart/src/usart3.c
@@ -0,0 +1,309 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.c
+ *
+ * @ingroup usart3
+ *
+ * @brief This is the generated driver implementation file for the USART3 driver using
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+/**
+ Section: Included Files
+*/
+
+#include "../usart3.h"
+
+/**
+ Section: Macro Declarations
+*/
+
+
+
+/**
+ Section: Driver Interface
+ */
+
+const uart_drv_interface_t UART3 = {
+ .Initialize = &USART3_Initialize,
+ .Deinitialize = &USART3_Deinitialize,
+ .Read = &USART3_Read,
+ .Write = &USART3_Write,
+ .IsRxReady = &USART3_IsRxReady,
+ .IsTxReady = &USART3_IsTxReady,
+ .IsTxDone = &USART3_IsTxDone,
+ .TransmitEnable = &USART3_TransmitEnable,
+ .TransmitDisable = &USART3_TransmitDisable,
+ .AutoBaudSet = &USART3_AutoBaudSet,
+ .AutoBaudQuery = &USART3_AutoBaudQuery,
+ .BRGCountSet = NULL,
+ .BRGCountGet = NULL,
+ .BaudRateSet = NULL,
+ .BaudRateGet = NULL,
+ .AutoBaudEventEnableGet = NULL,
+ .ErrorGet = &USART3_ErrorGet,
+ .TxCompleteCallbackRegister = NULL,
+ .RxCompleteCallbackRegister = NULL,
+ .TxCollisionCallbackRegister = NULL,
+ .FramingErrorCallbackRegister = &USART3_FramingErrorCallbackRegister,
+ .OverrunErrorCallbackRegister = &USART3_OverrunErrorCallbackRegister,
+ .ParityErrorCallbackRegister = &USART3_ParityErrorCallbackRegister,
+ .EventCallbackRegister = NULL,
+};
+
+/**
+ Section: USART3 variables
+*/
+static volatile usart3_status_t usart3RxLastError;
+
+/**
+ Section: USART3 APIs
+*/
+void (*USART3_FramingErrorHandler)(void);
+void (*USART3_OverrunErrorHandler)(void);
+void (*USART3_ParityErrorHandler)(void);
+
+static void USART3_DefaultFramingErrorCallback(void);
+static void USART3_DefaultOverrunErrorCallback(void);
+static void USART3_DefaultParityErrorCallback(void);
+
+
+
+/**
+ Section: USART3 APIs
+*/
+
+void USART3_Initialize(void)
+{
+ // Set the USART3 module to the options selected in the user interface.
+
+ //BAUD 138;
+ USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
+
+ // ABEIE disabled; DREIE disabled; LBME disabled; RS485 DISABLE; RXCIE disabled; RXSIE disabled; TXCIE disabled;
+ USART3.CTRLA = 0x0;
+
+ // MPCM disabled; ODME disabled; RXEN disabled; RXMODE NORMAL; SFDEN disabled; TXEN enabled;
+ USART3.CTRLB = 0x40;
+
+ // CMODE Asynchronous Mode; UCPHA enabled; UDORD disabled; CHSIZE Character size: 8 bit; PMODE No Parity; SBMODE 1 stop bit;
+ USART3.CTRLC = 0x3;
+
+ //DBGRUN disabled;
+ USART3.DBGCTRL = 0x0;
+
+ //IREI disabled;
+ USART3.EVCTRL = 0x0;
+
+ //RXPL 0x0;
+ USART3.RXPLCTRL = 0x0;
+
+ //TXPL 0x0;
+ USART3.TXPLCTRL = 0x0;
+
+ USART3_FramingErrorCallbackRegister(USART3_DefaultFramingErrorCallback);
+ USART3_OverrunErrorCallbackRegister(USART3_DefaultOverrunErrorCallback);
+ USART3_ParityErrorCallbackRegister(USART3_DefaultParityErrorCallback);
+ usart3RxLastError.status = 0;
+}
+
+void USART3_Deinitialize(void)
+{
+ USART3.BAUD = 0x00;
+ USART3.CTRLA = 0x00;
+ USART3.CTRLB = 0x00;
+ USART3.CTRLC = 0x00;
+ USART3.DBGCTRL = 0x00;
+ USART3.EVCTRL = 0x00;
+ USART3.RXPLCTRL = 0x00;
+ USART3.TXPLCTRL = 0x00;
+}
+
+void USART3_Enable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
+}
+
+void USART3_Disable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
+}
+
+void USART3_TransmitEnable(void)
+{
+ USART3.CTRLB |= USART_TXEN_bm;
+}
+
+void USART3_TransmitDisable(void)
+{
+ USART3.CTRLB &= ~(USART_TXEN_bm);
+}
+
+void USART3_ReceiveEnable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm ;
+}
+
+void USART3_ReceiveDisable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm);
+}
+
+void USART3_AutoBaudSet(bool enable)
+{
+ if(enable)
+ {
+ USART3.CTRLB |= USART_RXMODE_gm & (0x02 << USART_RXMODE_gp);
+ USART3.STATUS |= USART_WFB_bm ;
+ }
+ else
+ {
+ USART3.CTRLB &= ~(USART_RXMODE_gm);
+ USART3.STATUS &= ~(USART_BDF_bm);
+ }
+}
+
+bool USART3_AutoBaudQuery(void)
+{
+ return (bool)(USART3.STATUS & USART_BDF_bm) ;
+}
+
+bool USART3_IsAutoBaudDetectError(void)
+{
+ return (bool)(USART3.STATUS & USART_ISFIF_bm) ;
+}
+
+void USART3_AutoBaudDetectErrorReset(void)
+{
+ USART3.STATUS |= USART_ISFIF_bm ;
+ USART3_AutoBaudSet(false);
+ USART3_ReceiveDisable();
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ USART3_ReceiveEnable();
+ USART3_AutoBaudSet(true);
+}
+
+bool USART3_IsRxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_RXCIF_bm);
+}
+
+bool USART3_IsTxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_DREIF_bm);
+}
+
+bool USART3_IsTxDone(void)
+{
+ return (bool)(USART3.STATUS & USART_TXCIF_bm);
+}
+
+size_t USART3_ErrorGet(void)
+{
+ usart3RxLastError.status = 0;
+
+ if(USART3.RXDATAH & USART_FERR_bm)
+ {
+ usart3RxLastError.ferr = 1;
+ if(NULL != USART3_FramingErrorHandler)
+ {
+ USART3_FramingErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_PERR_bm)
+ {
+ usart3RxLastError.perr = 1;
+ if(NULL != USART3_ParityErrorHandler)
+ {
+ USART3_ParityErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_BUFOVF_bm)
+ {
+ usart3RxLastError.oerr = 1;
+ if(NULL != USART3_OverrunErrorHandler)
+ {
+ USART3_OverrunErrorHandler();
+ }
+ }
+ return usart3RxLastError.status;
+}
+
+uint8_t USART3_Read(void)
+{
+ return USART3.RXDATAL;
+}
+
+
+void USART3_Write(uint8_t txData)
+{
+ USART3.TXDATAL = txData; // Write the data byte to the USART.
+}
+static void USART3_DefaultFramingErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultOverrunErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultParityErrorCallback(void)
+{
+
+}
+
+void USART3_FramingErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_FramingErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_OverrunErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_OverrunErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_ParityErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_ParityErrorHandler = callbackHandler;
+ }
+}
+
+
+
+
diff --git a/differential-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h b/differential-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h
new file mode 100644
index 0000000..3c4a04b
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h
@@ -0,0 +1,90 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_drv_interface.h
+ *
+ * @defgroup uart_drv_interface UART_DRV_INTERFACE
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_DRV_INTERFACE_H
+#define UART_DRV_INTERFACE_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+#include "uart_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+ @ingroup UART
+ @struct uart_drv_interface_t
+ @brief Structure containing the function pointers of UART driver.
+*/
+typedef struct {
+void (*Initialize)(void);
+void (*Deinitialize)(void);
+uint8_t (*Read)(void);
+void (*Write)(uint8_t);
+bool (*IsRxReady)(void);
+bool (*IsTxReady)(void);
+bool (*IsTxDone)(void);
+void (*TransmitEnable)(void);
+void (*TransmitDisable)(void);
+void (*AutoBaudSet)(bool enable);
+bool (*AutoBaudQuery)(void);
+bool (*AutoBaudEventEnableGet)(void);
+void (*BRGCountSet)(uint32_t brgValue);
+uint32_t (*BRGCountGet)(void);
+void (*BaudRateSet)(uint32_t baudRate);
+uint32_t (*BaudRateGet)(void);
+size_t (*ErrorGet)(void);
+void (*TxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*RxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*TxCollisionCallbackRegister)(void (*CallbackHandler) (void));
+void (*FramingErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*OverrunErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*ParityErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*EventCallbackRegister)(void (*CallbackHandler) (void));
+}uart_drv_interface_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_DRV_INTERFACE_H */
+
diff --git a/differential-amplifier.X/mcc_generated_files/uart/uart_types.h b/differential-amplifier.X/mcc_generated_files/uart/uart_types.h
new file mode 100644
index 0000000..33de07b
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/uart/uart_types.h
@@ -0,0 +1,81 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_types.h
+ *
+ * @defgroup uart_types UART_TYPES
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_TYPES_H
+#define UART_TYPES_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+@ingroup uartdriver
+@enum UART_STANDARD_BAUDS
+@brief This Enum can be used to set UART standard
+baud-rates using \ref UARTx_BRGSet function e.g. \ref UART1_BRGSet.
+*/
+enum UART_STANDARD_BAUDS{
+UART_110 = 0,
+UART_300 = 1,
+UART_600 = 2,
+UART_1200 = 3,
+UART_2400 = 4,
+UART_4800 = 5,
+UART_9600 = 6,
+UART_14400 = 7,
+UART_19200 = 8,
+UART_38400 = 9,
+UART_57600 = 10,
+UART_115200 = 11,
+UART_230400 = 12,
+UART_460800 = 13,
+UART_921600 = 14,
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_TYPES_H */
+
diff --git a/differential-amplifier.X/mcc_generated_files/uart/usart3.h b/differential-amplifier.X/mcc_generated_files/uart/usart3.h
new file mode 100644
index 0000000..255742a
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/uart/usart3.h
@@ -0,0 +1,306 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.h
+ *
+ * @defgroup usart3 USART3
+ *
+ * @brief This file contains API prototypes and other datatypes for USART3 module.
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef USART3_H
+#define USART3_H
+
+/**
+ Section: Included Files
+ */
+
+#include
+#include
+#include
+#include "../system/system.h"
+#include "uart_drv_interface.h"
+
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+
+/* Normal Mode, Baud register value */
+#define USART3_BAUD_RATE(BAUD_RATE) (((float)4000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
+
+#define UART3_interface UART3
+
+
+#define UART3_Initialize USART3_Initialize
+#define UART3_Deinitialize USART3_Deinitialize
+#define UART3_Write USART3_Write
+#define UART3_Read USART3_Read
+#define UART3_IsRxReady USART3_IsRxReady
+#define UART3_IsTxReady USART3_IsTxReady
+#define UART3_IsTxDone USART3_IsTxDone
+
+#define UART3_TransmitEnable USART3_TransmitEnable
+#define UART3_TransmitDisable USART3_TransmitDisable
+#define UART3_AutoBaudSet USART3_AutoBaudSet
+#define UART3_AutoBaudQuery USART3_AutoBaudQuery
+#define UART3_IsAutoBaudDetectError USART3_IsAutoBaudDetectError
+#define UART3_AutoBaudDetectErrorReset USART3_AutoBaudDetectErrorReset
+#define UART3_BRGCountSet (NULL)
+#define UART3_BRGCountGet (NULL)
+#define UART3_BaudRateSet (NULL)
+#define UART3_BaudRateGet (NULL)
+#define UART3_AutoBaudEventEnableGet (NULL)
+#define UART3_ErrorGet USART3_ErrorGet
+
+#define UART3_TxCompleteCallbackRegister (NULL)
+#define UART3_RxCompleteCallbackRegister (NULL)
+#define UART3_TxCollisionCallbackRegister (NULL)
+#define UART3_FramingErrorCallbackRegister USART3_FramingErrorCallbackRegister
+#define UART3_OverrunErrorCallbackRegister USART3_OverrunErrorCallbackRegister
+#define UART3_ParityErrorCallbackRegister USART3_ParityErrorCallbackRegister
+#define UART3_EventCallbackRegister (NULL)
+
+
+/**
+ @ingroup usart3
+ @struct usart3_status_t
+ @breif This is an instance of USART3_STATUS for USART3 module
+ */
+typedef union {
+ struct {
+ uint8_t perr : 1; /**
-#elif defined(__IAR_SYSTEMS_ASM__)
-#include "assembler/iar.h"
-#include
-#endif
-
-#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/atomic.h b/differential-amplifier.X/mcc_generated_files/utils/atomic.h
deleted file mode 100644
index 7b99064..0000000
--- a/differential-amplifier.X/mcc_generated_files/utils/atomic.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ATOMIC_H
-#define ATOMIC_H
-
-/**
- * \defgroup doc_driver_utils_atomic Atomic memory access and critical sections
- * \ingroup doc_driver_utils
- *
- * Atomic memory access and critical sections
- *
- * \{
- */
-
-/* clang-format off */
-
-#if defined(__GNUC__) || defined (__DOXYGEN__)
-
-/**
- * \brief Enter a critical region
- *
- * Saves the contents of the status register, including the Global
- * Interrupt Enable bit, so that it can be restored upon leaving the
- * critical region. Thereafter, clears the Global Interrupt Enable Bit.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler declares a variable with the name of the parameter for
- * holding the SREG value. Since a variable is declared in the macro,
- * this variable must have a name that is unique within the scope
- * that the critical region is declared within, otherwise compilation
- * will fail.
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "in __tmp_reg__, __SREG__" "\n\t" \
- "cli" "\n\t" \
- "push __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-/**
- * \brief Exit a critical region
- *
- * Restores the contents of the status register, including the Global
- * Interrupt Enable bit, as it was when entering the critical region.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler uses this parameter as the name of a variable that holds
- * the SREG value. The parameter must be identical to the parameter
- * used in the corresponding ENTER_CRITICAL().
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "pop __tmp_reg__" "\n\t" \
- "out __SREG__, __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
-#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
-
-#elif defined(__ICCAVR__)
-
-#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
-#define EXIT_CRITICAL(P) __restore_interrupt(P);
-
-#define DISABLE_INTERRUPTS() __disable_interrupt();
-#define ENABLE_INTERRUPTS() __enable_interrupt();
-
-#else
-# error Unsupported compiler.
-#endif
-
-/* clang-format on */
-
-#endif /* ATOMIC_H */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/compiler.h b/differential-amplifier.X/mcc_generated_files/utils/compiler.h
deleted file mode 100644
index fbd7a59..0000000
--- a/differential-amplifier.X/mcc_generated_files/utils/compiler.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef UTILS_COMPILER_H
-#define UTILS_COMPILER_H
-
-/**
- * \defgroup doc_driver_utils_compiler Compiler abstraction
- * \ingroup doc_driver_utils
- *
- * Compiler abstraction layer and code utilities for 8-bit AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#if defined(__GNUC__)
-#include
-#include
-#elif defined(__ICCAVR__)
-#define ENABLE_BIT_DEFINITIONS 1
-#include
-#include
-
-#ifndef CCP_IOREG_gc
-#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
-#endif
-#ifndef CCP_SPM_gc
-#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
-#endif
-
-#else
-#error Unsupported compiler.
-#endif
-
-#include
-#include
-#include
-#include
-
-#include "interrupt_avr8.h"
-
-/**
- * \def UNUSED
- * \brief Marking \a v as a unused parameter or value.
- */
-#define UNUSED(v) (void)(v)
-
-#endif /* UTILS_COMPILER_H */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h b/differential-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h
deleted file mode 100644
index ad1efd7..0000000
--- a/differential-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_interrupts ISR abstraction
- * \ingroup doc_driver_utils
- *
- * Interrupt-related functionality.
- *
- * \{
- */
-
-#ifndef UTILS_INTERRUPT_AVR8_H
-#define UTILS_INTERRUPT_AVR8_H
-
-/**
- * \weakgroup interrupt_group
- *
- * @{
- */
-
-#ifdef ISR_CUSTOM_H
-#include ISR_CUSTOM_H
-#else
-
-/**
- * \def ISR
- * \brief Define service routine for specified interrupt vector
- *
- * Usage:
- * \code
- ISR(FOO_vect)
- {
- ...
- }
-\endcode
- *
- * \param vect Interrupt vector name as found in the device header files.
- */
-#if defined(__DOXYGEN__)
-#define ISR(vect)
-#elif defined(__GNUC__)
-#include
-#elif defined(__ICCAVR__)
-#define __ISR(x) _Pragma(#x)
-#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
-#endif
-#endif // ISR_CUSTOM_H
-
-#ifdef __GNUC__
-#define cpu_irq_enable() sei()
-#define cpu_irq_disable() cli()
-#else
-#define cpu_irq_enable() __enable_interrupt()
-#define cpu_irq_disable() __disable_interrupt()
-#endif
-
-//! @}
-
-/**
- * \weakgroup interrupt_deprecated_group
- * @{
- */
-// Deprecated definitions.
-#define Enable_global_interrupt() cpu_irq_enable()
-#define Disable_global_interrupt() cpu_irq_disable()
-#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
-//! @}
-
-#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/utils.h b/differential-amplifier.X/mcc_generated_files/utils/utils.h
deleted file mode 100644
index b133c4d..0000000
--- a/differential-amplifier.X/mcc_generated_files/utils/utils.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils AVR Code utility functions
- *
- * Compiler abstraction layer and code utilities for AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#ifndef UTILS_H_INCLUDED
-#define UTILS_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Retrieve array size
- */
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTILS_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/utils_assert.h b/differential-amplifier.X/mcc_generated_files/utils/utils_assert.h
deleted file mode 100644
index 25c322e..0000000
--- a/differential-amplifier.X/mcc_generated_files/utils/utils_assert.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_assert Functionality for assert.
- * \ingroup doc_driver_utils
- *
- * \{
- */
-
-#ifndef _ASSERT_H_INCLUDED
-#define _ASSERT_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-/**
- * \brief Assert macro
- *
- * This macro is used to throw asserts. It can be mapped to different function
- * based on debug level.
- *
- * \param[in] condition A condition to be checked;
- * assert is thrown if the given condition is false
- */
-
-#ifdef DEBUG
-#define ASSERT(condition) \
- if (!(condition)) \
- while (true) \
- ;
-#else
-#define ASSERT(condition) ((void)0)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _ASSERT_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/vref/src/vref.c b/differential-amplifier.X/mcc_generated_files/vref/src/vref.c
new file mode 100644
index 0000000..14b549c
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/vref/src/vref.c
@@ -0,0 +1,47 @@
+/**
+ * VREF Generated Driver File.
+ *
+ * @file vref.c
+ *
+ * @ingroup vref
+ *
+ * @brief This file contains the API implementation for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../vref.h"
+
+int8_t VREF_Initialize(void)
+{
+ // ALWAYSON disabled; REFSEL Internal 1.024V reference;
+ VREF.ACREF = 0x0;
+
+ // ALWAYSON enabled; REFSEL VDD as reference;
+ VREF.ADC0REF = 0x85;
+
+ // ALWAYSON enabled; REFSEL Internal 2.048V reference;
+ VREF.DAC0REF = 0x81;
+
+ return 0;
+}
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/vref/vref.h b/differential-amplifier.X/mcc_generated_files/vref/vref.h
new file mode 100644
index 0000000..8186128
--- /dev/null
+++ b/differential-amplifier.X/mcc_generated_files/vref/vref.h
@@ -0,0 +1,55 @@
+/**
+ * VREF Generated Driver API Header File
+ *
+ * @file vref.h
+ *
+ * @defgroup vref VREF
+ *
+ * @brief This file contains the API prototypes for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef VREF_H_INCLUDED
+#define VREF_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup vref
+ * @brief Initializes the VREF module.
+ * @param None.
+ * @retval 0 - VREF is initialized successfully.
+ */
+int8_t VREF_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VREF_H_INCLUDED */
\ No newline at end of file
diff --git a/differential-amplifier.X/nbproject/configurations.xml b/differential-amplifier.X/nbproject/configurations.xml
index 6df0202..63c43b2 100644
--- a/differential-amplifier.X/nbproject/configurations.xml
+++ b/differential-amplifier.X/nbproject/configurations.xml
@@ -7,40 +7,65 @@
-
- mcc_generated_files/config/clock_config.h
+
+ mcc_generated_files/adc/adc0.h
-
- mcc_generated_files/include/dac0.h
- mcc_generated_files/include/cpuint.h
- mcc_generated_files/include/port.h
- mcc_generated_files/include/rtc.h
- mcc_generated_files/include/vref.h
- mcc_generated_files/include/pin_manager.h
- mcc_generated_files/include/opamp.h
- mcc_generated_files/include/ccp.h
- mcc_generated_files/include/rstctrl.h
- mcc_generated_files/include/usart3.h
- mcc_generated_files/include/adc0.h
- mcc_generated_files/include/protected_io.h
- mcc_generated_files/include/tcb0.h
- mcc_generated_files/include/tcb1.h
+
+ mcc_generated_files/dac/dac0.h
-
-
- mcc_generated_files/utils/assembler/iar.h
- mcc_generated_files/utils/assembler/gas.h
+
+ mcc_generated_files/data_streamer/data_streamer.h
+
+
+ mcc_generated_files/opamp/opamp.h
+
+
+
+
+ mcc_generated_files/system/utils/assembler/iar.h
+ mcc_generated_files/system/utils/assembler/gas.h
+
+ mcc_generated_files/system/utils/assembler.h
+ mcc_generated_files/system/utils/compiler.h
+ mcc_generated_files/system/utils/utils_assert.h
+ mcc_generated_files/system/utils/utils.h
+ mcc_generated_files/system/utils/atomic.h
+ mcc_generated_files/system/utils/interrupt_avr8.h
- mcc_generated_files/utils/compiler.h
- mcc_generated_files/utils/interrupt_avr8.h
- mcc_generated_files/utils/utils.h
- mcc_generated_files/utils/utils_assert.h
- mcc_generated_files/utils/assembler.h
- mcc_generated_files/utils/atomic.h
+ mcc_generated_files/system/system.h
+ mcc_generated_files/system/protected_io.h
+ mcc_generated_files/system/port.h
+ mcc_generated_files/system/config_bits.h
+ mcc_generated_files/system/pins.h
+ mcc_generated_files/system/interrupt.h
+ mcc_generated_files/system/ccp.h
+ mcc_generated_files/system/clock.h
+
+
+ mcc_generated_files/timer/rtc.h
+ mcc_generated_files/timer/tcb1_deprecated.h
+ mcc_generated_files/timer/tcb0.h
+ mcc_generated_files/timer/tcb0_deprecated.h
+ mcc_generated_files/timer/tcb1.h
+
+
+ mcc_generated_files/uart/uart_drv_interface.h
+ mcc_generated_files/uart/usart3.h
+ mcc_generated_files/uart/uart_types.h
+
+
+ mcc_generated_files/vref/vref.h
- mcc_generated_files/mcc.h
- data_stream.h
+
+
+ Makefile
+ MyConfig.mc3
+ differential-amplifier.mc3
-
- mcc_generated_files/src/pin_manager.c
- mcc_generated_files/src/cpuint.c
- mcc_generated_files/src/protected_io.S
- mcc_generated_files/src/adc0.c
- mcc_generated_files/src/usart3.c
- mcc_generated_files/src/vref.c
- mcc_generated_files/src/opamp.c
- mcc_generated_files/src/rtc.c
- mcc_generated_files/src/dac0.c
- mcc_generated_files/src/tcb0.c
- mcc_generated_files/src/tcb1.c
+
+
+ mcc_generated_files/adc/src/adc0.c
+
+
+
+
+ mcc_generated_files/dac/src/dac0.c
+
+
+
+
+ mcc_generated_files/data_streamer/src/data_streamer.c
+
+ mcc_generated_files/data_streamer/data_streamer.ds
+
+
+
+ mcc_generated_files/opamp/src/opamp.c
+
+
+
+
+ mcc_generated_files/system/src/interrupt.c
+ mcc_generated_files/system/src/system.c
+ mcc_generated_files/system/src/pins.c
+ mcc_generated_files/system/src/clock.c
+ mcc_generated_files/system/src/config_bits.c
+ mcc_generated_files/system/src/protected_io.S
+
+
+
+
+ mcc_generated_files/timer/src/tcb0.c
+ mcc_generated_files/timer/src/tcb1.c
+ mcc_generated_files/timer/src/rtc.c
+
+
+
+
+ mcc_generated_files/uart/src/usart3.c
+
+
+
+
+ mcc_generated_files/vref/src/vref.c
+
- mcc_generated_files/mcc.c
- mcc_generated_files/device_config.c
main.c
- data_stream.c
-
-
- Makefile
- MyConfig.mc3
@@ -89,13 +142,13 @@
AVR128DB48
- noID
+ nEdbgTool
XC8
- 2.30
+ 2.50
3
-
+
@@ -245,8 +298,54 @@
value="Press to select which tool pack to use"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -290,6 +389,8 @@
+
AVR128DB48
-
+ noID
XC8
- 2.20
+ 2.50
3
-
+
@@ -529,6 +630,7 @@
+
diff --git a/instrumentation-amplifier.X/MyConfig.mc3 b/instrumentation-amplifier.X/MyConfig.mc3
deleted file mode 100644
index 07ed52c..0000000
--- a/instrumentation-amplifier.X/MyConfig.mc3
+++ /dev/null
@@ -1,11636 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- OPn output (unity gain)
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 100
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 14
-
-
-
- TCB0
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- false
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 7
-
-
-
- 6
-
-
-
- 3
-
-
-
- LINKWIP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDD/2
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- -0.040%
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 2V048
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN6
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Link OP[n-1] output
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 100
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
- OP1OUT
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 23
-
-
-
- 127
-
-
-
- RTC Clock / 32
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampTriple
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 129
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Ground
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- NORMAL
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- VDD as reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- VREF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN10
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OUT
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- enabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 2.048V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 133
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- OUT
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 5
-
-
-
- 7
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 22
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- CLK_PEP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 4R, R2 = 12R, R2/R1 = 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- Full Input Range
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnAlwaysOn
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 1
-
-
-
- 7
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver in Normal Mode
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- true
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 0
-
-
-
- 12
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 128
-
-
-
- 65
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 7
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opInstAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 85
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 34
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- GND
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- Wiper from OP0's resistor ladder
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- DAC
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INPUT_DISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 10
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opInstAmp
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- WIP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
-
-
-
-
- INT
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- ISR_RTC_PIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 2.048
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OUT
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 12R, R2 = 4R, R2/R1 = 0.33
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 2000000
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDDDIV2
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- opNonInvPGA
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 41
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- alternate
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- VDD
-
-
-
- 1
-
-
-
- 0
-
-
-
- LINKOUT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 177
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- disabled
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opInstAmp
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 3
-
-
-
- 7
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP5
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2.048
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
- OP2OUT
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\include\pin_manager.h
- b40e0504ea35d3ff86462bbf33e56dac311f24f291755958023e269e9b28803c
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- 664cf731a1f6f8b93a46a4041733047d1a3e5fe9116d32fd7a43ea38838751f0
-
-
- mcc_generated_files\src\pin_manager.c
- ee01dcbb4762faf7caeee9f64ed37cbaf80c0f185c59c3c7bce34e50520a569e
-
-
- mcc_generated_files\include\tcb1.h
- 9d0a32ab9318678859c15e3168e8cdeaeed8bbecceb9b3d2492760ddf6e8c004
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\tcb1.c
- 273a8fa28040b7994c42af736726f4f37396359c7451d6375efae5b6194f69d7
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\src\tcb0.c
- b7c085eec9b3a2e01df339e0a3b722d2d86f87e41d95cd2c481da3ee3641de39
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- a7dc110928d190120af6cd5323667db71f3d6aa1b6e3b83947af50f6e746b744
-
-
- mcc_generated_files\src\usart3.c
- 8572b8c83d8f535a9fabb7a2e29c1c7d12d16b3627ca69daa9ec8358614c281d
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\mcc.h
- 37bf46abccdf38efd1154bc6a384e8ccc895859d394f07056a6cec550f6707b4
-
-
- mcc_generated_files\src\adc0.c
- d61ae7eed5af58b1374502cc4d2e2636fbc7c17b49aa69255aa12271292749d9
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- fd32cc065a7a7689f961b1cba655e374fd30f68360afd758e871aeb6c9bdc53c
-
-
- mcc_generated_files\include\opamp.h
- 33507e0b2172842faa3269b68b3174606aecc2d3954c476590167eed66779709
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\src\opamp.c
- 36296429e279539367ca994d451734075e124c44b45c9bfd24868d27d3a0770c
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/MyConfig.mc3.bak b/instrumentation-amplifier.X/MyConfig.mc3.bak
deleted file mode 100644
index f7135e6..0000000
--- a/instrumentation-amplifier.X/MyConfig.mc3.bak
+++ /dev/null
@@ -1,11640 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- OPn output (unity gain)
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 100
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- TCB0
-
-
-
- 14
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 7
-
-
-
- 6
-
-
-
- 3
-
-
-
- LINKWIP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDD/2
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- DIV1
-
-
-
- 3.3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- -0.040%
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 2V048
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN6
-
-
-
- 1
-
-
-
- true
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- Link OP[n-1] output
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 100
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
- OP1OUT
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 23
-
-
-
- 127
-
-
-
- Output Driver in Normal Mode
-
-
-
- RTC Clock / 32
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampTriple
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 129
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Ground
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- NORMAL
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- VDD as reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VREF
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN10
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OUT
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 0
-
-
-
- 12
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 2.048V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 133
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DAC output
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- OUT
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 5
-
-
-
- 7
-
-
-
- 0
-
-
-
- 9
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 430us
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 22
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- CLK_PEP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 4R, R2 = 12R, R2/R1 = 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- Full Input Range
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnAlwaysOn
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 1
-
-
-
- 7
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver in Normal Mode
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 3
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- true
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 0
-
-
-
- 12
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 65
-
-
-
- 128
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opInstAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 85
-
-
-
- 0
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 34
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- GND
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- Wiper from OP0's resistor ladder
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- DAC
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- ISR_USART3_ABE
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 10
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opInstAmp
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- WIP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
- INT
-
-
-
-
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- 1
-
-
-
- ISR_RTC_PIT
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 2.048
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OUT
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 12R, R2 = 4R, R2/R1 = 0.33
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- 2000000
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- VDDDIV2
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- opNonInvPGA
-
-
-
- enabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 41
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- false
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- true
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- alternate
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- VDD
-
-
-
- 1
-
-
-
- 0
-
-
-
- LINKOUT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 177
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opInstAmp
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP5
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2.048
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
- OP2OUT
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\include\pin_manager.h
- f73bf64f0c28142685c805061cce29e63a464ee803da82a9b9555af5a4397122
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- f99940ca5c1f1a476aefb94b0ae0350fe7965e6ce033776a7cdb494d2116b482
-
-
- mcc_generated_files\src\pin_manager.c
- 249fdfe029741203a9bb7d71e08e866b4ee9f252d16102880b0262b3244a7ca8
-
-
- mcc_generated_files\include\tcb1.h
- 48affc128bd0298e52e46a4e619fbcf1a699d041c2fc6d057e81a28ef6f2f95c
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\tcb1.c
- 3f164851af42f06ca7274eccb115b5e055054f3c754f625691c8e7260aea65ac
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\src\tcb0.c
- eb14c823736ca31b0bc3d1a7690505ac49bac351927d50250767f748557af01a
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- b516cde371e7d21c5557b3fce53d804baaa6777d33ec56ce3c8381f15296acf0
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\mcc.h
- cfee5d998fa9863587d2285e7105c4e8a627f605aa5ac226d3902881a134dbe5
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- mcc_generated_files\src\adc0.c
- 636e5dd1534d6770cc2301de4056724be60a70c8b93bf71b90c2b9990ed44464
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- fd32cc065a7a7689f961b1cba655e374fd30f68360afd758e871aeb6c9bdc53c
-
-
- mcc_generated_files\include\opamp.h
- 33507e0b2172842faa3269b68b3174606aecc2d3954c476590167eed66779709
-
-
- mcc_generated_files\src\opamp.c
- 5bdc655d39cf2f6bf982a4a49df1c29ff766377c7796ea49670b6cda5945c4e0
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/data_stream.c b/instrumentation-amplifier.X/data_stream.c
deleted file mode 100644
index 3d91b80..0000000
--- a/instrumentation-amplifier.X/data_stream.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "data_stream.h"
-#include "mcc_generated_files/include/usart3.h"
-#include
-
-char TX_buffer[sizeof(data_stream)];
-
-void DS_sendData(void) {
- memcpy(TX_buffer, &data_stream, sizeof(data_stream));
-
- USART3.CTRLA = USART_DREIE_bm; /* Enable Transmit Complete interrupt*/
- USART3.TXDATAL = data_stream.start_token; /* Send the first byte of the buffer*/
- /* once the first byte is transmitted the ISR will kick in*/
-}
-
-void myUSART_3_ISR(void)
-{
- volatile static uint8_t tx_count = 1;
-
- if (data_stream.data_available) {
-
- if (tx_count < (sizeof(TX_buffer) - 1)) {
- USART3.TXDATAL = TX_buffer[tx_count];
- tx_count++;
- }
- else{
-
- tx_count = 1;
- data_stream.data_available = 0;
- USART3.CTRLA &= ~USART_DREIE_bm; /* Disable Transmit Complete interrupt*/
- /* No more bytes available*/
- }
- }
-}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/data_stream.h b/instrumentation-amplifier.X/data_stream.h
deleted file mode 100644
index d84643f..0000000
--- a/instrumentation-amplifier.X/data_stream.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef DATA_STREAM_H_
-#define DATA_STREAM_H_
-
-#include
-
-#define START_TOKEN 0x55
-
-typedef struct {
- uint8_t start_token;
- int16_t diff_input;
- int16_t opampVal;
- uint8_t end_token;
- uint8_t data_available;
-}data_visualizer;
-
-data_visualizer data_stream;
-
-void DS_sendData(void);
-
-void myUSART_3_ISR(void);
-
-
-#endif /* DATA_STREAM_H_ */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/instrumentation-amplifier.mc3 b/instrumentation-amplifier.X/instrumentation-amplifier.mc3
new file mode 100644
index 0000000..3c899fa
--- /dev/null
+++ b/instrumentation-amplifier.X/instrumentation-amplifier.mc3
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ADC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Application Builder
+ class com.microchip.mcc.melody.module.FrameworkModule
+
+
+ CLKCTRL
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ CPUINT
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Configuration Bits
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ DAC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ MAIN MANAGER
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ OPAMP
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Pin Manager
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ RTC
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB1
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ USART3
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ VREF
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ meta
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ module0
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module1
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module19
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module2
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module23
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module3
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module4
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module46
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module48
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module5
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module70
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module77
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module8
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module80
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module81
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module9
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+
+
+
+
+
+
+ {}
+
+
+
+ {"userAddedModules":["module5","module4","module9","module8","module48","module1","module0","module3","module2","module46","module77","module70","module81","module80"],"version":"CURRENT","modules":{"module5":{"scriptId":"@mchp-mcc/scf-avr8-clkctrl-v3","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"scf_avr8_clkctrl_v3":{"interfaceId":{"name":"scf-avr8-clkctrl-v3","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CLKCTRL"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"configbits_basic_interface":{"interfaceId":{"name":"configbits-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"configbits_basic_interface"}},"config_device":{"interfaceId":{"name":"config-device","version":"^1"},"handle":{"providerId":"module1","exportId":"config_device"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"frqselOschfctrla":"4 MHz system clock (default)","penMclkctrlb":false,"pdivMclkctrlb":"6X"}}}},"module4":{"scriptId":"@mchp-mcc/scf-avr8-interrupt-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_interrupt_v1":{"interfaceId":{"name":"scf-avr8-interrupt-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CPUINT"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"iSreg":true}}}},"module9":{"scriptId":"@mchp-mcc/scf-avr8-vref-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_vref_v1":{"interfaceId":{"name":"scf-avr8-vref-v1","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"vdd":3.3,"alwaysonAdc0ref":true,"refselAdc0ref":"VDD as reference","alwaysonDac0ref":true,"refselDac0ref":"Internal 2.048V reference"}}}},"module8":{"scriptId":"@mchp-mcc/data-streamer-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic-drv-interface","version":"^2.1.0"},"handle":{"providerId":"module23","exportId":"uart_basic_drv_interface"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"software":{"dataStreamerTable":[{"rowId":0.0,"uid":"defaultRow_0","varName":"diff_input","varType":"int16_t"},{"rowId":1.0,"uid":"dynamicRow_1730713492275","dynamicallyAdded":true,"varName":"opampVal","varType":"int16_t"}]}}}},"module48":{"scriptId":"@mchp-mcc/scf-avr8-opamp-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_opamp_v1":{"interfaceId":{"name":"scf-avr8-opamp-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"OPAMP"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"mode":"Triple OPAMPs","tripleOpampConfiguration":"Instrumentation Amplifier","op1Enabled":false,"op2Enabled":false,"op0Configuration":"Voltage Follower"},"op0Hardware":{"muxposOp0inmux":"VDD/2","op0CustomGain":"3"},"op1Hardware":{"muxposOp1inmux":"DAC output","op1CustomGain":"3"},"op2Hardware":{"op2CustomGain":"3"},"software":{"op0outAttribs":{"PD2":{"ioc":"NONE"}},"op1outAttribs":{"PD5":{"ioc":"NONE"}},"op2outAttribs":{"PE2":{"ioc":"NONE"}}},"global":{"irselPwrctrl":"FULL"}}}},"module1":{"scriptId":"@mchp-mcc/avr8-configuration-bits-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_main":{"interfaceId":{"name":"initializer-main","version":"^0.*"},"handle":{"providerId":"module0","exportId":"initializer_main"}},"avr8_configuration_bits_v1":{"interfaceId":{"name":"avr8-configuration-bits-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Configuration Bits"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module0":{"scriptId":"@mchp-mcc/main-manager","imports":{"main":{"interfaceId":{"name":"main-manager","version":"^1.*"},"handle":{"providerId":"mccDevice","exportId":"MAIN MANAGER"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module3":{"scriptId":"@mchp-mcc/pin-content-processor","imports":{"device-meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin-architecture":{"interfaceId":{"name":"pin-architecture","version":"1.0.0"},"handle":{"providerId":"module2","exportId":"pin-architecture"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"saved":{"meta":{"module":"module8"},"rows":{"pcp":{"GPIO$GPIO$input":{"pins":{"PB3":{"state":"MUL"}}},"GPIO$GPIO$output":{"pins":{"PB3":{"state":"L"}}}}},"userEditedData":{"cname":{"eview":{"PB3":"LED0"}}}}}},"module2":{"scriptId":"@mchp-mcc/avr8-pin-manager","imports":{"avr8-pin-manager":{"interfaceId":{"name":"avr8-pin-manager","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Pin Manager"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"adapterdata":{"cname":{"eview":{"dataMap":{"PB3":{"value":"LED0"}}}}}}},"module19":{"scriptId":"@mchp-mcc/scf-avr8-usart-v1","imports":{"osc_clock":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_usart_v1":{"interfaceId":{"name":"scf-avr8-usart-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"USART3"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"rxc":false},"hardware":{"rxenCtrlb":false}}}},"module46":{"scriptId":"@mchp-mcc/scf-avr8-rtc-v1","imports":{"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_rtc_v1":{"interfaceId":{"name":"scf-avr8-rtc-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"RTC"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"prescalerCtrla":"RTC Clock / 32","requestedPeriodValue":1.0,"requestedCompareValue":0.0}}}},"module23":{"scriptId":"@mchp-mcc/uart-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic","version":"^6.0.0"},"handle":{"providerId":"module19","exportId":"uart_basic","label":"UART3"}}},"framewSpecificState":{"userEditedImports":["uart_basic"]},"payload":{"main":{"interrupt":{"interruptDriven":false}}}},"module77":{"scriptId":"@mchp-mcc/scf-avr8-adc-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"adc_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0"},"handle":{"providerId":"module9","exportId":"VREF"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"scf_avr8_adc_v1":{"interfaceId":{"name":"scf-avr8-adc-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"ADC0"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"resselCtrla":"10-bit mode","leftadjCtrla":false,"muxposMuxpos":"ADC input pin 10"},"interrupt":{"resrdyIntctrl":true},"clockSettgins":{"sampnumCtrlb":"8 results accumulated","sampleLen":0.0},"software":{"anxattribspinkey1":{}}}}},"module70":{"scriptId":"@mchp-mcc/scf-avr8-dac-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"scf_avr8_dac_v1":{"interfaceId":{"name":"scf-avr8-dac-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"DAC0"}},"dac_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0.1.0"},"handle":{"providerId":"module9","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"outenCtrla":true}}}},"module81":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB0"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"clkselCtrla":"DIV1","timerPeriod":4.3E-4},"advanced":{"runstdbyCtrla":true},"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true}}}},"module80":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB1"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true},"hardware":{"timerPeriod":0.00125}}}}},"content":{"@mchp-mcc/avr-8bit":"4.11.0","@mchp-mcc/scf-avr8-dac-v1":"4.0.10","@mchp-mcc/data-streamer-driver":"2.0.1","@mchp-mcc/scf-avr8-tcb-v1":"6.0.0","@mchp-mcc/avr8-pin-manager":"4.6.1","@mchp-mcc/scf-avr8-adc-v1":"4.2.6","@mchp-mcc/scf-avr8-interrupt-v1":"5.0.12","@mchp-mcc/scf-avr8-usart-v1":"10.2.0","@mchp-mcc/main-manager":"3.1.2","@mchp-mcc/scf-avr8-opamp-v1":"1.0.7","@mchp-mcc/scf-avr8-rtc-v1":"4.2.5","@mchp-mcc/pin-content-processor":"3.9.0","@mchp-mcc/uart-driver":"1.10.2","@mchp-mcc/scf-avr8-vref-v1":"4.0.3","@mchp-mcc/scf-avr8-clkctrl-v3":"2.0.10","@mchp-mcc/avr8-configuration-bits-v1":"4.2.14"}}
+
+
+
+
+ main.c
+ 8c0f34e8f96915ad988aa3ea4806527b58b1baf7cd2b4b48ea095186ec987daf
+
+
+ mcc_generated_files\adc\adc0.h
+ 9745d0a3ed92e097097ed23d6f5d20aeaad97ae5ab197d16969759411e89db3e
+
+
+ mcc_generated_files\adc\src\adc0.c
+ d5312ed74e1e808a1d50257dc12eb799bd93b834ba5b2854f1612e4af65d5b7d
+
+
+ mcc_generated_files\dac\dac0.h
+ 0549c6cb256039e641849689faac07bd2cdf824d89e7651010b851bdabd5ae5d
+
+
+ mcc_generated_files\dac\src\dac0.c
+ 3b967ab389e7669b5b2fcd31bd20b78c67003f81104d14a98c27dca231cdff0b
+
+
+ mcc_generated_files\data_streamer\data_streamer.ds
+ 3a5f8aaca18d9b090807a49fc9aebde694a7eb187811d8494658eb1e0e963418
+
+
+ mcc_generated_files\data_streamer\data_streamer.h
+ 6e28c7f23cdeabf3b4483013a6460395658dd7949a312dd31840eba35610e6f3
+
+
+ mcc_generated_files\data_streamer\src\data_streamer.c
+ f6b1ef7fe11e0343605365ce7bfc7af81cdc33bf43770f5cfd78cf17a49534c5
+
+
+ mcc_generated_files\opamp\opamp.h
+ 03703bb1a184c8e276d293e52f758055e91098e610bc285a0339a072e4a095dc
+
+
+ mcc_generated_files\opamp\src\opamp.c
+ 6426beae086f7cf1c825c93d5dda99206e25956659d20a64206733d301189ece
+
+
+ mcc_generated_files\system\ccp.h
+ 00d4c7f49db8510d0ad35d5b65b82db98d0da655c1ea8e81b657e00f49f2640e
+
+
+ mcc_generated_files\system\clock.h
+ 5342e3ba7f014024b35fe2eea86794d9bb9ec656c55311f8b96c34e9eac4b215
+
+
+ mcc_generated_files\system\config_bits.h
+ cfb3dfe72760dc2066638db643962b2a7db39169cfda29327dcb4d3ec4a26be3
+
+
+ mcc_generated_files\system\interrupt.h
+ 49902a470e198f90d0ea9db752f6313c7074811e1a4da98a4d1e8572db7378f5
+
+
+ mcc_generated_files\system\pins.h
+ 7a0d48d214065e724113461ebf69e139c15d9a08d019ede8a93e32784b3cce96
+
+
+ mcc_generated_files\system\port.h
+ b11a993ebf82a6c6f20be03184935a8a4cd3798f435debebdb8cb65da36f64fb
+
+
+ mcc_generated_files\system\protected_io.h
+ 72f5b206c649b31773ab739c0828b1eb6f88d99a27e0fc63f6a9f4119e632370
+
+
+ mcc_generated_files\system\src\clock.c
+ 8de3793d4c564ef1697ce28b5d0955018bc0d17d3a8ecb550ac3e53fa4405f7b
+
+
+ mcc_generated_files\system\src\config_bits.c
+ da35086390f11b66ed0afa138a8c6f5adf00722322388b38601d7253b3bee4b1
+
+
+ mcc_generated_files\system\src\interrupt.c
+ e27867b94747dfcde0538b371a10abd3f95c1516a59d4180fc07d5ccf28697a4
+
+
+ mcc_generated_files\system\src\pins.c
+ b68d73834a5519dac647438c11a7c0f8e102c3f2e580ab0b54fc5d4f972a1120
+
+
+ mcc_generated_files\system\src\protected_io.S
+ 4b140dbb376219b5a3da75f0eb4d64e14c8baef82193b7b562ad74cfed7d3348
+
+
+ mcc_generated_files\system\src\system.c
+ 7ec1ba179d9e866aa7ec5c242df4667903d9e9cfacb38b157e535969e92840a7
+
+
+ mcc_generated_files\system\system.h
+ d024b1816588238869dcbbafffa667f0d46215c13d079a5e1cfcf90c1d4641de
+
+
+ mcc_generated_files\system\utils\assembler.h
+ ef3dab91390b4a198c234566994c23272765931378bb3d0aa94670e39e6e0d26
+
+
+ mcc_generated_files\system\utils\assembler\gas.h
+ 667f6ffee6461d9ad79483b20b02a35dfc4ad60bf0418e2ecbd19df4991dc38d
+
+
+ mcc_generated_files\system\utils\assembler\iar.h
+ 53c9ca51da473f3a6ae6e42f4056df249a058f10ece6f749e5bdd1ea3ed7a385
+
+
+ mcc_generated_files\system\utils\atomic.h
+ 19307b79f5a6af4e7cc53b21a4736a674bc97bdaa5b381d8f0bdfd008bd48b9a
+
+
+ mcc_generated_files\system\utils\compiler.h
+ 7b9b32dc17152d0780506dc95a87e10ba2f9238d1f2e9d7ad8f7493000036fc0
+
+
+ mcc_generated_files\system\utils\interrupt_avr8.h
+ e4084c0e62035baf526b13eb8e403cde7b00331045cd04839520c845bb0707a6
+
+
+ mcc_generated_files\system\utils\utils.h
+ 1c920a9d95628ccae7945d16093b8d2407f5a5f27dc63c6256b9c52d3ec363f2
+
+
+ mcc_generated_files\system\utils\utils_assert.h
+ d347e0636652e48c7fb7c186ae4336f343801e0acdca339cc724db0807b4fff3
+
+
+ mcc_generated_files\timer\rtc.h
+ 30de4216e54591b4ce33fa8b85e391383b5612c6040cabae2de0dd78b7a2160e
+
+
+ mcc_generated_files\timer\src\rtc.c
+ 8306e8e939cd5445e08215704a3738c4d52084a12ab6b19f0d89add90d79386e
+
+
+ mcc_generated_files\timer\src\tcb0.c
+ cee852845480c8d90f838e23532e7b6058e717fc70e062fb71916779af420776
+
+
+ mcc_generated_files\timer\src\tcb1.c
+ 81c562f8f043f9648e8844fc8b485964b979a58be45985955bb94f93b103db00
+
+
+ mcc_generated_files\timer\tcb0.h
+ 7a1288fc46858406f1c51ae2f96e5853335aca54d6a69ba94fd1c4d7fe553a73
+
+
+ mcc_generated_files\timer\tcb0_deprecated.h
+ 694cb27180c8eefa7d095e8398ca24bf46b04b63a96cb3d13ffc5df87af08e9e
+
+
+ mcc_generated_files\timer\tcb1.h
+ fcee68e8303016d74505dc8d89515bd6562365c9e1416cf08a13b8f7dfe5e933
+
+
+ mcc_generated_files\timer\tcb1_deprecated.h
+ 7f72627208907e46457461ba1aa1514f055bfb43aec861be0d4c8362663c7766
+
+
+ mcc_generated_files\uart\src\usart3.c
+ 50b378761bf7037897f4212befb6d1ac88bdafd88d3cfddb712b3de22b66b91c
+
+
+ mcc_generated_files\uart\uart_drv_interface.h
+ ad5aaf8976724442bdcbffa3c53527147f62a3745058de17e68c8ef5c3204e6e
+
+
+ mcc_generated_files\uart\uart_types.h
+ b7d15f2c3333652fa797c51b4abb616deaa4fff2224347f096c4b40b39963aaa
+
+
+ mcc_generated_files\uart\usart3.h
+ a0408604af9d136ef752a2b7d35f8bc7ee8c385f66f2051433e88799dad7700b
+
+
+ mcc_generated_files\vref\src\vref.c
+ 791564c4f19ddf68ebc2317ce2090af65f178af966f8f03a8da580a7c2d932c0
+
+
+ mcc_generated_files\vref\vref.h
+ 45d7853bf4d55b39db01525bd3e376e180f317ac74992a5e49ca9436865cbc50
+
+
+
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/main.c b/instrumentation-amplifier.X/main.c
index c52d6a8..c852e8a 100644
--- a/instrumentation-amplifier.X/main.c
+++ b/instrumentation-amplifier.X/main.c
@@ -1,28 +1,27 @@
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
+ (c) 2018 Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip software and any
+ derivatives exclusively with Microchip products. It is your responsibility to comply with third party
+ license terms applicable to your use of third party software (including open source software) that
may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
+
+ THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
+ EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
+ IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
+
+ IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
+ WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
+ HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
+ THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
+ CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
+ OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
SOFTWARE.
-*/
+ */
-#include "mcc_generated_files/mcc.h"
-#include "data_stream.h"
+#include "mcc_generated_files/system/system.h"
#include
#define DEGREE 0.0245 //2pi /256 = 6.28/ 256.
@@ -57,75 +56,78 @@ uint16_t sine_wave[SINE_WAVE_STEPS];
void myRTCISR(void);
void myTCB0ISR(void);
-void myTCB1ISR (void);
+void myTCB1ISR(void);
void sine_wave_table_init(void);
+void adc_resrdy(void);
/*
Main application
-*/
+ */
int main(void)
{
/* Initializes MCU, drivers and middleware */
SYSTEM_Initialize();
-
+
+ DataStreamer.diff_input = 0;
+ DataStreamer.opampVal = 0;
+
sine_wave_table_init();
-
+
+ ADC0_RegisterResrdyCallback(adc_resrdy);
RTC_SetOVFIsrCallback(myRTCISR);
- TCB0_SetCaptIsrCallback(myTCB0ISR);
- USART3_SetTXISRCb(myUSART_3_ISR);
- data_stream.start_token = START_TOKEN;
- data_stream.end_token = (~START_TOKEN);
- TCB1_SetCaptIsrCallback(myTCB1ISR);
+ TCB0_CaptureCallbackRegister(myTCB0ISR);
+ TCB1_CaptureCallbackRegister(myTCB1ISR);
/* Replace with your application code */
- while (1){
+ while (1)
+ {
}
}
-void myRTCISR(void){
+void myRTCISR(void)
+{
LED0_Toggle(); //Control LED
}
-void myTCB0ISR(void){
-
+void myTCB0ISR(void)
+{
+
volatile static uint16_t sine_wave_index = 0;
-
+
DAC0_SetOutput(sine_wave[sine_wave_index]); //Control LED
- data_stream.diff_input = VDD_DIV_2_VOLTS - (sine_wave[sine_wave_index] << 1);
+ DataStreamer.diff_input = VDD_DIV_2_VOLTS - (sine_wave[sine_wave_index] << 1);
sine_wave_index++;
sine_wave_index = sine_wave_index % SINE_WAVE_STEPS;
}
void sine_wave_table_init(void)
{
- for(uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
- {
- sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
- }
-
+ for (uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
+ {
+ sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
+ }
+
}
-void myTCB1ISR (void){
- if (data_stream.data_available == 0) {
+void myTCB1ISR(void)
+{
+ if (USART3_IsTxReady())
+ {
/* Start ADC conversion */
ADC0.COMMAND = ADC_STCONV_bm;
}
-
/* Clear interrupt flag */
- TCB1.INTFLAGS = 0xFF;
}
-ISR (ADC0_RESRDY_vect)
+void adc_resrdy(void)
{
- data_stream.data_available = 1;
- data_stream.opampVal = (int16_t)((int16_t)ADC0.RES >> 3);
- data_stream.opampVal = ((int16_t)(data_stream.opampVal*32)/10);
- DS_sendData();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
+ DataStreamer.opampVal = (int16_t) ((int16_t) ADC0.RES >> 3);
+ DataStreamer.opampVal = ((int16_t) (DataStreamer.opampVal * 32) / 10);
+ WriteFrame();
}
/**
End of File
-*/
\ No newline at end of file
+ */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/adc/adc0.h b/instrumentation-amplifier.X/mcc_generated_files/adc/adc0.h
new file mode 100644
index 0000000..0b930f1
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/adc/adc0.h
@@ -0,0 +1,231 @@
+/**
+ * ADC0 Generated Driver API Header File
+ *
+ * @file adc0.h
+ *
+ * @defgroup adc0 ADC0
+ *
+ * @brief API prototypes and other datatypes for the ADC0 module driver.
+ *
+ * @version ADC0 Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ADC0_H_INCLUDED
+#define ADC0_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup adc0
+ * @enum ADC0_window_mode_t
+ * @brief Window Comparator Modes
+ */
+typedef enum {
+ ADC0_window_disabled, /**
+#include
+
+/**
+ * @def Data Streamer Start Byte Macro.
+ * Macro that represents the byte that is sent to signify the beginning of the Data Streamer frame.
+ */
+#define DATA_STREAMER_START_BYTE 3
+
+/**
+ * @def Data Streamer End Byte Macro.
+ * Macro that represents the byte that is sent to signify the end of the Data Streamer frame.
+ */
+#define DATA_STREAMER_END_BYTE (255 - DATA_STREAMER_START_BYTE)
+
+/**
+ * @ingroup datastreamer
+ * @struct DATA_STREAMER_STRUCT
+ * @brief Structure containing the initial Data Streamer variables.
+ */
+struct __attribute__((packed)) DATA_STREAMER_STRUCT
+{
+ int16_t diff_input;
+ int16_t opampVal;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct PACKAGE_STRUCT
+ * @brief Structure containing a pointer assigned to a custom data package and its size which are set by the user.
+ */
+struct PACKAGE_STRUCT
+{
+ void * varStruct;
+ size_t length;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct DataStreamer
+ * @brief An instance of the DATA_STREAMER_STRUCT.
+ */
+extern struct DATA_STREAMER_STRUCT DataStreamer;
+
+/**
+ @ingroup datastreamer
+ @struct DATA_STREAMER_PACKAGE
+ @brief An instance of the PACKAGE_STRUCT.
+ */
+extern struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+/**
+ * @def Data Streamer Write Frame Macro.
+ * Macro used to write the frame to the Data Streamer.
+ */
+#define WriteFrame() DataStreamer_FrameSend(DATA_STREAMER_PACKAGE.varStruct,DATA_STREAMER_PACKAGE.length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Initializes the Data Streamer.
+ * @param None.
+ * @return None.
+ */
+void DataStreamer_Initialize(void);
+
+/**
+ * @ingroup datastreamer
+ * @brief Writes the frame to the Data Streamer.
+ * @param void * package - Pointer to the DATA_STREAMER_PACKAGE structure containing the variables to be sent.
+ * @param size_t length - Size of the DATA_STREAMER_PACKAGE structure in bytes.
+ * @return None.
+ */
+void DataStreamer_FrameSend(void * package, size_t length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Sets the package containing the variables to be sent by the Data Streamer.
+ * @param void * customStructHandler - Pointer to the user-defined structure containing the variables to be sent to the Data Streamer.
+ * @param size_t customlength - Size of the user-defined structure in bytes.
+ * @return None.
+ */
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength);
+
+#endif /* DATA_STREAMER_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c b/instrumentation-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c
new file mode 100644
index 0000000..3b57f3c
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/data_streamer/src/data_streamer.c
@@ -0,0 +1,69 @@
+/**
+ * DATASTREAMER Generated Driver API Source File.
+ *
+ * @file data_streamer.c
+ *
+ * @ingroup datastreamer
+ *
+ * @brief This file contains the implementation for the Data Streamer driver APIs.
+ *
+ * @version Data Streamer Driver Version 1.2.1
+ */
+ /*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../data_streamer.h"
+#include "../../uart/usart3.h"
+
+static const uart_drv_interface_t *DS_UART = &UART3;
+
+
+struct DATA_STREAMER_STRUCT DataStreamer;
+struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+void DataStreamer_Initialize(void)
+{
+ DataStreamer_PackageSet(&DataStreamer, sizeof (DataStreamer));
+}
+
+static void DataStreamer_VariableWrite(char var)
+{
+ while (!(DS_UART->IsTxReady()));
+ DS_UART->Write(var);
+};
+
+void DataStreamer_FrameSend(void * package, size_t length)
+{
+ char * dp = package;
+ DataStreamer_VariableWrite(DATA_STREAMER_START_BYTE);
+ while (length--)
+ {
+ DataStreamer_VariableWrite(*dp++);
+ }
+ DataStreamer_VariableWrite(DATA_STREAMER_END_BYTE);
+ while (!(DS_UART->IsTxDone()));
+};
+
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength)
+{
+ DATA_STREAMER_PACKAGE.varStruct = customStructHandler;
+ DATA_STREAMER_PACKAGE.length = customlength;
+};
diff --git a/instrumentation-amplifier.X/mcc_generated_files/device_config.c b/instrumentation-amplifier.X/mcc_generated_files/device_config.c
deleted file mode 100644
index 829d080..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/device_config.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include
-
-/**
- * \Configures Fuse bits
- */
-
-FUSES =
-{
- .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
- .BOOTSIZE = 0,
- .CODESIZE = 0,
- .OSCCFG = CLKSEL_OSCHF_gc,
- .SYSCFG0 = CRCSEL_CRC32_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
- .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
- .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
-};
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/adc0.h b/instrumentation-amplifier.X/mcc_generated_files/include/adc0.h
deleted file mode 100644
index 37ac63f..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/adc0.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ADC0_H_INCLUDED
-#define ADC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- adc0_window_disabled,
- adc0_window_below,
- adc0_window_above,
- adc0_window_inside,
- adc0_window_outside
-} adc0_window_mode_t;
-
-/** Function pointer to callback function called by IRQ.
- NULL=default value: No callback function is to be used.
-*/
-typedef void (*adc_irq_cb_t)(void);
-
-/** Datatype for the result of the ADC conversion */
-typedef uint16_t adc_result_t;
-typedef int16_t diff_adc_result_t;
-
-//* Analog channel selection */
-typedef ADC_MUXPOS_t adc_0_channel_t;
-typedef ADC_MUXNEG_t adc_0_muxneg_channel_t;
-
-/**
- * \brief Initialize ADC interface
- * If module is configured to disabled state, the clock to the ADC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the ADC init was successful
- * \retval 1 the ADC init was not successful
- */
-int8_t ADC0_Initialize();
-
-/**
- * \brief Enable ADC0
- * 1. If supported by the clock system, enables the clock to the ADC
- * 2. Enables the ADC module by setting the enable-bit in the ADC control register
- *
- * \return Nothing
- */
-void ADC0_Enable();
-
-/**
- * \brief Disable ADC0
- * 1. Disables the ADC module by clearing the enable-bit in the ADC control register
- * 2. If supported by the clock system, disables the clock to the ADC
- *
- * \return Nothing
- */
-void ADC0_Disable();
-
-/**
- * \brief Enable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_EnableAutoTrigger();
-
-/**
- * \brief Disable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_DisableAutoTrigger();
-
-/**
- * \brief Set conversion window comparator high threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowHigh(adc_result_t high);
-
-/**
- * \brief Set conversion window comparator low threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowLow(adc_result_t low);
-
-/**
- * \brief Set conversion window mode
- *
- * \return Nothing
- */
-void ADC0_SetWindowMode(adc0_window_mode_t mode);
-
-/**
- * \brief Set ADC channel to be used for windowed conversion mode
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_SetWindowChannel(adc_0_channel_t channel);
-
-/**
- * \brief Start a conversion on ADC0
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion on ADC0
- *
- * \param[in] channel,channel1 The ADC channels to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Stop a conversion on ADC0
- *
- * \return Nothing
- */
-void ADC0_StopConversion();
-
-/**
- * \brief Check if the ADC conversion is done
- *
- * \return The status of ADC converison done check
- * \retval true The ADC conversion is done
- * \retval false The ADC converison is not done
- */
-bool ADC0_IsConversionDone();
-
-/**
- * \brief Read a conversion result from ADC0
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversionResult(void);
-
-/**
- * \brief Read the conversion window result from ADC0
- *
- * \return Returns true when a comparison results in a trigger condition, false otherwise.
- */
-bool ADC0_GetWindowResult(void);
-
-/**
- * \brief Start a conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Return the number of bits in the ADC conversion result
- *
- * \return The number of bits in the ADC conversion result
- */
-uint8_t ADC0_GetResolution();
-
-/**
- * \brief Register a callback function to be called if conversion satisfies window criteria.
- *
- * \param[in] f Pointer to function to be called
- *
- * \return Nothing.
- */
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ADC0_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/ccp.h b/instrumentation-amplifier.X/mcc_generated_files/include/ccp.h
deleted file mode 100644
index 9f416a0..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/ccp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPU_CCP_H
-#define CPU_CCP_H
-
-#include "../utils/compiler.h"
-#include "../include/protected_io.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Write to a CCP-protected 8-bit I/O register
- *
- * \param addr Address of the I/O register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_io(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_IOREG_gc, value);
-}
-
-/** @} */
-
-/**
- * \brief Write to CCP-protected 8-bit SPM register
- *
- * \param addr Address of the SPM register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_spm(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_SPM_gc, value);
-}
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CCP_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/cpuint.h b/instrumentation-amplifier.X/mcc_generated_files/include/cpuint.h
deleted file mode 100644
index 67c012c..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/cpuint.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPUINT_H_INCLUDED
-#define CPUINT_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include "ccp.h"
-#include "../utils/atomic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /** \
- * \brief Initialize cpuint interface \
- * \
- * \return Initialization status \
- */
-int8_t CPUINT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPUINT_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/dac0.h b/instrumentation-amplifier.X/mcc_generated_files/include/dac0.h
deleted file mode 100644
index 70239d9..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/dac0.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef DAC0_H_INCLUDED
-#define DAC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Datatype for the resolution of the DAC */
-typedef uint16_t dac_resolution_t;
-
-/**
- * \brief Initialize DAC interface
- * If module is configured to disabled state, the clock to the DAC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the DAC init was successful
- * \retval 1 the DAC init was not successful
- */
-int8_t DAC0_Initialize();
-
-/**
- * \brief Enable DAC0
- * 1. If supported by the clock system, enables the clock to the DAC
- * 2. Enables the DAC module by setting the enable-bit in the DAC control register
- *
- * \return Nothing
- */
-void DAC0_Enable();
-
-/**
- * \brief Disable DAC0
- * 1. Disables the DAC module by clearing the enable-bit in the DAC control register
- * 2. If supported by the clock system, disables the clock to the DAC
- *
- * \return Nothing
- */
-void DAC0_Disable();
-
-/**
- * \brief Start a conversion on DAC0
- *
- * \param[in] value The digital value to be converted to analogue voltage by the DAC
- *
- * \return Nothing
- */
-void DAC0_SetOutput(dac_resolution_t value);
-
-/**
- * \brief Return the number of bits in the DAC resolution
- *
- * \return The number of bits in the DAC resolution
- */
-uint8_t DAC0_GetResolution();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DAC0_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/opamp.h b/instrumentation-amplifier.X/mcc_generated_files/include/opamp.h
deleted file mode 100644
index 0095045..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/opamp.h
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef OPAMP_H_INCLUDED
-#define OPAMP_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include
-
-#define OPAMP_TIMEBASE_VALUE (23)
-
-/**
- @Summary
- Initializes the OPAMP_Initialize.
-
- @Description
- This routine initializes the OPAMP_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- OPAMP_Initialize();
-
-*/
-void OPAMP_Initialize();
-
-/**
- * @brief Enables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_EnableSystem(void);
-
-/**
- * @brief Disables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_DisableSystem(void);
-
-//OP0 Instrumentation Amplifier APIs
-
-/**
- * @brief Sets OP0's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets the R1 and R2 values of OP0's internal resistor ladder as per user selection
- * @return None
- * @param [in] Desired resistor selection
- For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
- */
-void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value);
-
-/**
- * @brief Sets OP0's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP0SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP0's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP0Settled(void);
-
-/**
- * @brief Sets OP0's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
-
-//OP1 Instrumentation Amplifier APIs
-
-/**
- * @brief Sets OP1's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets OP1's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP1SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP1's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP1Settled(void);
-
-/**
- * @brief Sets OP1's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP1OffsetCalibration(uint8_t calValue);
-
-//OP2 Instrumentation Amplifier APIs
-
-/**
- * @brief Sets the R1 and R2 values of OP2's internal resistor ladder as per user selection
- * @return None
- * @param [in] Desired resistor selection
- For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
- */
-void OPAMP_SetOP2WiperResMux(OPAMP_OP2RESMUX_MUXWIP_t value);
-
-/**
- * @brief Sets OP2's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP2SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP2's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP2Settled(void);
-
-/**
- * @brief Sets OP2's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP2OffsetCalibration(uint8_t calValue);
-
-#endif /* OPAMP_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/pin_manager.h b/instrumentation-amplifier.X/mcc_generated_files/include/pin_manager.h
deleted file mode 100644
index e4d7175..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/pin_manager.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef PINS_H_INCLUDED
-#define PINS_H_INCLUDED
-
-#include
-#include "port.h"
-
-//get/set LED0 aliases
-#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
-#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
-#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
-#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
-#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
-#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
-#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD5 aliases
-#define PD5_SetHigh() do { PORTD_OUTSET = 0x20; } while(0)
-#define PD5_SetLow() do { PORTD_OUTCLR = 0x20; } while(0)
-#define PD5_Toggle() do { PORTD_OUTTGL = 0x20; } while(0)
-#define PD5_GetValue() (VPORTD.IN & (0x1 << 5))
-#define PD5_SetDigitalInput() do { PORTD_DIRCLR = 0x20; } while(0)
-#define PD5_SetDigitalOutput() do { PORTD_DIRSET = 0x20; } while(0)
-#define PD5_SetPullUp() do { PORTD_PIN5CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD5_ResetPullUp() do { PORTD_PIN5CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD5_SetInverted() do { PORTD_PIN5CTRL |= PORT_INVEN_bm; } while(0)
-#define PD5_ResetInverted() do { PORTD_PIN5CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD5_DisableInterruptOnChange() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD5_EnableInterruptForBothEdges() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD5_EnableInterruptForRisingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD5_EnableInterruptForFallingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD5_DisableDigitalInputBuffer() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD5_EnableInterruptForLowLevelSensing() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA2 aliases
-#define PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
-#define PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
-#define PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
-#define PA2_GetValue() (VPORTA.IN & (0x1 << 2))
-#define PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
-#define PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
-#define PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA3 aliases
-#define PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
-#define PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
-#define PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
-#define PA3_GetValue() (VPORTA.IN & (0x1 << 3))
-#define PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
-#define PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
-#define PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD6 aliases
-#define PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
-#define PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
-#define PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
-#define PD6_GetValue() (VPORTD.IN & (0x1 << 6))
-#define PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
-#define PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
-#define PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
-#define PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PE2 aliases
-#define PE2_SetHigh() do { PORTE_OUTSET = 0x4; } while(0)
-#define PE2_SetLow() do { PORTE_OUTCLR = 0x4; } while(0)
-#define PE2_Toggle() do { PORTE_OUTTGL = 0x4; } while(0)
-#define PE2_GetValue() (VPORTE.IN & (0x1 << 2))
-#define PE2_SetDigitalInput() do { PORTE_DIRCLR = 0x4; } while(0)
-#define PE2_SetDigitalOutput() do { PORTE_DIRSET = 0x4; } while(0)
-#define PE2_SetPullUp() do { PORTE_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PE2_ResetPullUp() do { PORTE_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PE2_SetInverted() do { PORTE_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PE2_ResetInverted() do { PORTE_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PE2_DisableInterruptOnChange() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PE2_EnableInterruptForBothEdges() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PE2_EnableInterruptForRisingEdge() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PE2_EnableInterruptForFallingEdge() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PE2_DisableDigitalInputBuffer() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PE2_EnableInterruptForLowLevelSensing() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB1 aliases
-#define PB1_SetHigh() do { PORTB_OUTSET = 0x2; } while(0)
-#define PB1_SetLow() do { PORTB_OUTCLR = 0x2; } while(0)
-#define PB1_Toggle() do { PORTB_OUTTGL = 0x2; } while(0)
-#define PB1_GetValue() (VPORTB.IN & (0x1 << 1))
-#define PB1_SetDigitalInput() do { PORTB_DIRCLR = 0x2; } while(0)
-#define PB1_SetDigitalOutput() do { PORTB_DIRSET = 0x2; } while(0)
-#define PB1_SetPullUp() do { PORTB_PIN1CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB1_ResetPullUp() do { PORTB_PIN1CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB1_SetInverted() do { PORTB_PIN1CTRL |= PORT_INVEN_bm; } while(0)
-#define PB1_ResetInverted() do { PORTB_PIN1CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB1_DisableInterruptOnChange() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB1_EnableInterruptForBothEdges() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB1_EnableInterruptForRisingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB1_EnableInterruptForFallingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB1_DisableDigitalInputBuffer() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB1_EnableInterruptForLowLevelSensing() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB0 aliases
-#define PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
-#define PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
-#define PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
-#define PB0_GetValue() (VPORTB.IN & (0x1 << 0))
-#define PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
-#define PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
-#define PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
-#define PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD2 aliases
-#define PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
-#define PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
-#define PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
-#define PD2_GetValue() (VPORTD.IN & (0x1 << 2))
-#define PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
-#define PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
-#define PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-void PIN_MANAGER_Initialize();
-void PORTB_LED0_DefaultInterruptHandler(void);
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD5_DefaultInterruptHandler(void);
-void PORTD_PD5_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA2_DefaultInterruptHandler(void);
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA3_DefaultInterruptHandler(void);
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD6_DefaultInterruptHandler(void);
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTE_PE2_DefaultInterruptHandler(void);
-void PORTE_PE2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB1_DefaultInterruptHandler(void);
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB0_DefaultInterruptHandler(void);
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD2_DefaultInterruptHandler(void);
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-#endif /* PINS_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/port.h b/instrumentation-amplifier.X/mcc_generated_files/include/port.h
deleted file mode 100644
index 6a314fd..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/port.h
+++ /dev/null
@@ -1,1383 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef PORT_INCLUDED
-#define PORT_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../utils/compiler.h"
-
-enum port_pull_mode {
- PORT_PULL_OFF,
- PORT_PULL_UP,
-};
-
-enum port_dir {
- PORT_DIR_IN,
- PORT_DIR_OUT,
- PORT_DIR_OFF,
-};
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= mask;
- } else {
- VPORTE.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= (1 << pin);
- } else {
- VPORTE.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTE_toggle_port_level(const uint8_t mask)
-{
- PORTE.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTE_toggle_pin_level(const uint8_t pin)
-{
- PORTE.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTE_get_port_level()
-{
- return VPORTE.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTE_get_pin_level(const uint8_t pin)
-{
- return VPORTE.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTE_write_port(const uint8_t value)
-{
- VPORTE.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= mask;
- } else {
- VPORTF.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= (1 << pin);
- } else {
- VPORTF.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTF_toggle_port_level(const uint8_t mask)
-{
- PORTF.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTF_toggle_pin_level(const uint8_t pin)
-{
- PORTF.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTF_get_port_level()
-{
- return VPORTF.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTF_get_pin_level(const uint8_t pin)
-{
- return VPORTF.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTF_write_port(const uint8_t value)
-{
- VPORTF.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= mask;
- } else {
- VPORTA.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= (1 << pin);
- } else {
- VPORTA.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTA_toggle_port_level(const uint8_t mask)
-{
- PORTA.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTA_toggle_pin_level(const uint8_t pin)
-{
- PORTA.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTA_get_port_level()
-{
- return VPORTA.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTA_get_pin_level(const uint8_t pin)
-{
- return VPORTA.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTA_write_port(const uint8_t value)
-{
- VPORTA.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= mask;
- } else {
- VPORTB.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= (1 << pin);
- } else {
- VPORTB.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTB_toggle_port_level(const uint8_t mask)
-{
- PORTB.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTB_toggle_pin_level(const uint8_t pin)
-{
- PORTB.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTB_get_port_level()
-{
- return VPORTB.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTB_get_pin_level(const uint8_t pin)
-{
- return VPORTB.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTB_write_port(const uint8_t value)
-{
- VPORTB.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= mask;
- } else {
- VPORTC.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= (1 << pin);
- } else {
- VPORTC.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTC_toggle_port_level(const uint8_t mask)
-{
- PORTC.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTC_toggle_pin_level(const uint8_t pin)
-{
- PORTC.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTC_get_port_level()
-{
- return VPORTC.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTC_get_pin_level(const uint8_t pin)
-{
- return VPORTC.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTC_write_port(const uint8_t value)
-{
- VPORTC.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= mask;
- } else {
- VPORTD.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= (1 << pin);
- } else {
- VPORTD.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTD_toggle_port_level(const uint8_t mask)
-{
- PORTD.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTD_toggle_pin_level(const uint8_t pin)
-{
- PORTD.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTD_get_port_level()
-{
- return VPORTD.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTD_get_pin_level(const uint8_t pin)
-{
- return VPORTD.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTD_write_port(const uint8_t value)
-{
- VPORTD.OUT = value;
-}
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/protected_io.h b/instrumentation-amplifier.X/mcc_generated_files/include/protected_io.h
deleted file mode 100644
index ec8fcc3..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/protected_io.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_system_protected_io Protected IO
- * \ingroup doc_driver_system
- *
- * \section doc_driver_protected_io_rev Revision History
- * - v0.0.0.1 Initial Commit
- *
- *@{
- */
-
-#ifndef PROTECTED_IO_H
-#define PROTECTED_IO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__DOXYGEN__)
-//! \name IAR Memory Model defines.
-//@{
-
-/**
- * \def CONFIG_MEMORY_MODEL_TINY
- * \brief Configuration symbol to enable 8 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_TINY
-
-/**
- * \def CONFIG_MEMORY_MODEL_SMALL
- * \brief Configuration symbol to enable 16 bit pointers.
- * \note If no memory model is defined, SMALL is default.
- *
- */
-#define CONFIG_MEMORY_MODEL_SMALL
-
-/**
- * \def CONFIG_MEMORY_MODEL_LARGE
- * \brief Configuration symbol to enable 24 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_LARGE
-
-//@}
-#endif
-
-/**
- * \brief Write to am 8-bit I/O register protected by CCP or a protection bit
- *
- * \param addr Address of the I/O register
- * \param magic CCP magic value or Mask for protection bit
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
-
-/** @} */
-
-#endif /* PROTECTED_IO_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/rstctrl.h b/instrumentation-amplifier.X/mcc_generated_files/include/rstctrl.h
deleted file mode 100644
index 538084b..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/rstctrl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RSTCTRL_INCLUDED
-#define RSTCTRL_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ccp.h"
-
-static inline void RSTCTRL_reset(void)
-{
- /* SWRR is protected with CCP */
- ccp_write_io((void *)&RSTCTRL.SWRR, 0x0);
-
-}
-
-static inline uint8_t RSTCTRL_get_reset_cause(void)
-{
- return RSTCTRL.RSTFR;
-}
-
-static inline void RSTCTRL_clear_reset_cause(void)
-{
- RSTCTRL.RSTFR
- = RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RSTCTRL_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/rtc.h b/instrumentation-amplifier.X/mcc_generated_files/include/rtc.h
deleted file mode 100644
index 978d393..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/rtc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RTCDRIVER_H
-#define RTCDRIVER_H
-
-#include "../utils/compiler.h"
-#include
-#include
-
-/** Datatype used to hold the number of ticks until a timer expires */
-
-typedef void (*RTC_cb_t)(void);
-void RTC_SetOVFIsrCallback(RTC_cb_t cb);
-void RTC_SetCMPIsrCallback(RTC_cb_t cb);
-void RTC_SetPITIsrCallback(RTC_cb_t cb);
-int8_t RTC_Initialize();
-void RTC_WriteCounter(uint16_t timerVal);
-void RTC_WritePeroid(uint16_t timerVal);
-uint16_t RTC_ReadCounter();
-uint16_t RTC_ReadPeriod();
-void RTC_EnableCMPInterrupt();
-void RTC_DisableCMPInterrupt();
-void RTC_EnableOVFInterrupt();
-void RTC_DisableOVFInterrupt();
-void RTC_EnablePITInterrupt();
-void RTC_DisablePITInterrupt();
-void RTC_ClearOVFInterruptFlag();
-bool RTC_IsOVFInterruptEnabled();
-
-
-#endif /* RTCDRIVER_H */
-
-/** @}*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/tcb0.h b/instrumentation-amplifier.X/mcc_generated_files/include/tcb0.h
deleted file mode 100644
index a1721c6..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/tcb0.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB0_H_INCLUDED
-#define TCB0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB0_cb_t)(void);
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb);
-void TCB0_SetOvfIsrCallback(TCB0_cb_t cb);
-int8_t TCB0_Initialize();
-void TCB0_EnableCaptInterrupt(void);
-void TCB0_DisableCaptInterrupt(void);
-uint16_t TCB0_ReadTimer(void);
-void TCB0_WriteTimer(uint16_t timerVal);
-void TCB0_ClearCaptInterruptFlag(void);
-bool TCB0_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/tcb1.h b/instrumentation-amplifier.X/mcc_generated_files/include/tcb1.h
deleted file mode 100644
index 7bed96b..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/tcb1.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB1_H_INCLUDED
-#define TCB1_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB1_cb_t)(void);
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb);
-void TCB1_SetOvfIsrCallback(TCB1_cb_t cb);
-int8_t TCB1_Initialize();
-void TCB1_EnableCaptInterrupt(void);
-void TCB1_DisableCaptInterrupt(void);
-uint16_t TCB1_ReadTimer(void);
-void TCB1_WriteTimer(uint16_t timerVal);
-void TCB1_ClearCaptInterruptFlag(void);
-bool TCB1_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/usart3.h b/instrumentation-amplifier.X/mcc_generated_files/include/usart3.h
deleted file mode 100644
index b1b355f..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/usart3.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef USART3_H_INCLUDED
-#define USART3_H_INCLUDED
-
-#include
-#include
-#include "../utils/compiler.h"
-#include "../utils/atomic.h"
-#include "../config/clock_config.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Normal Mode, Baud register value */
-#define USART3_BAUD_RATE(BAUD_RATE) (((float)24000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
-
-/* USART3 Ringbuffer */
-
-#define USART3_RX_BUFFER_SIZE 8
-#define USART3_TX_BUFFER_SIZE 8
-#define USART3_RX_BUFFER_MASK (USART3_RX_BUFFER_SIZE - 1)
-#define USART3_TX_BUFFER_MASK (USART3_TX_BUFFER_SIZE - 1)
-
-typedef enum { USART3_RX_CB = 1, USART3_TX_CB } usart3_cb_t;
-typedef void (*usart_callback)(void);
-
-/**
- * \brief Initialize USART interface
- * If module is configured to disabled state, the clock to the USART is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the USART init was successful
- * \retval 1 the USART init was not successful
- */
-void USART3_Initialize();
-
-/**
- * \brief Enable RX and TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX and TX enable-bits in the USART control register
- *
- * \return Nothing
- */
-void USART3_Enable();
-
-/**
- * \brief Enable RX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableRx();
-
-/**
- * \brief Enable TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the TX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableTx();
-
-/**
- * \brief Disable USART3
- * 1. Disables the USART module by clearing the enable-bit(s) in the USART control register
- * 2. If supported by the clock system, disables the clock to the USART
- *
- * \return Nothing
- */
-void USART3_Disable();
-
-/**
- * \brief Get recieved data from USART3
- *
- * \return Data register from USART3 module
- */
-uint8_t USART3_GetData();
-
-/**
- * \brief Check if the usart can accept data to be transmitted
- *
- * \return The status of USART TX data ready check
- * \retval false The USART can not receive data to be transmitted
- * \retval true The USART can receive data to be transmitted
- */
-bool USART3_IsTxReady();
-
-/**
- * \brief Check if the USART has received data
- *
- * \return The status of USART RX data ready check
- * \retval true The USART has received data
- * \retval false The USART has not received data
- */
-bool USART3_IsRxReady();
-
-/**
- * \brief Check if USART3 data is transmitted
- *
- * \return Receiver ready status
- * \retval true Data is not completely shifted out of the shift register
- * \retval false Data completely shifted out if the USART shift register
- */
-bool USART3_IsTxBusy();
-
-
-
-bool USART3_IsTxDone();
-/**
- * \brief Read one character from USART3
- *
- * Function will block if a character is not available.
- *
- * \return Data read from the USART3 module
- */
-uint8_t USART3_Read(void);
-
-/**
- * \brief Write one character to USART3
- *
- * Function will block until a character can be accepted.
- *
- * \param[in] data The character to write to the USART
- *
- * \return Nothing
- */
-void USART3_Write(const uint8_t data);
-
-/**
- * \brief Set call back function for USART3
- *
- * \param[in] cb The call back function to set
- *
- * \param[in] type The type of ISR to be set
- *
- * \return Nothing
- */
-
-void USART3_DefaultRxIsrCb(void);
-
-void USART3_DefaultTxIsrCb(void);
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type);
-
-void USART3_SetRXISRCb(usart_callback cb);
-
-void USART3_SetTXISRCb(usart_callback cb);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* USART3_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/include/vref.h b/instrumentation-amplifier.X/mcc_generated_files/include/vref.h
deleted file mode 100644
index 9002df4..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/include/vref.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef VREF_H_INCLUDED
-#define VREF_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- @Summary
- Initializes the VREF_Initialize.
-
- @Description
- This routine initializes the VREF_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- VREF_Initialize();
-
-*/
-int8_t VREF_Initialize(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CCL_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/mcc.c b/instrumentation-amplifier.X/mcc_generated_files/mcc.c
deleted file mode 100644
index 0bdb0fa..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/mcc.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "mcc.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void)
-{
- PIN_MANAGER_Initialize();
- //CPU_Initialize();
- BOD_Initialize();
- WDT_Initialize();
- SLPCTRL_Initialize();
- CLKCTRL_Initialize();
- OPAMP_Initialize();
- ADC0_Initialize();
- DAC0_Initialize();
- RTC_Initialize();
- TCB0_Initialize();
- USART3_Initialize();
- VREF_Initialize();
- CPUINT_Initialize();
- TCB1_Initialize();
-}
-
-/**
- * \brief Initialize bod interface
- */
-int8_t BOD_Initialize()
-{
- //SLEEP DIS;
- ccp_write_io((void*)&(BOD.CTRLA),0x00);
-
- //VLMCFG FALLING; VLMIE disabled;
- BOD.INTCTRL = 0x00;
-
- //VLMLVL OFF;
- BOD.VLMCTRLA = 0x00;
-
- return 0;
-}
-
-ISR(BOD_VLM_vect)
-{
- /* Insert your AC interrupt handling code here */
-
- /* The interrupt flag has to be cleared manually */
- BOD.INTFLAGS = BOD_VLMIE_bm;
-}
-
-/**
- * \brief Initialize clkctrl interface
- */
-int8_t CLKCTRL_Initialize()
-{
- //RUNSTDBY disabled;
- ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0x00);
-
- //RUNSTDBY disabled; CSUT 1K; SEL disabled; LPMODE disabled; ENABLE disabled;
- ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),0x00);
-
- //PDIV 6X; PEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),0x10);
-
- //CFDSRC CLKMAIN; CFDTST disabled; CFDEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),0x00);
-
- //INTTYPE INT; CFD disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),0x00);
-
- //CLKOUT disabled; CLKSEL OSCHF;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),0x00);
-
- //PLLS disabled; EXTS disabled; XOSC32KS disabled; OSC32KS disabled; OSCHFS disabled; SOSC disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKSTATUS),0x00);
-
- //RUNSTDBY disabled; FREQSEL 24M; AUTOTUNE disabled;
- ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),0x24);
-
- return 0;
-}
-
-/**
- * \brief Initialize slpctrl interface
- */
-int8_t SLPCTRL_Initialize()
-{
- //SMODE IDLE; SEN disabled;
- ccp_write_io((void*)&(SLPCTRL.CTRLA),0x00);
-
- return 0;
-}
-
-/**
- * \brief Initialize wdt interface
- */
-
-int8_t WDT_Initialize()
-{
- //WINDOW OFF; PERIOD OFF;
- ccp_write_io((void*)&(WDT.CTRLA),0x00);
-
- return 0;
-}
-/*TODO comment will remove once complier support will be available.
-int8_t CPU_Initialize()
-{
- return 0;
-
-}
-*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/mcc.h b/instrumentation-amplifier.X/mcc_generated_files/mcc.h
deleted file mode 100644
index 667188f..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/mcc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef MCC_H
-#define MCC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "utils/compiler.h"
-#include "include/pin_manager.h"
-#include "include/rtc.h"
-#include "include/cpuint.h"
-#include "include/tcb0.h"
-#include "include/tcb1.h"
-#include "include/opamp.h"
-#include "include/adc0.h"
-#include "include/dac0.h"
-#include "include/usart3.h"
-#include "include/vref.h"
-#include "config/clock_config.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void);
-int8_t BOD_Initialize();
-int8_t CLKCTRL_Initialize();
-int8_t SLPCTRL_Initialize();
-int8_t WDT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* MCC_H */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/opamp/opamp.h b/instrumentation-amplifier.X/mcc_generated_files/opamp/opamp.h
new file mode 100644
index 0000000..13d439a
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/opamp/opamp.h
@@ -0,0 +1,179 @@
+/**
+ * OPAMP Generated Driver API Header File
+ *
+ * @file opamp.h
+ *
+ * @defgroup opamp OPAMP
+ *
+ * @brief This file contains API prototypes and other datatypes for the OPAMP module.
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef OPAMP_H_INCLUDED
+#define OPAMP_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+#include
+
+#define OPAMP_TIMEBASE_VALUE (3)
+
+/**
+ * @ingroup opamp
+ * @brief This routine initializes the OPAMP and must be called before any other OPAMP routine is called.
+ * This routine should only be called once during system initialization.
+ * @param void
+ * @return void
+ */
+void OPAMP_Initialize(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine enables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_EnableSystem(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine disables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_DisableSystem(void);
+
+//OP0 Instrumentation Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets the R1 and R2 values of OP0's internal resistor ladder as per user selection
+ * @param value - esired resistor selection. For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP0SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP0's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP0 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP0Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
+
+//OP1 Instrumentation Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP1PositiveInMux(OPAMP_OP1INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP1SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP1's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP1 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP1Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP1's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP1OffsetCalibration(uint8_t calValue);
+
+//OP2 Instrumentation Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets the R1 and R2 values of OP2's internal resistor ladder as per user selection
+ * @param value - desired resistor selection. For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP2WiperResMux(OPAMP_OP2RESMUX_MUXWIP_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP2's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP2SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP2's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if OP2 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP2Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP2's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP2OffsetCalibration(uint8_t calValue);
+
+#endif /* OPAMP_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/opamp.c b/instrumentation-amplifier.X/mcc_generated_files/opamp/src/opamp.c
similarity index 54%
rename from instrumentation-amplifier.X/mcc_generated_files/src/opamp.c
rename to instrumentation-amplifier.X/mcc_generated_files/opamp/src/opamp.c
index 8aa034a..47aa35f 100644
--- a/instrumentation-amplifier.X/mcc_generated_files/src/opamp.c
+++ b/instrumentation-amplifier.X/mcc_generated_files/opamp/src/opamp.c
@@ -1,61 +1,61 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * OPAMP Generated Driver File
+ *
+ * @file opamp.c
+ *
+ * @ingroup opamp
+ *
+ * @brief This is the generated driver implementation file for the OPAMP driver using AVR MCUs
+ *
+ * @version OPAMP Driver Version v1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
-#include "../include/opamp.h"
+#include "../opamp.h"
-void OPAMP_Initialize()
+void OPAMP_Initialize(void)
{
OPAMP_DisableSystem();
- //TIMEBASE 23;
+ //TIMEBASE 3;
OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
//DBGRUN disabled;
- OPAMP.DBGCTRL = 0x00;
+ OPAMP.DBGCTRL = 0x0;
//IRSEL FULL;
- OPAMP.PWRCTRL = 0x00;
+ OPAMP.PWRCTRL = 0x0;
//OP0 Configuration : Instrumentation Amplifier
//Instrumentation Amplifier Gain : 3
- //MUXNEG OUT; MUXPOS VDDDIV2;
+ //MUXNEG OPn output (unity gain); MUXPOS VDD/2;
OPAMP.OP0INMUX = 0x24;
- //MUXWIP WIP2; MUXBOT GND; MUXTOP OUT;
+ //MUXBOT Ground; MUXTOP OPn output; MUXWIP R1 = 12R, R2 = 4R, R2/R1 = 0.33;
OPAMP.OP0RESMUX = 0x55;
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP0CTRLA = 0x05;
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP0CTRLA = 0x5;
//SETTLE 127;
OPAMP.OP0SETTLE = 0x7F;
@@ -63,14 +63,14 @@ void OPAMP_Initialize()
//OP1 Configuration : Instrumentation Amplifier
//Instrumentation Amplifier Gain : 3
- //MUXNEG OUT; MUXPOS DAC;
+ //MUXNEG OPn output (unity gain); MUXPOS DAC output;
OPAMP.OP1INMUX = 0x22;
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP1RESMUX = 0x00;
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP1RESMUX = 0x0;
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP1CTRLA = 0x05;
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP1CTRLA = 0x5;
//SETTLE 127;
OPAMP.OP1SETTLE = 0x7F;
@@ -78,14 +78,14 @@ void OPAMP_Initialize()
//OP2 Configuration : Instrumentation Amplifier
//Instrumentation Amplifier Gain : 3
- //MUXNEG WIP; MUXPOS LINKWIP;
+ //MUXNEG Wiper from OPn's resistor ladder; MUXPOS Wiper from OP0's resistor ladder;
OPAMP.OP2INMUX = 0x16;
- //MUXWIP WIP5; MUXBOT LINKOUT; MUXTOP OUT;
+ //MUXBOT Link OP[n-1] output; MUXTOP OPn output; MUXWIP R1 = 4R, R2 = 12R, R2/R1 = 3;
OPAMP.OP2RESMUX = 0xB1;
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP2CTRLA = 0x05;
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP2CTRLA = 0x5;
//SETTLE 127;
OPAMP.OP2SETTLE = 0x7F;
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/adc0.c b/instrumentation-amplifier.X/mcc_generated_files/src/adc0.c
deleted file mode 100644
index 4cfa481..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/adc0.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/adc0.h"
-
-adc_irq_cb_t ADC0_window_cb = NULL;
-
-/**
- * \brief Initialize ADC interface
- */
-int8_t ADC0_Initialize()
-{
-
- //SAMPNUM ACC8;
- ADC0.CTRLB = 0x03;
-
- //PRESC DIV12;
- ADC0.CTRLC = 0x03;
-
- //INITDLY DLY0; SAMPDLY DLY0;
- ADC0.CTRLD = 0x00;
-
- //WINCM NONE;
- ADC0.CTRLE = 0x00;
-
- //DBGRUN disabled;
- ADC0.DBGCTRL = 0x00;
-
- //STARTEI disabled;
- ADC0.EVCTRL = 0x00;
-
- //WCMP enabled; RESRDY enabled;
- ADC0.INTCTRL = 0x03;
-
- //MUXPOS AIN10;
- ADC0.MUXPOS = 0x0A;
-
- //MUXNEG AIN6;
- ADC0.MUXNEG = 0x06;
-
- //SAMPLEN 0;
- ADC0.SAMPCTRL = 0x00;
-
- // Window comparator high threshold
- ADC0.WINHT = 0x00;
-
- // Window comparator low threshold
- ADC0.WINLT = 0x00;
-
- //RUNSTBY disabled; CONVMODE disabled; LEFTADJ disabled; RESSEL 10BIT; FREERUN disabled; ENABLE enabled;
- ADC0.CTRLA = 0x05;
-
-
- return 0;
-}
-
-void ADC0_Enable()
-{
- ADC0.CTRLA |= ADC_ENABLE_bm;
-}
-
-void ADC0_Disable()
-{
- ADC0.CTRLA &= ~ADC_ENABLE_bm;
-}
-
-void ADC0_EnableAutoTrigger()
-{
- ADC0.EVCTRL |= ADC_STARTEI_bm;
-}
-
-void ADC0_DisableAutoTrigger()
-{
- ADC0.EVCTRL &= ~ADC_STARTEI_bm;
-}
-
-void ADC0_SetWindowHigh(adc_result_t high)
-{
- ADC0.WINHT = high;
-}
-
-void ADC0_SetWindowLow(adc_result_t low)
-{
- ADC0.WINLT = low;
-}
-
-void ADC0_SetWindowMode(adc0_window_mode_t mode)
-{
- ADC0.CTRLE = mode;
-}
-
-void ADC0_SetWindowChannel(adc_0_channel_t channel)
-{
- ADC0.MUXPOS = channel;
-}
-
-void ADC0_StartConversion(adc_0_channel_t channel)
-{
- ADC0.CTRLA &= ~ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- ADC0.CTRLA |= ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.MUXNEG = channel1;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StopConversion()
-{
- ADC0.COMMAND = ADC_SPCONV_bm;
-}
-
-bool ADC0_IsConversionDone()
-{
- return (ADC0.INTFLAGS & ADC_RESRDY_bm);
-}
-
-adc_result_t ADC0_GetConversionResult(void)
-{
- return (ADC0.RES);
-}
-
-bool ADC0_GetWindowResult(void)
-{
- bool temp = (ADC0.INTFLAGS & ADC_WCMP_bm);
- ADC0.INTFLAGS = ADC_WCMP_bm; // Clear intflag if set
- return temp;
-}
-
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel)
-{
- adc_result_t res;
-
- ADC0_StartConversion(channel);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
- return res;
-}
-
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- diff_adc_result_t res;
-
- ADC0_StartDiffConversion(channel, channel1);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS |= ADC_RESRDY_bm;
- return res;
-}
-
-uint8_t ADC0_GetResolution()
-{
- return (ADC0.CTRLA & ADC_RESSEL0_bm) ? 10 : 12;
-}
-
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f)
-{
- ADC0_window_cb = f;
-}
-
-ISR(ADC0_WCMP_vect)
-{
-
- if (ADC0_window_cb != NULL) {
- ADC0_window_cb();
- }
-
- // Clear the interrupt flag
- ADC0.INTFLAGS = ADC_WCMP_bm;
-}
-
-//ISR(ADC0_RESRDY_vect)
-//{
-// /* Insert your ADC result ready interrupt handling code here */
-//
-// /* The interrupt flag has to be cleared manually */
-// ADC0.INTFLAGS = ADC_RESRDY_bm;
-//}
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/cpuint.c b/instrumentation-amplifier.X/mcc_generated_files/src/cpuint.c
deleted file mode 100644
index ea41199..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/cpuint.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/cpuint.h"
-
-/**
- * \brief Initialize cpuint interface
- */
-int8_t CPUINT_Initialize()
-{
- /* IVSEL and CVT are Configuration Change Protected */
-
- //IVSEL disabled; CVT disabled; LVL0RR disabled;
- ccp_write_io((void*)&(CPUINT.CTRLA),0x00);
-
- //LVL0PRI 0;
- CPUINT.LVL0PRI = 0x00;
-
- //LVL1VEC 0;
- CPUINT.LVL1VEC = 0x00;
-
- ENABLE_INTERRUPTS();
-
- return 0;
-}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/dac0.c b/instrumentation-amplifier.X/mcc_generated_files/src/dac0.c
deleted file mode 100644
index 1aba646..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/dac0.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-
-#include "../include/dac0.h"
-/**
- * \brief Initialize DAC interface
- */
-int8_t DAC0_Initialize()
-{
- //RUNSTDBY disabled; OUTEN enabled; ENABLE enabled;
- DAC0.CTRLA = 0x41;
-
- //DATA 0;
- DAC0.DATA = 0x00;
-
- return 0;
-}
-
-void DAC0_Enable()
-{
- DAC0.CTRLA |= DAC_ENABLE_bm;
-}
-
-void DAC0_Disable()
-{
- DAC0.CTRLA &= ~DAC_ENABLE_bm;
-}
-
-void DAC0_SetOutput(dac_resolution_t value)
-{
- value = value << DAC_DATA_gp;
- value = value & 0xFFC0;
- DAC0.DATA = value;
-}
-
-uint8_t DAC0_GetResolution()
-{
- return 10;
-}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/pin_manager.c b/instrumentation-amplifier.X/mcc_generated_files/src/pin_manager.c
deleted file mode 100644
index afbdc5e..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/pin_manager.c
+++ /dev/null
@@ -1,317 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/pin_manager.h"
-static void (*PORTB_LED0_InterruptHandler)(void);
-static void (*PORTD_PD5_InterruptHandler)(void);
-static void (*PORTA_PA2_InterruptHandler)(void);
-static void (*PORTA_PA3_InterruptHandler)(void);
-static void (*PORTD_PD6_InterruptHandler)(void);
-static void (*PORTE_PE2_InterruptHandler)(void);
-static void (*PORTB_PB1_InterruptHandler)(void);
-static void (*PORTB_PB0_InterruptHandler)(void);
-static void (*PORTD_PD2_InterruptHandler)(void);
-
-void PORT_Initialize(void);
-
-void PIN_MANAGER_Initialize()
-{
- PORT_Initialize();
-
- /* DIR Registers Initialization */
- PORTA.DIR = 0x0C;
- PORTB.DIR = 0x09;
- PORTC.DIR = 0x00;
- PORTD.DIR = 0x64;
- PORTE.DIR = 0x04;
- PORTF.DIR = 0x00;
-
- /* OUT Registers Initialization */
- PORTA.OUT = 0x00;
- PORTB.OUT = 0x00;
- PORTC.OUT = 0x00;
- PORTD.OUT = 0x00;
- PORTE.OUT = 0x00;
- PORTF.OUT = 0x00;
-
- /* PINxCTRL registers Initialization */
- PORTA.PIN0CTRL = 0x00;
- PORTA.PIN1CTRL = 0x00;
- PORTA.PIN2CTRL = 0x00;
- PORTA.PIN3CTRL = 0x00;
- PORTA.PIN4CTRL = 0x00;
- PORTA.PIN5CTRL = 0x00;
- PORTA.PIN6CTRL = 0x00;
- PORTA.PIN7CTRL = 0x00;
- PORTB.PIN0CTRL = 0x00;
- PORTB.PIN1CTRL = 0x00;
- PORTB.PIN2CTRL = 0x00;
- PORTB.PIN3CTRL = 0x00;
- PORTB.PIN4CTRL = 0x00;
- PORTB.PIN5CTRL = 0x00;
- PORTB.PIN6CTRL = 0x00;
- PORTB.PIN7CTRL = 0x00;
- PORTC.PIN0CTRL = 0x00;
- PORTC.PIN1CTRL = 0x00;
- PORTC.PIN2CTRL = 0x00;
- PORTC.PIN3CTRL = 0x00;
- PORTC.PIN4CTRL = 0x00;
- PORTC.PIN5CTRL = 0x00;
- PORTC.PIN6CTRL = 0x00;
- PORTC.PIN7CTRL = 0x00;
- PORTD.PIN0CTRL = 0x00;
- PORTD.PIN1CTRL = 0x04;
- PORTD.PIN2CTRL = 0x04;
- PORTD.PIN3CTRL = 0x04;
- PORTD.PIN4CTRL = 0x04;
- PORTD.PIN5CTRL = 0x04;
- PORTD.PIN6CTRL = 0x04;
- PORTD.PIN7CTRL = 0x04;
- PORTE.PIN0CTRL = 0x00;
- PORTE.PIN1CTRL = 0x04;
- PORTE.PIN2CTRL = 0x04;
- PORTE.PIN3CTRL = 0x04;
- PORTE.PIN4CTRL = 0x00;
- PORTE.PIN5CTRL = 0x00;
- PORTE.PIN6CTRL = 0x00;
- PORTE.PIN7CTRL = 0x00;
- PORTF.PIN0CTRL = 0x00;
- PORTF.PIN1CTRL = 0x00;
- PORTF.PIN2CTRL = 0x00;
- PORTF.PIN3CTRL = 0x00;
- PORTF.PIN4CTRL = 0x00;
- PORTF.PIN5CTRL = 0x00;
- PORTF.PIN6CTRL = 0x00;
- PORTF.PIN7CTRL = 0x00;
-
- /* Multi-pin Config registers Initialization */
- PORTA.PINCONFIG = 0x00;
- PORTA.PINCTRLCLR = 0x00;
- PORTA.PINCTRLSET = 0x00;
- PORTA.PINCTRLUPD = 0x00;
- PORTB.PINCONFIG = 0x00;
- PORTB.PINCTRLCLR = 0x00;
- PORTB.PINCTRLSET = 0x00;
- PORTB.PINCTRLUPD = 0x00;
- PORTC.PINCONFIG = 0x00;
- PORTC.PINCTRLCLR = 0x00;
- PORTC.PINCTRLSET = 0x00;
- PORTC.PINCTRLUPD = 0x00;
- PORTD.PINCONFIG = 0x00;
- PORTD.PINCTRLCLR = 0x00;
- PORTD.PINCTRLSET = 0x00;
- PORTD.PINCTRLUPD = 0x00;
- PORTE.PINCONFIG = 0x00;
- PORTE.PINCTRLCLR = 0x00;
- PORTE.PINCTRLSET = 0x00;
- PORTE.PINCTRLUPD = 0x00;
- PORTF.PINCONFIG = 0x00;
- PORTF.PINCTRLCLR = 0x00;
- PORTF.PINCTRLSET = 0x00;
- PORTF.PINCTRLUPD = 0x00;
-
- /* PORTMUX Initialization */
- PORTMUX.ACROUTEA = 0x00;
- PORTMUX.CCLROUTEA = 0x00;
- PORTMUX.EVSYSROUTEA = 0x00;
- PORTMUX.SPIROUTEA = 0x00;
- PORTMUX.TCAROUTEA = 0x00;
- PORTMUX.TCBROUTEA = 0x00;
- PORTMUX.TCDROUTEA = 0x00;
- PORTMUX.TWIROUTEA = 0x00;
- PORTMUX.USARTROUTEA = 0x00;
- PORTMUX.USARTROUTEB = 0x00;
- PORTMUX.ZCDROUTEA = 0x00;
-
- // register default ISC callback functions at runtime; use these methods to register a custom function
- PORTB_LED0_SetInterruptHandler(PORTB_LED0_DefaultInterruptHandler);
- PORTD_PD5_SetInterruptHandler(PORTD_PD5_DefaultInterruptHandler);
- PORTA_PA2_SetInterruptHandler(PORTA_PA2_DefaultInterruptHandler);
- PORTA_PA3_SetInterruptHandler(PORTA_PA3_DefaultInterruptHandler);
- PORTD_PD6_SetInterruptHandler(PORTD_PD6_DefaultInterruptHandler);
- PORTE_PE2_SetInterruptHandler(PORTE_PE2_DefaultInterruptHandler);
- PORTB_PB1_SetInterruptHandler(PORTB_PB1_DefaultInterruptHandler);
- PORTB_PB0_SetInterruptHandler(PORTB_PB0_DefaultInterruptHandler);
- PORTD_PD2_SetInterruptHandler(PORTD_PD2_DefaultInterruptHandler);
-}
-
-void PORT_Initialize(void)
-{
- /* On AVR devices all peripherals are enable from power on reset, this
- * disables all peripherals to save power. Driver shall enable
- * peripheral if used */
-
- /* Set all pins to low power mode */
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
-}
-
-/**
- Allows selecting an interrupt handler for PORTB_LED0 at application runtime
-*/
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_LED0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_LED0_DefaultInterruptHandler(void)
-{
- // add your PORTB_LED0 interrupt custom code
- // or set custom function using PORTB_LED0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD5 at application runtime
-*/
-void PORTD_PD5_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD5_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD5_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD5 interrupt custom code
- // or set custom function using PORTD_PD5_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA2 at application runtime
-*/
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA2_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA2_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA2 interrupt custom code
- // or set custom function using PORTA_PA2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA3 at application runtime
-*/
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA3_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA3_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA3 interrupt custom code
- // or set custom function using PORTA_PA3_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD6 at application runtime
-*/
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD6_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD6_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD6 interrupt custom code
- // or set custom function using PORTD_PD6_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTE_PE2 at application runtime
-*/
-void PORTE_PE2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTE_PE2_InterruptHandler = interruptHandler;
-}
-
-void PORTE_PE2_DefaultInterruptHandler(void)
-{
- // add your PORTE_PE2 interrupt custom code
- // or set custom function using PORTE_PE2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB1 at application runtime
-*/
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB1_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB1_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB1 interrupt custom code
- // or set custom function using PORTB_PB1_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB0 at application runtime
-*/
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB0_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB0 interrupt custom code
- // or set custom function using PORTB_PB0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD2 at application runtime
-*/
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD2_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD2_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD2 interrupt custom code
- // or set custom function using PORTD_PD2_SetInterruptHandler()
-}
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/rtc.c b/instrumentation-amplifier.X/mcc_generated_files/src/rtc.c
deleted file mode 100644
index 11771a9..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/rtc.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/rtc.h"
-
-/**
- * \brief Initialize rtc interface
- *
- * \return Initialization status.
- */
-
-void (*RTC_OVF_isr_cb)(void) = NULL;
-void (*RTC_CMP_isr_cb)(void) = NULL;
-void (*RTC_PIT_isr_cb)(void) = NULL;
-
-/**
- * \brief Initialize RTC interface
- */
-int8_t RTC_Initialize()
-{
- while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
- }
- //Compare
- RTC.CMP = 0x00;
-
- //Count
- RTC.CNT = 0x00;
-
- //Period
- RTC.PER = 0x3FF;
-
- //Clock selection
- RTC.CLKSEL = 0x00;
-
- //CMP disabled; OVF enabled;
- RTC.INTCTRL = 0x01;
-
- //RUNSTDBY disabled; PRESCALER DIV32; CORREN disabled; RTCEN enabled;
- RTC.CTRLA = 0x29;
-
- while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
- }
- //PI disabled;
- RTC.PITINTCTRL = 0x00;
-
-
- return 0;
-}
-
-void RTC_SetOVFIsrCallback(RTC_cb_t cb)
-{
- RTC_OVF_isr_cb = cb;
-}
-
-void RTC_SetCMPIsrCallback(RTC_cb_t cb)
-{
- RTC_CMP_isr_cb = cb;
-}
-
-void RTC_SetPITIsrCallback(RTC_cb_t cb)
-{
- RTC_PIT_isr_cb = cb;
-}
-
-ISR(RTC_CNT_vect)
-{
- if (RTC.INTFLAGS & RTC_OVF_bm )
- {
- if (RTC_OVF_isr_cb != NULL)
- {
- (*RTC_OVF_isr_cb)();
- }
- }
-
- if (RTC.INTFLAGS & RTC_CMP_bm )
- {
- if (RTC_CMP_isr_cb != NULL)
- {
- (*RTC_CMP_isr_cb)();
- }
- }
- RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
-}
-
-ISR(RTC_PIT_vect)
-{
- if (RTC_PIT_isr_cb != NULL)
- {
- (*RTC_PIT_isr_cb)();
- }
- RTC.PITINTFLAGS = RTC_PI_bm;
-}
-
-inline void RTC_WriteCounter(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_CNTBUSY_bm);
- RTC.CNT = timerVal;
-}
-
-inline uint16_t RTC_ReadCounter(void)
-{
- return RTC.CNT;
-}
-
-inline void RTC_WritePeroid(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_PERBUSY_bm);
- RTC.PER = timerVal;
-}
-
-inline uint16_t RTC_ReadPeriod(void)
-{
- return RTC.PER;
-}
-
-inline void RTC_EnableCMPInterrupt(void)
-{
- RTC.INTCTRL |= RTC_CMP_bm;
-}
-
-inline void RTC_DisableCMPInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_CMP_bm;
-}
-
-inline void RTC_EnableOVFInterrupt(void)
-{
- RTC.INTCTRL |= RTC_OVF_bm;
-}
-
-inline void RTC_DisableOVFInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_OVF_bm;
-}
-
-inline void RTC_EnablePITInterrupt(void)
-{
- RTC.PITINTCTRL |= RTC_PI_bm;
-}
-
-inline void RTC_DisablePITInterrupt(void)
-{
- RTC.PITINTCTRL &= ~RTC_PI_bm;
-}
-
-inline void RTC_ClearOVFInterruptFlag(void)
-{
- RTC.INTFLAGS &= ~RTC_OVF_bm;
-}
-
-inline bool RTC_IsOVFInterruptEnabled(void)
-{
- return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
-}
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/tcb0.c b/instrumentation-amplifier.X/mcc_generated_files/src/tcb0.c
deleted file mode 100644
index 368d94a..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/tcb0.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb0.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB0_CAPT_isr_cb)(void) = NULL;
-
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb)
-{
- TCB0_CAPT_isr_cb = cb;
-}
-
-ISR(TCB0_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB0.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB0_CAPT_isr_cb != NULL)
- {
- (*TCB0_CAPT_isr_cb)();
- }
-
- TCB0.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB0_Initialize()
-{
- //Compare or Capture
- TCB0.CCMP = 0x284F;
-
- //Count
- TCB0.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB0.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB0.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB0.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB0.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB0.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB0.TEMP = 0x00;
-
- //RUNSTDBY enabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB0.CTRLA = 0x41;
-
- return 0;
-}
-
-void TCB0_WriteTimer(uint16_t timerVal)
-{
- TCB0.CNT=timerVal;
-}
-
-uint16_t TCB0_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB0.CNT;
-
- return readVal;
-}
-
-void TCB0_EnableCaptInterrupt(void)
-{
- TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB0_DisableCaptInterrupt(void)
-{
- TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB0_ClearCaptInterruptFlag(void)
-{
- TCB0.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB0_IsCaptInterruptEnabled(void)
-{
- return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/tcb1.c b/instrumentation-amplifier.X/mcc_generated_files/src/tcb1.c
deleted file mode 100644
index 5146d75..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/tcb1.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb1.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB1_CAPT_isr_cb)(void) = NULL;
-
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb)
-{
- TCB1_CAPT_isr_cb = cb;
-}
-
-ISR(TCB1_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB1.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB1_CAPT_isr_cb != NULL)
- {
- (*TCB1_CAPT_isr_cb)();
- }
-
- TCB1.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB1_Initialize()
-{
- //Compare or Capture
- TCB1.CCMP = 0x752F;
-
- //Count
- TCB1.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB1.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB1.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB1.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB1.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB1.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB1.TEMP = 0x00;
-
- //RUNSTDBY disabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB1.CTRLA = 0x01;
-
- return 0;
-}
-
-void TCB1_WriteTimer(uint16_t timerVal)
-{
- TCB1.CNT=timerVal;
-}
-
-uint16_t TCB1_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB1.CNT;
-
- return readVal;
-}
-
-void TCB1_EnableCaptInterrupt(void)
-{
- TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB1_DisableCaptInterrupt(void)
-{
- TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB1_ClearCaptInterruptFlag(void)
-{
- TCB1.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB1_IsCaptInterruptEnabled(void)
-{
- return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/usart3.c b/instrumentation-amplifier.X/mcc_generated_files/src/usart3.c
deleted file mode 100644
index 908fe38..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/usart3.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/usart3.h"
-
-#if defined(__GNUC__)
-
-int USART3_printCHAR(char character, FILE *stream)
-{
- USART3_Write(character);
- return 0;
-}
-
-FILE USART3_stream = FDEV_SETUP_STREAM(USART3_printCHAR, NULL, _FDEV_SETUP_WRITE);
-
-#elif defined(__ICCAVR__)
-
-int putchar(int outChar)
-{
- USART3_Write(outChar);
- return outChar;
-}
-#endif
-
-/* Static Variables holding the ringbuffer used in IRQ mode */
-static uint8_t USART3_rxbuf[USART3_RX_BUFFER_SIZE];
-static volatile uint8_t USART3_rx_head;
-static volatile uint8_t USART3_rx_tail;
-static volatile uint8_t USART3_rx_elements;
-static uint8_t USART3_txbuf[USART3_TX_BUFFER_SIZE];
-static volatile uint8_t USART3_tx_head;
-static volatile uint8_t USART3_tx_tail;
-static volatile uint8_t USART3_tx_elements;
-
-void (*USART3_rx_isr_cb)(void) = &USART3_DefaultRxIsrCb;
-
-void (*USART3_tx_isr_cb)(void) = &USART3_DefaultTxIsrCb;
-
-void USART3_DefaultRxIsrCb(void)
-{
- uint8_t data;
- uint8_t tmphead;
-
- /* Read the received data */
- data = USART3.RXDATAL;
- /* Calculate buffer index */
- tmphead = (USART3_rx_head + 1) & USART3_RX_BUFFER_MASK;
-
- if (tmphead == USART3_rx_tail) {
- /* ERROR! Receive buffer overflow */
- }else {
- /*Store new index*/
- USART3_rx_head = tmphead;
-
- /* Store received data in buffer */
- USART3_rxbuf[tmphead] = data;
- USART3_rx_elements++;
- }
-}
-
-void USART3_DefaultTxIsrCb(void)
-{
- uint8_t tmptail;
-
- /* Check if all data is transmitted */
- if (USART3_tx_elements != 0) {
- /* Calculate buffer index */
- tmptail = (USART3_tx_tail + 1) & USART3_TX_BUFFER_MASK;
- /* Store new index */
- USART3_tx_tail = tmptail;
- /* Start transmission */
- USART3.TXDATAL = USART3_txbuf[tmptail];
-
- USART3_tx_elements--;
- }
-
- if (USART3_tx_elements == 0) {
- /* Disable Tx interrupt */
- USART3.CTRLA &= ~(1 << USART_DREIE_bp);
- }
-}
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type)
-{
- switch (type) {
- case USART3_RX_CB:
- USART3_rx_isr_cb = cb;
- break;
- case USART3_TX_CB:
- USART3_tx_isr_cb = cb;
- break;
- default:
- // do nothing
- break;
- }
-}
-
-void USART3_SetRXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_RX_CB);
-}
-
-void USART3_SetTXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_TX_CB);
-}
-
-/* Interrupt service routine for RX complete */
-ISR(USART3_RXC_vect)
-{
- if (USART3_rx_isr_cb != NULL)
- {
- (*USART3_rx_isr_cb)();
- }
-}
-
-/* Interrupt service routine for Data Register Empty */
-ISR(USART3_DRE_vect)
-{
- if (USART3_tx_isr_cb != NULL)
- {
- (*USART3_tx_isr_cb)();
- }
-}
-
-ISR(USART3_TXC_vect)
-{
- USART3.STATUS |= USART_TXCIF_bm;
-}
-
-bool USART3_IsTxReady()
-{
- return (USART3_tx_elements != USART3_TX_BUFFER_SIZE);
-}
-
-bool USART3_IsRxReady()
-{
- return (USART3_rx_elements != 0);
-}
-
-bool USART3_IsTxBusy()
-{
- return (!(USART3.STATUS & USART_TXCIF_bm));
-}
-
-bool USART3_IsTxDone()
-{
- return (USART3.STATUS & USART_TXCIF_bm);
-}
-
-uint8_t USART3_Read(void)
-{
- uint8_t tmptail;
-
- /* Wait for incoming data */
- while (USART3_rx_elements == 0)
- ;
- /* Calculate buffer index */
- tmptail = (USART3_rx_tail + 1) & USART3_RX_BUFFER_MASK;
- /* Store new index */
- USART3_rx_tail = tmptail;
- ENTER_CRITICAL(R);
- USART3_rx_elements--;
- EXIT_CRITICAL(R);
-
- /* Return data */
- return USART3_rxbuf[tmptail];
-}
-
-void USART3_Write(const uint8_t data)
-{
- uint8_t tmphead;
-
- /* Calculate buffer index */
- tmphead = (USART3_tx_head + 1) & USART3_TX_BUFFER_MASK;
- /* Wait for free space in buffer */
- while (USART3_tx_elements == USART3_TX_BUFFER_SIZE)
- ;
- /* Store data in buffer */
- USART3_txbuf[tmphead] = data;
- /* Store new index */
- USART3_tx_head = tmphead;
- ENTER_CRITICAL(W);
- USART3_tx_elements++;
- EXIT_CRITICAL(W);
- /* Enable Tx interrupt */
- USART3.CTRLA |= (1 << USART_DREIE_bp);
-}
-
-void USART3_Initialize()
-{
- //set baud rate register
- USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
-
- //RXCIE disabled; TXCIE disabled; DREIE enabled; RXSIE disabled; LBME disabled; ABEIE disabled; RS485 DISABLE;
- USART3.CTRLA = 0x20;
-
- //RXEN disabled; TXEN enabled; SFDEN disabled; ODME disabled; RXMODE NORMAL; MPCM disabled;
- USART3.CTRLB = 0x40;
-
- //CMODE ASYNCHRONOUS; PMODE DISABLED; SBMODE 1BIT; CHSIZE 8BIT; UDORD disabled; UCPHA disabled;
- USART3.CTRLC = 0x03;
-
- //DBGCTRL_DBGRUN
- USART3.DBGCTRL = 0x00;
-
- //EVCTRL_IREI
- USART3.EVCTRL = 0x00;
-
- //RXPLCTRL_RXPL
- USART3.RXPLCTRL = 0x00;
-
- //TXPLCTRL_TXPL
- USART3.TXPLCTRL = 0x00;
-
-
- uint8_t x;
-
- /* Initialize ringbuffers */
- x = 0;
-
- USART3_rx_tail = x;
- USART3_rx_head = x;
- USART3_rx_elements = x;
- USART3_tx_tail = x;
- USART3_tx_head = x;
- USART3_tx_elements = x;
-
-#if defined(__GNUC__)
- stdout = &USART3_stream;
-#endif
-
-}
-
-void USART3_Enable()
-{
- USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
-}
-
-void USART3_EnableRx()
-{
- USART3.CTRLB |= USART_RXEN_bm;
-}
-
-void USART3_EnableTx()
-{
- USART3.CTRLB |= USART_TXEN_bm;
-}
-
-void USART3_Disable()
-{
- USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
-}
-
-uint8_t USART3_GetData()
-{
- return USART3.RXDATAL;
-}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/vref.c b/instrumentation-amplifier.X/mcc_generated_files/src/vref.c
deleted file mode 100644
index fdbf6e7..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/src/vref.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/vref.h"
-
-int8_t VREF_Initialize()
-{
- //ALWAYSON disabled; REFSEL 1V024;
- VREF.ACREF = 0x00;
-
- //ALWAYSON enabled; REFSEL VDD;
- VREF.ADC0REF = 0x85;
-
- //ALWAYSON enabled; REFSEL 2V048;
- VREF.DAC0REF = 0x81;
-
- return 0;
-}
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/ccp.h b/instrumentation-amplifier.X/mcc_generated_files/system/ccp.h
new file mode 100644
index 0000000..9fb8a16
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/ccp.h
@@ -0,0 +1,72 @@
+/**
+ * CCP Header File
+ *
+ * @file ccp.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the Configuration Change Protection (CCP) header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CPU_CCP_H
+#define CPU_CCP_H
+
+#include "../system/utils/compiler.h"
+#include "../system/protected_io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Writes to a CCP-protected 8-bit I/O register.
+ * @param addr Address of the I/O register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_io(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_IOREG_gc, value);
+}
+
+/**
+ * @brief Writes to a CCP-protected 8-bit SPM register.
+ * @param addr Address of the SPM register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impacton calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_spm(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_SPM_gc, value);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CPU_CCP_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/clock.h b/instrumentation-amplifier.X/mcc_generated_files/system/clock.h
new file mode 100644
index 0000000..c769897
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/clock.h
@@ -0,0 +1,70 @@
+
+/**
+ * CLKCTRL Generated Driver API Header File
+ *
+ * @file clkctrl.h
+ *
+ * @defgroup clkctrl CLKCTRL
+ *
+ * @brief This header file provides APIs for the CLKCTRL driver.
+ *
+ * @version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CLOCK_H
+#define CLOCK_H
+
+#ifndef F_CPU
+#define F_CPU 4000000UL
+#endif
+
+#include "ccp.h"
+
+/**
+ * @ingroup clkctrl
+ * @brief Initializes the CLKCTRL module.
+ * @param None.
+ * @return None.
+ */
+void CLOCK_Initialize(void);
+
+/**
+ * @ingroup clkctrl
+ * @brief Enables the Clock Failure Detection on the main clock.
+ * @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
+ * @return None.
+ */
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);
+
+/**
+ * @ingroup clkctrl
+ * @brief Disables the Clock Failure Detection on the main clock.
+ * @param None.
+ * @return None.
+ */
+void CFD_Disable(void);
+
+#endif // CLOCK_H
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/config_bits.h b/instrumentation-amplifier.X/mcc_generated_files/system/config_bits.h
new file mode 100644
index 0000000..4a4e1b6
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/config_bits.h
@@ -0,0 +1,44 @@
+/**
+ * CONFIGURATION BITS Generated Driver Header File
+ *
+ * @file config_bits.h
+ *
+ * @defgroup config_bitsdriver CONFIGBITS Driver
+ *
+ * @brief This file contains the API Prototypes for the Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef CONFIG_BITS_H
+#define CONFIG_BITS_H
+
+#include "../system/clock.h"
+
+#endif //CONFIG_BITS_H
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/interrupt.h b/instrumentation-amplifier.X/mcc_generated_files/system/interrupt.h
new file mode 100644
index 0000000..d2a9281
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/interrupt.h
@@ -0,0 +1,57 @@
+/**
+ * Interrupt Manager Generated Driver API Header File.
+ *
+ * @file interrupt.h
+ *
+ * @defgroup interrupt INTERRUPT
+ *
+ * @brief This file contains the API prototype for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef INTERRUPT_H
+#define INTERRUPT_H
+
+#include "../system/utils/compiler.h"
+#include "ccp.h"
+#include "../system/utils/atomic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup interrupt
+ * @brief Initializes the Interrupt module.
+ * @retval 0 - Initialization is successful.
+ */
+int8_t CPUINT_Initialize();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INTERRUPT_H */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/pins.h b/instrumentation-amplifier.X/mcc_generated_files/system/pins.h
new file mode 100644
index 0000000..7d6e218
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/pins.h
@@ -0,0 +1,368 @@
+/**
+ * Generated Pins header File
+ *
+ * @file pins.h
+ *
+ * @defgroup pinsdriver Pins Driver
+ *
+ * @brief This is generated driver header for pins.
+ * This header file provides APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PINS_H_INCLUDED
+#define PINS_H_INCLUDED
+
+#include
+#include "./port.h"
+
+//get/set IO_PB0 aliases
+#define IO_PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
+#define IO_PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
+#define IO_PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
+#define IO_PB0_GetValue() (VPORTB.IN & (0x1 << 0))
+#define IO_PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
+#define IO_PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
+#define IO_PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB0_SetInterruptHandler IO_PB0_SetInterruptHandler
+
+//get/set IO_PD2 aliases
+#define IO_PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
+#define IO_PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
+#define IO_PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
+#define IO_PD2_GetValue() (VPORTD.IN & (0x1 << 2))
+#define IO_PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
+#define IO_PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
+#define IO_PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD2_SetInterruptHandler IO_PD2_SetInterruptHandler
+
+//get/set IO_PD5 aliases
+#define IO_PD5_SetHigh() do { PORTD_OUTSET = 0x20; } while(0)
+#define IO_PD5_SetLow() do { PORTD_OUTCLR = 0x20; } while(0)
+#define IO_PD5_Toggle() do { PORTD_OUTTGL = 0x20; } while(0)
+#define IO_PD5_GetValue() (VPORTD.IN & (0x1 << 5))
+#define IO_PD5_SetDigitalInput() do { PORTD_DIRCLR = 0x20; } while(0)
+#define IO_PD5_SetDigitalOutput() do { PORTD_DIRSET = 0x20; } while(0)
+#define IO_PD5_SetPullUp() do { PORTD_PIN5CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD5_ResetPullUp() do { PORTD_PIN5CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD5_SetInverted() do { PORTD_PIN5CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD5_ResetInverted() do { PORTD_PIN5CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD5_DisableInterruptOnChange() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD5_EnableInterruptForBothEdges() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD5_EnableInterruptForRisingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD5_EnableInterruptForFallingEdge() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD5_DisableDigitalInputBuffer() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD5_EnableInterruptForLowLevelSensing() do { PORTD.PIN5CTRL = (PORTD.PIN5CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD5_SetInterruptHandler IO_PD5_SetInterruptHandler
+
+//get/set IO_PE2 aliases
+#define IO_PE2_SetHigh() do { PORTE_OUTSET = 0x4; } while(0)
+#define IO_PE2_SetLow() do { PORTE_OUTCLR = 0x4; } while(0)
+#define IO_PE2_Toggle() do { PORTE_OUTTGL = 0x4; } while(0)
+#define IO_PE2_GetValue() (VPORTE.IN & (0x1 << 2))
+#define IO_PE2_SetDigitalInput() do { PORTE_DIRCLR = 0x4; } while(0)
+#define IO_PE2_SetDigitalOutput() do { PORTE_DIRSET = 0x4; } while(0)
+#define IO_PE2_SetPullUp() do { PORTE_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PE2_ResetPullUp() do { PORTE_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PE2_SetInverted() do { PORTE_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PE2_ResetInverted() do { PORTE_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PE2_DisableInterruptOnChange() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PE2_EnableInterruptForBothEdges() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PE2_EnableInterruptForRisingEdge() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PE2_EnableInterruptForFallingEdge() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PE2_DisableDigitalInputBuffer() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PE2_EnableInterruptForLowLevelSensing() do { PORTE.PIN2CTRL = (PORTE.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PE2_SetInterruptHandler IO_PE2_SetInterruptHandler
+
+//get/set IO_PD6 aliases
+#define IO_PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
+#define IO_PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
+#define IO_PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
+#define IO_PD6_GetValue() (VPORTD.IN & (0x1 << 6))
+#define IO_PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
+#define IO_PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
+#define IO_PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD6_SetInterruptHandler IO_PD6_SetInterruptHandler
+
+//get/set IO_PA3 aliases
+#define IO_PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
+#define IO_PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
+#define IO_PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
+#define IO_PA3_GetValue() (VPORTA.IN & (0x1 << 3))
+#define IO_PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
+#define IO_PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
+#define IO_PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA3_SetInterruptHandler IO_PA3_SetInterruptHandler
+
+//get/set IO_PA2 aliases
+#define IO_PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
+#define IO_PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
+#define IO_PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
+#define IO_PA2_GetValue() (VPORTA.IN & (0x1 << 2))
+#define IO_PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
+#define IO_PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
+#define IO_PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA2_SetInterruptHandler IO_PA2_SetInterruptHandler
+
+//get/set LED0 aliases
+#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
+#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
+#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
+#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
+#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
+#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
+#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB3_SetInterruptHandler LED0_SetInterruptHandler
+
+/**
+ * @ingroup pinsdriver
+ * @brief GPIO and peripheral I/O initialization
+ * @param none
+ * @return none
+ */
+void PIN_MANAGER_Initialize();
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PB0 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PB0_SetInterruptHandler() method.
+ * This handler is called every time the IO_PB0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PB0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PB0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PB0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD5 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD5_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD5 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD5_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD5 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD5 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD5_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PE2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PE2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PE2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PE2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PE2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PE2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PE2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD6 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD6_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD6 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD6_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD6 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD6 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA3 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA3_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA3 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA3_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA3 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA3 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for LED0 pin.
+ * This is a predefined interrupt handler to be used together with the LED0_SetInterruptHandler() method.
+ * This handler is called every time the LED0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void LED0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for LED0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for LED0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+#endif /* PINS_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/port.h b/instrumentation-amplifier.X/mcc_generated_files/system/port.h
new file mode 100644
index 0000000..0272de1
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/port.h
@@ -0,0 +1,1320 @@
+/**
+ * Generated Ports header File
+ *
+ * @file port.h
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This Source file provides APIs.
+ *
+ * @version Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef PORT_INCLUDED
+#define PORT_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "utils/compiler.h"
+
+/* @ingroup pinsdriver
+ * @enum port_pull_mode
+ * Defines the pullup modes.
+ */
+enum port_pull_mode {
+ PORT_PULL_OFF,
+ PORT_PULL_UP,
+};
+
+/* @ingroup pinsdriver
+ * @enum port_dir
+ * Defines the port directions.
+ */
+enum port_dir {
+ PORT_DIR_IN,
+ PORT_DIR_OUT,
+ PORT_DIR_OFF,
+};
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= mask;
+ } else {
+ VPORTA.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= (1 << pin);
+ } else {
+ VPORTA.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTA_toggle_port_level(const uint8_t mask)
+{
+ PORTA.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTA_toggle_pin_level(const uint8_t pin)
+{
+ PORTA.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTA_get_port_level()
+{
+ return VPORTA.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTA_get_pin_level(const uint8_t pin)
+{
+ return VPORTA.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTA_write_port(const uint8_t value)
+{
+ VPORTA.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= mask;
+ } else {
+ VPORTB.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= (1 << pin);
+ } else {
+ VPORTB.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTB_toggle_port_level(const uint8_t mask)
+{
+ PORTB.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTB_toggle_pin_level(const uint8_t pin)
+{
+ PORTB.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTB_get_port_level()
+{
+ return VPORTB.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTB_get_pin_level(const uint8_t pin)
+{
+ return VPORTB.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTB_write_port(const uint8_t value)
+{
+ VPORTB.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= mask;
+ } else {
+ VPORTC.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= (1 << pin);
+ } else {
+ VPORTC.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTC_toggle_port_level(const uint8_t mask)
+{
+ PORTC.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTC_toggle_pin_level(const uint8_t pin)
+{
+ PORTC.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTC_get_port_level()
+{
+ return VPORTC.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTC_get_pin_level(const uint8_t pin)
+{
+ return VPORTC.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTC_write_port(const uint8_t value)
+{
+ VPORTC.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= mask;
+ } else {
+ VPORTD.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= (1 << pin);
+ } else {
+ VPORTD.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTD_toggle_port_level(const uint8_t mask)
+{
+ PORTD.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTD_toggle_pin_level(const uint8_t pin)
+{
+ PORTD.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTD_get_port_level()
+{
+ return VPORTD.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTD_get_pin_level(const uint8_t pin)
+{
+ return VPORTD.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTD_write_port(const uint8_t value)
+{
+ VPORTD.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= mask;
+ } else {
+ VPORTE.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= (1 << pin);
+ } else {
+ VPORTE.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTE_toggle_port_level(const uint8_t mask)
+{
+ PORTE.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTE_toggle_pin_level(const uint8_t pin)
+{
+ PORTE.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTE_get_port_level()
+{
+ return VPORTE.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTE_get_pin_level(const uint8_t pin)
+{
+ return VPORTE.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTE_write_port(const uint8_t value)
+{
+ VPORTE.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= mask;
+ } else {
+ VPORTF.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= (1 << pin);
+ } else {
+ VPORTF.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTF_toggle_port_level(const uint8_t mask)
+{
+ PORTF.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTF_toggle_pin_level(const uint8_t pin)
+{
+ PORTF.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTF_get_port_level()
+{
+ return VPORTF.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTF_get_pin_level(const uint8_t pin)
+{
+ return VPORTF.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTF_write_port(const uint8_t value)
+{
+ VPORTF.OUT = value;
+}
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/protected_io.h b/instrumentation-amplifier.X/mcc_generated_files/system/protected_io.h
new file mode 100644
index 0000000..74e1fb5
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/protected_io.h
@@ -0,0 +1,80 @@
+/**
+ * protected_io Header File
+ *
+ * @file protected_io.h
+ *
+ * @defgroup doc_driver_system_protected_io Protected IO
+ *
+ * @brief This file contains the generated prtected_io header file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
+ *
+ *@{
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PROTECTED_IO_H
+#define PROTECTED_IO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__DOXYGEN__)
+//! \name IAR Memory Model defines.
+//@{
+
+/**
+ * @def CONFIG_MEMORY_MODEL_TINY
+ * @brief Configuration symbol to enable 8 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_TINY
+
+/**
+ * @def CONFIG_MEMORY_MODEL_SMALL
+ * @brief Configuration symbol to enable 16 bit pointers.
+ * NOTE: If no memory model is defined, SMALL is default.
+ */
+#define CONFIG_MEMORY_MODEL_SMALL
+
+/**
+ * @def CONFIG_MEMORY_MODEL_LARGE
+ * @brief Configuration symbol to enable 24 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_LARGE
+
+//@}
+#endif
+
+/**
+ * @brief Writes to an 8-bit I/O register protected by CCP or a protection bit.
+ * @param addr Address of the I/O register.
+ * @param magic CCP magic value or Mask for protection bit.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
+
+/** @} */
+
+#endif /* PROTECTED_IO_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/src/clock.c b/instrumentation-amplifier.X/mcc_generated_files/system/src/clock.c
new file mode 100644
index 0000000..f0a30a7
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/clock.c
@@ -0,0 +1,104 @@
+
+
+/**
+ * CLKCTRL Generated Driver File
+ *
+ * @file clkctrl.c
+ *
+ * @ingroup clkctrl
+ *
+ * @brief This file contains the driver code for CLKCTRL module.
+ *
+ * version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../clock.h"
+
+void CLOCK_Initialize(void)
+{
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),(0 << CLKCTRL_CLKOUT_bp) // CLKOUT disabled
+ | CLKCTRL_CLKSEL_OSCHF_gc // CLKSEL Internal high-frequency oscillator
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc // PDIV 6X
+ | (0 << CLKCTRL_PEN_bp) // PEN disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),(0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),(0 << CLKCTRL_AUTOTUNE_bp) // AUTOTUNE disabled
+ | CLKCTRL_FRQSEL_4M_gc // FRQSEL 4 MHz system clock (default)
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFTUNE),0x0 // TUNE 0x0
+ );
+ ccp_write_io((void*)&(CLKCTRL.PLLCTRLA),CLKCTRL_MULFAC_DISABLE_gc // MULFAC PLL is disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | CLKCTRL_SOURCE_OSCHF_gc // SOURCE OSCHF
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc // CSUT 1k cycles
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | (0 << CLKCTRL_LPMODE_bp) // LPMODE disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << CLKCTRL_SEL_bp) // SEL disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),(0 << CLKCTRL_CFDEN_bp) // CFDEN disabled
+ | CLKCTRL_CFDSRC_CLKMAIN_gc // CFDSRC CLKMAIN
+ | (0 << CLKCTRL_CFDTST_bp) // CFDTST disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ | CLKCTRL_INTTYPE_INT_gc // INTTYPE INT
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTFLAGS),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSCHFCTRLA),CLKCTRL_CSUTHF_256_gc // CSUTHF 256
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | CLKCTRL_FRQRANGE_8M_gc // FRQRANGE 8M
+ | (0 << CLKCTRL_RUNSTBY_bp) // RUNSTBY disabled
+ | CLKCTRL_SELHF_XTAL_gc // SELHF XTAL
+ );
+
+ // System clock stability check by polling the status register.
+ while(!(CLKCTRL.MCLKSTATUS & CLKCTRL_OSCHFS_bm))
+ {
+ }
+
+}
+
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source)
+{
+ /* Enable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, cfd_source | CLKCTRL_CFDEN_bm);
+}
+
+void CFD_Disable(void)
+{
+ /* Disable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, CLKCTRL.MCLKCTRLC & ~CLKCTRL_CFDEN_bm);
+}
+
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/src/config_bits.c b/instrumentation-amplifier.X/mcc_generated_files/system/src/config_bits.c
new file mode 100644
index 0000000..f785fe7
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/config_bits.c
@@ -0,0 +1,49 @@
+/**
+ * CONFIGURATION BITS Generated Driver Source File
+ *
+ * @file config_bits.c
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the API implementation for the Device Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include
+
+/**
+ * Configures the Fuse bits.
+ */
+FUSES =
+{
+ .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
+ .BOOTSIZE = 0x0,
+ .CODESIZE = 0x0,
+ .OSCCFG = CLKSEL_OSCHF_gc,
+ .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
+ .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
+ .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
+};
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/src/interrupt.c b/instrumentation-amplifier.X/mcc_generated_files/system/src/interrupt.c
new file mode 100644
index 0000000..f5169f3
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/interrupt.c
@@ -0,0 +1,53 @@
+/**
+ * Interrupt Manager Generated Driver File.
+ *
+ * @file interrupt.c
+ *
+ * @ingroup interrupt
+ *
+ * @brief This file contains the API implementation for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../interrupt.h"
+
+int8_t CPUINT_Initialize()
+{
+ /* IVSEL and CVT are Configuration Change Protected */
+
+ //CVT disabled; IVSEL disabled; LVL0RR disabled;
+ ccp_write_io((void*)&(CPUINT.CTRLA),0x0);
+
+ //LVL0PRI 0;
+ CPUINT.LVL0PRI = 0x0;
+
+ //LVL1VEC 0;
+ CPUINT.LVL1VEC = 0x0;
+
+ ENABLE_INTERRUPTS();
+
+ return 0;
+}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/src/pins.c b/instrumentation-amplifier.X/mcc_generated_files/system/src/pins.c
new file mode 100644
index 0000000..036d165
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/pins.c
@@ -0,0 +1,317 @@
+/**
+ * Generated Driver File
+ *
+ * @file pins.c
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This is generated driver implementation for pins.
+ * This file provides implementations for pin APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../pins.h"
+
+static void (*IO_PB0_InterruptHandler)(void);
+static void (*IO_PD2_InterruptHandler)(void);
+static void (*IO_PD5_InterruptHandler)(void);
+static void (*IO_PE2_InterruptHandler)(void);
+static void (*IO_PD6_InterruptHandler)(void);
+static void (*IO_PA3_InterruptHandler)(void);
+static void (*IO_PA2_InterruptHandler)(void);
+static void (*LED0_InterruptHandler)(void);
+
+void PIN_MANAGER_Initialize()
+{
+
+ /* OUT Registers Initialization */
+ PORTA.OUT = 0x0;
+ PORTB.OUT = 0x1;
+ PORTC.OUT = 0x0;
+ PORTD.OUT = 0x0;
+ PORTE.OUT = 0x0;
+ PORTF.OUT = 0x0;
+
+ /* DIR Registers Initialization */
+ PORTA.DIR = 0xC;
+ PORTB.DIR = 0x9;
+ PORTC.DIR = 0x0;
+ PORTD.DIR = 0x40;
+ PORTE.DIR = 0x0;
+ PORTF.DIR = 0x0;
+
+ /* PINxCTRL registers Initialization */
+ PORTA.PIN0CTRL = 0x0;
+ PORTA.PIN1CTRL = 0x0;
+ PORTA.PIN2CTRL = 0x0;
+ PORTA.PIN3CTRL = 0x0;
+ PORTA.PIN4CTRL = 0x0;
+ PORTA.PIN5CTRL = 0x0;
+ PORTA.PIN6CTRL = 0x0;
+ PORTA.PIN7CTRL = 0x0;
+ PORTB.PIN0CTRL = 0x0;
+ PORTB.PIN1CTRL = 0x0;
+ PORTB.PIN2CTRL = 0x0;
+ PORTB.PIN3CTRL = 0x0;
+ PORTB.PIN4CTRL = 0x0;
+ PORTB.PIN5CTRL = 0x0;
+ PORTB.PIN6CTRL = 0x0;
+ PORTB.PIN7CTRL = 0x0;
+ PORTC.PIN0CTRL = 0x0;
+ PORTC.PIN1CTRL = 0x0;
+ PORTC.PIN2CTRL = 0x0;
+ PORTC.PIN3CTRL = 0x0;
+ PORTC.PIN4CTRL = 0x0;
+ PORTC.PIN5CTRL = 0x0;
+ PORTC.PIN6CTRL = 0x0;
+ PORTC.PIN7CTRL = 0x0;
+ PORTD.PIN0CTRL = 0x0;
+ PORTD.PIN1CTRL = 0x0;
+ PORTD.PIN2CTRL = 0x4;
+ PORTD.PIN3CTRL = 0x0;
+ PORTD.PIN4CTRL = 0x0;
+ PORTD.PIN5CTRL = 0x4;
+ PORTD.PIN6CTRL = 0x0;
+ PORTD.PIN7CTRL = 0x0;
+ PORTE.PIN0CTRL = 0x0;
+ PORTE.PIN1CTRL = 0x0;
+ PORTE.PIN2CTRL = 0x4;
+ PORTE.PIN3CTRL = 0x0;
+ PORTE.PIN4CTRL = 0x0;
+ PORTE.PIN5CTRL = 0x0;
+ PORTE.PIN6CTRL = 0x0;
+ PORTE.PIN7CTRL = 0x0;
+ PORTF.PIN0CTRL = 0x0;
+ PORTF.PIN1CTRL = 0x0;
+ PORTF.PIN2CTRL = 0x0;
+ PORTF.PIN3CTRL = 0x0;
+ PORTF.PIN4CTRL = 0x0;
+ PORTF.PIN5CTRL = 0x0;
+ PORTF.PIN6CTRL = 0x0;
+ PORTF.PIN7CTRL = 0x0;
+
+ /* PORTMUX Initialization */
+ PORTMUX.ACROUTEA = 0x0;
+ PORTMUX.CCLROUTEA = 0x0;
+ PORTMUX.EVSYSROUTEA = 0x0;
+ PORTMUX.SPIROUTEA = 0x0;
+ PORTMUX.TCAROUTEA = 0x0;
+ PORTMUX.TCBROUTEA = 0x0;
+ PORTMUX.TCDROUTEA = 0x0;
+ PORTMUX.TWIROUTEA = 0x0;
+ PORTMUX.USARTROUTEA = 0x0;
+ PORTMUX.USARTROUTEB = 0x0;
+ PORTMUX.ZCDROUTEA = 0x0;
+
+ // register default ISC callback functions at runtime; use these methods to register a custom function
+ IO_PB0_SetInterruptHandler(IO_PB0_DefaultInterruptHandler);
+ IO_PD2_SetInterruptHandler(IO_PD2_DefaultInterruptHandler);
+ IO_PD5_SetInterruptHandler(IO_PD5_DefaultInterruptHandler);
+ IO_PE2_SetInterruptHandler(IO_PE2_DefaultInterruptHandler);
+ IO_PD6_SetInterruptHandler(IO_PD6_DefaultInterruptHandler);
+ IO_PA3_SetInterruptHandler(IO_PA3_DefaultInterruptHandler);
+ IO_PA2_SetInterruptHandler(IO_PA2_DefaultInterruptHandler);
+ LED0_SetInterruptHandler(LED0_DefaultInterruptHandler);
+}
+
+/**
+ Allows selecting an interrupt handler for IO_PB0 at application runtime
+*/
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PB0_InterruptHandler = interruptHandler;
+}
+
+void IO_PB0_DefaultInterruptHandler(void)
+{
+ // add your IO_PB0 interrupt custom code
+ // or set custom function using IO_PB0_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD2 at application runtime
+*/
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD2_InterruptHandler = interruptHandler;
+}
+
+void IO_PD2_DefaultInterruptHandler(void)
+{
+ // add your IO_PD2 interrupt custom code
+ // or set custom function using IO_PD2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD5 at application runtime
+*/
+void IO_PD5_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD5_InterruptHandler = interruptHandler;
+}
+
+void IO_PD5_DefaultInterruptHandler(void)
+{
+ // add your IO_PD5 interrupt custom code
+ // or set custom function using IO_PD5_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PE2 at application runtime
+*/
+void IO_PE2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PE2_InterruptHandler = interruptHandler;
+}
+
+void IO_PE2_DefaultInterruptHandler(void)
+{
+ // add your IO_PE2 interrupt custom code
+ // or set custom function using IO_PE2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD6 at application runtime
+*/
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD6_InterruptHandler = interruptHandler;
+}
+
+void IO_PD6_DefaultInterruptHandler(void)
+{
+ // add your IO_PD6 interrupt custom code
+ // or set custom function using IO_PD6_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA3 at application runtime
+*/
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA3_InterruptHandler = interruptHandler;
+}
+
+void IO_PA3_DefaultInterruptHandler(void)
+{
+ // add your IO_PA3 interrupt custom code
+ // or set custom function using IO_PA3_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA2 at application runtime
+*/
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA2_InterruptHandler = interruptHandler;
+}
+
+void IO_PA2_DefaultInterruptHandler(void)
+{
+ // add your IO_PA2 interrupt custom code
+ // or set custom function using IO_PA2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for LED0 at application runtime
+*/
+void LED0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ LED0_InterruptHandler = interruptHandler;
+}
+
+void LED0_DefaultInterruptHandler(void)
+{
+ // add your LED0 interrupt custom code
+ // or set custom function using LED0_SetInterruptHandler()
+}
+ISR(PORTA_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTA.INTFLAGS & PORT_INT3_bm)
+ {
+ IO_PA3_InterruptHandler();
+ }
+ if(VPORTA.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PA2_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTA.INTFLAGS = 0xff;
+}
+
+ISR(PORTB_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTB.INTFLAGS & PORT_INT0_bm)
+ {
+ IO_PB0_InterruptHandler();
+ }
+ if(VPORTB.INTFLAGS & PORT_INT3_bm)
+ {
+ LED0_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTB.INTFLAGS = 0xff;
+}
+
+ISR(PORTC_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTC.INTFLAGS = 0xff;
+}
+
+ISR(PORTD_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTD.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PD2_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT5_bm)
+ {
+ IO_PD5_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT6_bm)
+ {
+ IO_PD6_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTD.INTFLAGS = 0xff;
+}
+
+ISR(PORTE_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTE.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PE2_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTE.INTFLAGS = 0xff;
+}
+
+ISR(PORTF_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTF.INTFLAGS = 0xff;
+}
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/src/protected_io.S b/instrumentation-amplifier.X/mcc_generated_files/system/src/protected_io.S
similarity index 62%
rename from voltage-follower.X/mcc_generated_files/src/protected_io.S
rename to instrumentation-amplifier.X/mcc_generated_files/system/src/protected_io.S
index b93dd68..6aaf66e 100644
--- a/voltage-follower.X/mcc_generated_files/src/protected_io.S
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/protected_io.S
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * protected_io Source Code File
+ *
+ * @file protected_io.S
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated protected_io source code file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/src/system.c b/instrumentation-amplifier.X/mcc_generated_files/system/src/system.c
new file mode 100644
index 0000000..ffdd246
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/src/system.c
@@ -0,0 +1,52 @@
+/**
+ * System Driver Source File
+ *
+ * @file system.c
+ *
+ * @ingroup systemdriver
+ *
+ * @brief This file contains the API implementation for the System driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../system.h"
+
+void SYSTEM_Initialize(void)
+{
+ CLOCK_Initialize();
+ PIN_MANAGER_Initialize();
+ TCB0_Initialize();
+ TCB1_Initialize();
+ ADC0_Initialize();
+ DAC0_Initialize();
+ DataStreamer_Initialize();
+ OPAMP_Initialize();
+ RTC_Initialize();
+ USART3_Initialize();
+ VREF_Initialize();
+ CPUINT_Initialize();
+}
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/system.h b/instrumentation-amplifier.X/mcc_generated_files/system/system.h
new file mode 100644
index 0000000..dba0220
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/system.h
@@ -0,0 +1,71 @@
+/**
+ * System Driver Header File
+ *
+ * @file system.h
+ *
+ * @defgroup systemdriver System Driver
+ *
+ * @brief This file contains the API prototype for the System Driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef MCC_H
+#define MCC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../system/utils/compiler.h"
+#include "config_bits.h"
+#include "../system/pins.h"
+#include "../adc/adc0.h"
+#include "../dac/dac0.h"
+#include "../data_streamer/data_streamer.h"
+#include "../opamp/opamp.h"
+#include "../timer/rtc.h"
+#include "../uart/usart3.h"
+#include "../vref/vref.h"
+#include "../system/interrupt.h"
+#include "../system/clock.h"
+#include "../timer/tcb0.h"
+#include "../timer/tcb1.h"
+/**
+ * @ingroup systemdriver
+ * @brief Initializes the System module. This routine is called only once during system initialization, before calling any other API.
+ * @param None.
+ * @return None.
+*/
+void SYSTEM_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MCC_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler.h
new file mode 100644
index 0000000..0c6484a
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler.h
@@ -0,0 +1,49 @@
+/**
+ * Assembler Header File
+ *
+ * @file assembler.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the assembler header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ASSEMBLER_H_INCLUDED
+#define ASSEMBLER_H_INCLUDED
+
+#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__)
+#error This file may only be included from assembly files
+#endif
+
+#if defined(__ASSEMBLER__)
+#include "assembler/gas.h"
+#include
+#elif defined(__IAR_SYSTEMS_ASM__)
+#include "assembler/iar.h"
+#include
+#endif
+
+#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/differential-amplifier.X/mcc_generated_files/utils/assembler/gas.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
similarity index 67%
rename from differential-amplifier.X/mcc_generated_files/utils/assembler/gas.h
rename to instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
index a164306..871a60a 100644
--- a/differential-amplifier.X/mcc_generated_files/utils/assembler/gas.h
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/gas.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * GAS Header File
+ *
+ * @file gas.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated GAS header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
@@ -50,7 +50,11 @@
.if \is_public
.global \name
.endif
+ #ifdef __XC8
+ .section .text.\name, code
+ #else
.section .text.\name, "ax", @progbits
+ #endif
.type \name, @function
\name :
.endm
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/assembler/iar.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
similarity index 61%
rename from instrumentation-amplifier.X/mcc_generated_files/utils/assembler/iar.h
rename to instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
index 69650d6..c52425f 100644
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/assembler/iar.h
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/assembler/iar.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * IAR Header File
+ *
+ * @file iar.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated IAR header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/atomic.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/atomic.h
new file mode 100644
index 0000000..2f71dc3
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/atomic.h
@@ -0,0 +1,87 @@
+/**
+ * CONFIGURATION BITS Generated Atomic Header File
+ *
+ * @file atomic.h
+ *
+ * @defgroup doc_driver_utils_atomic Atomic memory access and critical sections
+ *
+ * @brief This file contains the atomic memory access and critical sections header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ATOMIC_H
+#define ATOMIC_H
+
+/* clang-format off */
+
+#if defined(__GNUC__) || defined (__DOXYGEN__)
+
+/**
+ * @brief Enters critical region. Saves the contents of the status register, including the Global Interrupt Enable bit, so that it can be restored upon leaving the critical region.
+ * Thereafter, clears the Global Interrupt Enable Bit.This macro takes a parameter P that is unused for the GCC compiler,but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler declares a variable with the name of the parameter forholding the SREG value.
+ * Compilation will fail when the variable declared in the macro is not unique within the scope that the critical region is declared within.
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG.
+ */
+
+#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "in __tmp_reg__, __SREG__" "\n\t" \
+ "cli" "\n\t" \
+ "push __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+/**
+ * @brief Exits a critical region. Restores the contents of the status register, including the Global Interrupt Enable bit, as it was when entering the critical region.
+ * This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler uses this parameter as the name of a variable that holds the SREG value.
+ * The parameter must be identical to the parameter used in the corresponding ENTER_CRITICAL().
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
+ */
+
+#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "pop __tmp_reg__" "\n\t" \
+ "out __SREG__, __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
+#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
+
+#elif defined(__ICCAVR__)
+
+#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
+#define EXIT_CRITICAL(P) __restore_interrupt(P);
+
+#define DISABLE_INTERRUPTS() __disable_interrupt();
+#define ENABLE_INTERRUPTS() __enable_interrupt();
+
+#else
+# error Unsupported compiler.
+#endif
+
+/* clang-format on */
+
+#endif /* ATOMIC_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/compiler.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/compiler.h
new file mode 100644
index 0000000..682900b
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/compiler.h
@@ -0,0 +1,72 @@
+/**
+ * Compiler Header File
+ *
+ * @file compiler.h
+ *
+ * @defgroup doc_driver_utils_compiler Compiler abstraction
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for 8-bit AVR. This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef UTILS_COMPILER_H
+#define UTILS_COMPILER_H
+
+#if defined(__GNUC__)
+#include
+#include
+#if defined(__XC8__)
+#include
+#endif
+#elif defined(__ICCAVR__)
+#define ENABLE_BIT_DEFINITIONS 1
+#include
+#include
+
+#ifndef CCP_IOREG_gc
+#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
+#endif
+#ifndef CCP_SPM_gc
+#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
+#endif
+
+#else
+#error Unsupported compiler.
+#endif
+
+#include
+#include
+#include
+#include
+
+#include "interrupt_avr8.h"
+
+/**
+ * @def UNUSED
+ * @brief Marking \a v as a unused parameter or value.
+ */
+#define UNUSED(v) (void)(v)
+
+#endif /* UTILS_COMPILER_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h
new file mode 100644
index 0000000..99068db
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/interrupt_avr8.h
@@ -0,0 +1,88 @@
+/**
+ * interrupt_avr8 Header File
+ *
+ * @file interrupt_avr8.h
+ *
+ * @defgroup doc_driver_utils_interrupts ISR abstraction
+ *
+ * @brief Interrupt-related functionality.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_INTERRUPT_AVR8_H
+#define UTILS_INTERRUPT_AVR8_H
+
+/**
+ * \weakgroup interrupt_group
+ *
+ * @{
+ */
+
+#ifdef ISR_CUSTOM_H
+#include ISR_CUSTOM_H
+#else
+
+/**
+ * @def ISR
+ * @brief Define service routine for specified interrupt vector.
+ * @code
+ ISR(FOO_vect)
+ {
+ ...
+ }
+ * @endcode
+ *
+ * @param vect Interrupt vector name as found in the device header files.
+ */
+#if defined(__DOXYGEN__)
+#define ISR(vect)
+#elif defined(__GNUC__)
+#include
+#elif defined(__ICCAVR__)
+#define __ISR(x) _Pragma(#x)
+#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
+#endif
+#endif // ISR_CUSTOM_H
+
+#ifdef __GNUC__
+#define cpu_irq_enable() sei()
+#define cpu_irq_disable() cli()
+#else
+#define cpu_irq_enable() __enable_interrupt()
+#define cpu_irq_disable() __disable_interrupt()
+#endif
+
+//! @}
+
+/**
+ * \weakgroup interrupt_deprecated_group
+ * @{
+ */
+// Deprecated definitions.
+#define Enable_global_interrupt() cpu_irq_enable()
+#define Disable_global_interrupt() cpu_irq_disable()
+#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
+//! @}
+
+#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils.h
new file mode 100644
index 0000000..a7b1b42
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils.h
@@ -0,0 +1,52 @@
+/**
+ * utils Header File
+ *
+ * @file system.h
+ *
+ * @defgroup doc_driver_utils AVR Code utility functions
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for AVR.This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.1
+ * \{
+ *
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_H_INCLUDED
+#define UTILS_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Retrieve array size
+ */
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTILS_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils_assert.h b/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils_assert.h
new file mode 100644
index 0000000..b603f51
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/system/utils/utils_assert.h
@@ -0,0 +1,60 @@
+/**
+ * utils_assert Header File
+ *
+ * @file utils_assert.h
+ *
+ * @defgroup doc_driver_utils_assert Functionality for assert
+ *
+ * @brief This file contains the generated utils_assert header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef _ASSERT_H_INCLUDED
+#define _ASSERT_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/**
+ * @brief Assert macro
+ * Macro used to throw asserts. It can be mapped to different function based on debug level.
+ * @param[in] condition A condition to be checked; assert is thrown if the given condition is false.
+ */
+
+#ifdef DEBUG
+#define ASSERT(condition) \
+ if (!(condition)) \
+ while (true) \
+ ;
+#else
+#define ASSERT(condition) ((void)0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ASSERT_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/rtc.h b/instrumentation-amplifier.X/mcc_generated_files/timer/rtc.h
new file mode 100644
index 0000000..10a822f
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/rtc.h
@@ -0,0 +1,193 @@
+/**
+ * RTC Generated Driver API Header File.
+ *
+ * @file rtc.h
+ *
+ * @defgroup rtc RTC
+ *
+ * @brief This file contains the API prototypes of the RTC driver.
+ *
+ * @version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef RTCDRIVER_H
+#define RTCDRIVER_H
+
+#include "../system/utils/compiler.h"
+#include
+#include
+
+/**
+ * @ingroup rtc
+ * @typedef void RTC_cb_t
+ * @brief Function pointer to callback function called by the RTC. The default value is set to NULL which means that no callback function will be used.
+ */
+typedef void (*RTC_cb_t)(void);
+/**
+ * @ingroup rtc
+ * @brief Interrupt Service Routine (ISR) callback function to be called if Overflow (OVF) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on Overflow event.
+ * @return None.
+ */
+void RTC_SetOVFIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if Compare (CMP) match Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on compare match event.
+ * @return None.
+ */
+void RTC_SetCMPIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if the Periodic Interrupt Timer (PIT) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on periodic interrupt event.
+ * @return None.
+ */
+void RTC_SetPITIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief Initializes the RTC module.
+ * @param None.
+ * @retval 0 - the RTC initialization is successful
+ * @retval 1 - the RTC initialization is not successful
+ */
+int8_t RTC_Initialize(void);
+/**
+ * @ingroup rtc
+ * @brief Starts the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Start(void);
+/**
+ * @ingroup rtc
+ * @brief Stops the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Stop(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Counter register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Counter register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCounter(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Period register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Period register of the RTC.
+ * @return None.
+ */
+void RTC_WritePeriod(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Returns the counter value from the Counter register.
+ * @param None.
+ * @return uint16_t - Value of the Counter register.
+ */
+uint16_t RTC_ReadCounter(void);
+/**
+ * @ingroup rtc
+ * @brief Returns the value of the Period register.
+ * @param None.
+ * @return uint16_t - Value of the Period register.
+ */
+uint16_t RTC_ReadPeriod(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Compare (CMP) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the CMP Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Overflow (OVF) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the OVF Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Periodic Interrupt Timer (PIT) interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the PIT Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Clears the OVF Interrupt flag.
+ * @param None.
+ * @return None.
+ */
+void RTC_ClearOVFInterruptFlag(void);
+/**
+ * @ingroup rtc
+ * @brief Checks if Overflow interrupt has occurred.
+ * @param None.
+ * @retval True - Interrupt is enabled.
+ * @retval False - Interrupt is disabled.
+ */
+bool RTC_IsOVFInterruptEnabled(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the CMP register of the RTC module.
+ * @param uint16_t value - Value to be written to the CMP register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCMPRegister(uint16_t value);
+/**
+ * @ingroup rtc
+ * @brief Returns the value from the CMP register.
+ * @param None.
+ * @return uint16_t - Value of the Compare register.
+ */
+uint16_t RTC_ReadCMPRegister(void);
+
+
+#endif /* RTCDRIVER_H */
+
+/** @}*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/src/rtc.c b/instrumentation-amplifier.X/mcc_generated_files/timer/src/rtc.c
new file mode 100644
index 0000000..1d6c1eb
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/src/rtc.c
@@ -0,0 +1,202 @@
+/**
+ * RTC Generated Driver API Source File.
+ *
+ * @file rtc.c
+ *
+ * @ingroup rtc
+ *
+ * @brief This file contains the API implementations for the RTC driver.
+ *
+ * version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../rtc.h"
+
+void (*RTC_OVF_isr_cb)(void) = NULL;
+void (*RTC_CMP_isr_cb)(void) = NULL;
+void (*RTC_PIT_isr_cb)(void) = NULL;
+
+int8_t RTC_Initialize(void)
+{
+ while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ //Compare
+ RTC.CMP = 0x0;
+
+ //Count
+ RTC.CNT = 0x0;
+
+ //Period
+ RTC.PER = 0x3FF;
+
+ //Clock selection
+ RTC.CLKSEL = 0x0;
+
+
+ // CMP disabled; OVF enabled;
+ RTC.INTCTRL = 0x1;
+
+ // DBGRUN disabled;
+ RTC.DBGCTRL = 0x0;
+
+ // CORREN disabled; PRESCALER RTC Clock / 32; RTCEN enabled; RUNSTDBY disabled;
+ RTC.CTRLA = 0x29;
+
+
+ while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ // PI disabled;
+ RTC.PITINTCTRL = 0x0;
+
+ // DBGRUN disabled;
+ RTC.PITDBGCTRL = 0x0;
+
+ return 0;
+}
+
+void RTC_Start(void)
+{
+ RTC.CTRLA |= RTC_RTCEN_bm;
+}
+
+void RTC_Stop(void)
+{
+ RTC.CTRLA &= ~RTC_RTCEN_bm;
+}
+
+void RTC_SetOVFIsrCallback(RTC_cb_t cb)
+{
+ RTC_OVF_isr_cb = cb;
+}
+
+void RTC_SetCMPIsrCallback(RTC_cb_t cb)
+{
+ RTC_CMP_isr_cb = cb;
+}
+
+void RTC_SetPITIsrCallback(RTC_cb_t cb)
+{
+ RTC_PIT_isr_cb = cb;
+}
+
+ISR(RTC_CNT_vect)
+{
+ if ( (RTC.INTCTRL & RTC_OVF_bm) && (RTC.INTFLAGS & RTC_OVF_bm) )
+ {
+ if (RTC_OVF_isr_cb != NULL)
+ {
+ (*RTC_OVF_isr_cb)();
+ }
+ }
+
+ if ( (RTC.INTCTRL & RTC_CMP_bm) && (RTC.INTFLAGS & RTC_CMP_bm) )
+ {
+ if (RTC_CMP_isr_cb != NULL)
+ {
+ (*RTC_CMP_isr_cb)();
+ }
+ }
+ RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
+}
+
+ISR(RTC_PIT_vect)
+{
+ if (RTC_PIT_isr_cb != NULL)
+ {
+ (*RTC_PIT_isr_cb)();
+ }
+ RTC.PITINTFLAGS = RTC_PI_bm;
+}
+
+inline void RTC_WriteCounter(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_CNTBUSY_bm);
+ RTC.CNT = timerVal;
+}
+
+inline uint16_t RTC_ReadCounter(void)
+{
+ return RTC.CNT;
+}
+
+inline void RTC_WritePeriod(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_PERBUSY_bm);
+ RTC.PER = timerVal;
+}
+
+inline uint16_t RTC_ReadPeriod(void)
+{
+ return RTC.PER;
+}
+
+inline void RTC_EnableCMPInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_CMP_bm;
+}
+
+inline void RTC_DisableCMPInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_CMP_bm;
+}
+
+inline void RTC_EnableOVFInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_OVF_bm;
+}
+
+inline void RTC_DisableOVFInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_OVF_bm;
+}
+
+inline void RTC_EnablePITInterrupt(void)
+{
+ RTC.PITINTCTRL |= RTC_PI_bm;
+}
+
+inline void RTC_DisablePITInterrupt(void)
+{
+ RTC.PITINTCTRL &= ~RTC_PI_bm;
+}
+
+inline void RTC_ClearOVFInterruptFlag(void)
+{
+ RTC.INTFLAGS = RTC_OVF_bm;
+}
+
+inline bool RTC_IsOVFInterruptEnabled(void)
+{
+ return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
+}
+
+inline void RTC_WriteCMPRegister(uint16_t value)
+{
+ RTC.CMP = value;
+}
+
+inline uint16_t RTC_ReadCMPRegister(void)
+{
+ return RTC.CMP;
+}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb0.c b/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb0.c
new file mode 100644
index 0000000..cf0217c
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb0.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB0 Generated Driver File
+ *
+ * @file tcb0.c
+ *
+ * @ingroup tcb0
+ *
+ * @brief This file contains the API implementation for the TCB0 module driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb0.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB0_OVF_isr_cb)(void);
+static void TCB0_DefaultOverflowCallback(void);
+static void (*TCB0_CAPT_isr_cb)(void);
+static void TCB0_DefaultCaptureCallback(void);
+
+void TCB0_Initialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB0.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB0.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB0.CCMP = 0x6B8U; // CCMP 0x6B8
+
+ TCB0.CNT = 0x0; // CNT 0xNAN
+
+ TCB0.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_OverflowCallbackRegister(TCB0_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_CaptureCallbackRegister(TCB0_DefaultCaptureCallback);
+
+ TCB0.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB0.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (1 << TCB_RUNSTDBY_bp) // RUNSTDBY enabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB0_Deinitialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CCMP = 0x0;
+
+ TCB0.CNT = 0x0;
+
+ TCB0.CTRLB = 0x0;
+
+ TCB0.DBGCTRL = 0x0;
+
+ TCB0.EVCTRL = 0x0;
+
+ TCB0.INTCTRL = 0x0;
+
+ TCB0.TEMP = 0x0;
+
+ TCB0.CTRLA = 0x0;
+
+ TCB0.INTFLAGS = ~0x0;
+}
+
+void TCB0_Start(void)
+{
+ TCB0.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB0_Stop(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB0_CounterSet(uint16_t timerVal)
+{
+ TCB0.CNT = timerVal;
+}
+
+uint16_t TCB0_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB0.CNT;
+
+ return readVal;
+}
+void TCB0_PeriodSet(uint16_t periodVal)
+{
+ TCB0.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB0_PeriodGet(void)
+{
+ return (uint16_t)TCB0.CCMP;
+}
+
+uint16_t TCB0_MaxCountGet(void)
+{
+ return TCB0_MAX_COUNT;
+}
+
+void TCB0_CAPTInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB0_CAPTInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB0_OVFInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB0_OVFInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB0_IsCaptInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB0_IsOvfInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB0_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB0_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB0_INT_vect)
+{
+ if (0U != (TCB0.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB0_CAPT_isr_cb != NULL)
+ {
+ (*TCB0_CAPT_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB0.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB0_OVF_isr_cb != NULL)
+ {
+ (*TCB0_OVF_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb1.c b/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb1.c
new file mode 100644
index 0000000..e539285
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/src/tcb1.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB1 Generated Driver File
+ *
+ * @file tcb1.c
+ *
+ * @ingroup tcb1
+ *
+ * @brief This file contains the API implementation for the TCB1 module driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb1.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB1_OVF_isr_cb)(void);
+static void TCB1_DefaultOverflowCallback(void);
+static void (*TCB1_CAPT_isr_cb)(void);
+static void TCB1_DefaultCaptureCallback(void);
+
+void TCB1_Initialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB1.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB1.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB1.CCMP = 0x1388U; // CCMP 0x1388
+
+ TCB1.CNT = 0x0; // CNT 0xNAN
+
+ TCB1.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_OverflowCallbackRegister(TCB1_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_CaptureCallbackRegister(TCB1_DefaultCaptureCallback);
+
+ TCB1.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB1.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (0 << TCB_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB1_Deinitialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CCMP = 0x0;
+
+ TCB1.CNT = 0x0;
+
+ TCB1.CTRLB = 0x0;
+
+ TCB1.DBGCTRL = 0x0;
+
+ TCB1.EVCTRL = 0x0;
+
+ TCB1.INTCTRL = 0x0;
+
+ TCB1.TEMP = 0x0;
+
+ TCB1.CTRLA = 0x0;
+
+ TCB1.INTFLAGS = ~0x0;
+}
+
+void TCB1_Start(void)
+{
+ TCB1.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB1_Stop(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB1_CounterSet(uint16_t timerVal)
+{
+ TCB1.CNT = timerVal;
+}
+
+uint16_t TCB1_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB1.CNT;
+
+ return readVal;
+}
+void TCB1_PeriodSet(uint16_t periodVal)
+{
+ TCB1.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB1_PeriodGet(void)
+{
+ return (uint16_t)TCB1.CCMP;
+}
+
+uint16_t TCB1_MaxCountGet(void)
+{
+ return TCB1_MAX_COUNT;
+}
+
+void TCB1_CAPTInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB1_CAPTInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB1_OVFInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB1_OVFInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB1_IsCaptInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB1_IsOvfInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB1_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB1_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB1_INT_vect)
+{
+ if (0U != (TCB1.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB1_CAPT_isr_cb != NULL)
+ {
+ (*TCB1_CAPT_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB1.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB1_OVF_isr_cb != NULL)
+ {
+ (*TCB1_OVF_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0.h b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0.h
new file mode 100644
index 0000000..cdca1b9
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0.h
@@ -0,0 +1,205 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the API prototypes and other data types for TCB0.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_H_INCLUDED
+#define TCB0_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb0_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 maximum count value
+ */
+#define TCB0_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Initializes the TCB0 module
+ * @param None.
+ * @return None.
+ */
+void TCB0_Initialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Deinitializes the TCB0 module.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Deinitialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Starts the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Start(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Stops the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Stop(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB0_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb0
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB0_CounterGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB0_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB0_PeriodGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB0_MaxCountGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h
new file mode 100644
index 0000000..bc8bb5a
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb0_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB0 driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_DEPRECATED_H
+#define TCB0_DEPRECATED_H
+
+#warning "The tcb0_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterGet API.
+ * The TCB0_Read will be deprecated in the future release. Use TCB0_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Read TCB0_CounterGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_Write will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Write TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptEnable API.
+ * The TCB0_EnableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableCaptInterrupt TCB0_CAPTInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptDisable API.
+ * The TCB0_DisableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableCaptInterrupt TCB0_CAPTInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptEnable API.
+ * The TCB0_EnableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableOvfInterrupt TCB0_OVFInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptDisable API.
+ * The TCB0_DisableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableOvfInterrupt TCB0_OVFInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusClear API.
+ * The TCB0_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearOvfInterruptFlag TCB0_OverflowStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusClear API.
+ * The TCB0_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearCaptInterruptFlag TCB0_CaptureStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusGet API.
+ * The TCB0_IsOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsOvfInterruptFlag TCB0_OverflowStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusGet API.
+ * The TCB0_IsCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsCaptInterruptFlag TCB0_CaptureStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Start API.
+ * The TCB0_PWM_Enable will be deprecated in the future release. Use TCB0_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Enable TCB0_Start
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Stop API.
+ * The TCB0_PWM_Disable will be deprecated in the future release. Use TCB0_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Disable TCB0_Stop
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_load_counter will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_counter TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_PeriodSet API.
+ * The TCB0_load_top will be deprecated in the future release. Use TCB0_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_top TCB0_PeriodSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_DutyCycleSet API.
+ * The TCB0_load_duty_cycle will be deprecated in the future release. Use TCB0_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_duty_cycle TCB0_DutyCycleSet
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+#endif // TCB0_DEPRECATED_H
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1.h b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1.h
new file mode 100644
index 0000000..d253414
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1.h
@@ -0,0 +1,205 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the API prototypes and other data types for TCB1.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_H_INCLUDED
+#define TCB1_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb1_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 maximum count value
+ */
+#define TCB1_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Initializes the TCB1 module
+ * @param None.
+ * @return None.
+ */
+void TCB1_Initialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Deinitializes the TCB1 module.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Deinitialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Starts the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Start(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Stops the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Stop(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB1_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb1
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB1_CounterGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB1_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB1_PeriodGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB1_MaxCountGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h
new file mode 100644
index 0000000..8c47aed
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/timer/tcb1_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB1 driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_DEPRECATED_H
+#define TCB1_DEPRECATED_H
+
+#warning "The tcb1_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterGet API.
+ * The TCB1_Read will be deprecated in the future release. Use TCB1_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Read TCB1_CounterGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_Write will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Write TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptEnable API.
+ * The TCB1_EnableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableCaptInterrupt TCB1_CAPTInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptDisable API.
+ * The TCB1_DisableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableCaptInterrupt TCB1_CAPTInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptEnable API.
+ * The TCB1_EnableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableOvfInterrupt TCB1_OVFInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptDisable API.
+ * The TCB1_DisableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableOvfInterrupt TCB1_OVFInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusClear API.
+ * The TCB1_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearOvfInterruptFlag TCB1_OverflowStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusClear API.
+ * The TCB1_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearCaptInterruptFlag TCB1_CaptureStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusGet API.
+ * The TCB1_IsOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsOvfInterruptFlag TCB1_OverflowStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusGet API.
+ * The TCB1_IsCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsCaptInterruptFlag TCB1_CaptureStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Start API.
+ * The TCB1_PWM_Enable will be deprecated in the future release. Use TCB1_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Enable TCB1_Start
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Stop API.
+ * The TCB1_PWM_Disable will be deprecated in the future release. Use TCB1_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Disable TCB1_Stop
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_load_counter will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_counter TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_PeriodSet API.
+ * The TCB1_load_top will be deprecated in the future release. Use TCB1_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_top TCB1_PeriodSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_DutyCycleSet API.
+ * The TCB1_load_duty_cycle will be deprecated in the future release. Use TCB1_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_duty_cycle TCB1_DutyCycleSet
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+#endif // TCB1_DEPRECATED_H
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/uart/src/usart3.c b/instrumentation-amplifier.X/mcc_generated_files/uart/src/usart3.c
new file mode 100644
index 0000000..8ce1b02
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/uart/src/usart3.c
@@ -0,0 +1,309 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.c
+ *
+ * @ingroup usart3
+ *
+ * @brief This is the generated driver implementation file for the USART3 driver using
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+/**
+ Section: Included Files
+*/
+
+#include "../usart3.h"
+
+/**
+ Section: Macro Declarations
+*/
+
+
+
+/**
+ Section: Driver Interface
+ */
+
+const uart_drv_interface_t UART3 = {
+ .Initialize = &USART3_Initialize,
+ .Deinitialize = &USART3_Deinitialize,
+ .Read = &USART3_Read,
+ .Write = &USART3_Write,
+ .IsRxReady = &USART3_IsRxReady,
+ .IsTxReady = &USART3_IsTxReady,
+ .IsTxDone = &USART3_IsTxDone,
+ .TransmitEnable = &USART3_TransmitEnable,
+ .TransmitDisable = &USART3_TransmitDisable,
+ .AutoBaudSet = &USART3_AutoBaudSet,
+ .AutoBaudQuery = &USART3_AutoBaudQuery,
+ .BRGCountSet = NULL,
+ .BRGCountGet = NULL,
+ .BaudRateSet = NULL,
+ .BaudRateGet = NULL,
+ .AutoBaudEventEnableGet = NULL,
+ .ErrorGet = &USART3_ErrorGet,
+ .TxCompleteCallbackRegister = NULL,
+ .RxCompleteCallbackRegister = NULL,
+ .TxCollisionCallbackRegister = NULL,
+ .FramingErrorCallbackRegister = &USART3_FramingErrorCallbackRegister,
+ .OverrunErrorCallbackRegister = &USART3_OverrunErrorCallbackRegister,
+ .ParityErrorCallbackRegister = &USART3_ParityErrorCallbackRegister,
+ .EventCallbackRegister = NULL,
+};
+
+/**
+ Section: USART3 variables
+*/
+static volatile usart3_status_t usart3RxLastError;
+
+/**
+ Section: USART3 APIs
+*/
+void (*USART3_FramingErrorHandler)(void);
+void (*USART3_OverrunErrorHandler)(void);
+void (*USART3_ParityErrorHandler)(void);
+
+static void USART3_DefaultFramingErrorCallback(void);
+static void USART3_DefaultOverrunErrorCallback(void);
+static void USART3_DefaultParityErrorCallback(void);
+
+
+
+/**
+ Section: USART3 APIs
+*/
+
+void USART3_Initialize(void)
+{
+ // Set the USART3 module to the options selected in the user interface.
+
+ //BAUD 138;
+ USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
+
+ // ABEIE disabled; DREIE disabled; LBME disabled; RS485 DISABLE; RXCIE disabled; RXSIE disabled; TXCIE disabled;
+ USART3.CTRLA = 0x0;
+
+ // MPCM disabled; ODME disabled; RXEN disabled; RXMODE NORMAL; SFDEN disabled; TXEN enabled;
+ USART3.CTRLB = 0x40;
+
+ // CMODE Asynchronous Mode; UCPHA enabled; UDORD disabled; CHSIZE Character size: 8 bit; PMODE No Parity; SBMODE 1 stop bit;
+ USART3.CTRLC = 0x3;
+
+ //DBGRUN disabled;
+ USART3.DBGCTRL = 0x0;
+
+ //IREI disabled;
+ USART3.EVCTRL = 0x0;
+
+ //RXPL 0x0;
+ USART3.RXPLCTRL = 0x0;
+
+ //TXPL 0x0;
+ USART3.TXPLCTRL = 0x0;
+
+ USART3_FramingErrorCallbackRegister(USART3_DefaultFramingErrorCallback);
+ USART3_OverrunErrorCallbackRegister(USART3_DefaultOverrunErrorCallback);
+ USART3_ParityErrorCallbackRegister(USART3_DefaultParityErrorCallback);
+ usart3RxLastError.status = 0;
+}
+
+void USART3_Deinitialize(void)
+{
+ USART3.BAUD = 0x00;
+ USART3.CTRLA = 0x00;
+ USART3.CTRLB = 0x00;
+ USART3.CTRLC = 0x00;
+ USART3.DBGCTRL = 0x00;
+ USART3.EVCTRL = 0x00;
+ USART3.RXPLCTRL = 0x00;
+ USART3.TXPLCTRL = 0x00;
+}
+
+void USART3_Enable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
+}
+
+void USART3_Disable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
+}
+
+void USART3_TransmitEnable(void)
+{
+ USART3.CTRLB |= USART_TXEN_bm;
+}
+
+void USART3_TransmitDisable(void)
+{
+ USART3.CTRLB &= ~(USART_TXEN_bm);
+}
+
+void USART3_ReceiveEnable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm ;
+}
+
+void USART3_ReceiveDisable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm);
+}
+
+void USART3_AutoBaudSet(bool enable)
+{
+ if(enable)
+ {
+ USART3.CTRLB |= USART_RXMODE_gm & (0x02 << USART_RXMODE_gp);
+ USART3.STATUS |= USART_WFB_bm ;
+ }
+ else
+ {
+ USART3.CTRLB &= ~(USART_RXMODE_gm);
+ USART3.STATUS &= ~(USART_BDF_bm);
+ }
+}
+
+bool USART3_AutoBaudQuery(void)
+{
+ return (bool)(USART3.STATUS & USART_BDF_bm) ;
+}
+
+bool USART3_IsAutoBaudDetectError(void)
+{
+ return (bool)(USART3.STATUS & USART_ISFIF_bm) ;
+}
+
+void USART3_AutoBaudDetectErrorReset(void)
+{
+ USART3.STATUS |= USART_ISFIF_bm ;
+ USART3_AutoBaudSet(false);
+ USART3_ReceiveDisable();
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ USART3_ReceiveEnable();
+ USART3_AutoBaudSet(true);
+}
+
+bool USART3_IsRxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_RXCIF_bm);
+}
+
+bool USART3_IsTxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_DREIF_bm);
+}
+
+bool USART3_IsTxDone(void)
+{
+ return (bool)(USART3.STATUS & USART_TXCIF_bm);
+}
+
+size_t USART3_ErrorGet(void)
+{
+ usart3RxLastError.status = 0;
+
+ if(USART3.RXDATAH & USART_FERR_bm)
+ {
+ usart3RxLastError.ferr = 1;
+ if(NULL != USART3_FramingErrorHandler)
+ {
+ USART3_FramingErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_PERR_bm)
+ {
+ usart3RxLastError.perr = 1;
+ if(NULL != USART3_ParityErrorHandler)
+ {
+ USART3_ParityErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_BUFOVF_bm)
+ {
+ usart3RxLastError.oerr = 1;
+ if(NULL != USART3_OverrunErrorHandler)
+ {
+ USART3_OverrunErrorHandler();
+ }
+ }
+ return usart3RxLastError.status;
+}
+
+uint8_t USART3_Read(void)
+{
+ return USART3.RXDATAL;
+}
+
+
+void USART3_Write(uint8_t txData)
+{
+ USART3.TXDATAL = txData; // Write the data byte to the USART.
+}
+static void USART3_DefaultFramingErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultOverrunErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultParityErrorCallback(void)
+{
+
+}
+
+void USART3_FramingErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_FramingErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_OverrunErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_OverrunErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_ParityErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_ParityErrorHandler = callbackHandler;
+ }
+}
+
+
+
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h b/instrumentation-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h
new file mode 100644
index 0000000..3c4a04b
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/uart/uart_drv_interface.h
@@ -0,0 +1,90 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_drv_interface.h
+ *
+ * @defgroup uart_drv_interface UART_DRV_INTERFACE
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_DRV_INTERFACE_H
+#define UART_DRV_INTERFACE_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+#include "uart_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+ @ingroup UART
+ @struct uart_drv_interface_t
+ @brief Structure containing the function pointers of UART driver.
+*/
+typedef struct {
+void (*Initialize)(void);
+void (*Deinitialize)(void);
+uint8_t (*Read)(void);
+void (*Write)(uint8_t);
+bool (*IsRxReady)(void);
+bool (*IsTxReady)(void);
+bool (*IsTxDone)(void);
+void (*TransmitEnable)(void);
+void (*TransmitDisable)(void);
+void (*AutoBaudSet)(bool enable);
+bool (*AutoBaudQuery)(void);
+bool (*AutoBaudEventEnableGet)(void);
+void (*BRGCountSet)(uint32_t brgValue);
+uint32_t (*BRGCountGet)(void);
+void (*BaudRateSet)(uint32_t baudRate);
+uint32_t (*BaudRateGet)(void);
+size_t (*ErrorGet)(void);
+void (*TxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*RxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*TxCollisionCallbackRegister)(void (*CallbackHandler) (void));
+void (*FramingErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*OverrunErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*ParityErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*EventCallbackRegister)(void (*CallbackHandler) (void));
+}uart_drv_interface_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_DRV_INTERFACE_H */
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/uart/uart_types.h b/instrumentation-amplifier.X/mcc_generated_files/uart/uart_types.h
new file mode 100644
index 0000000..33de07b
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/uart/uart_types.h
@@ -0,0 +1,81 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_types.h
+ *
+ * @defgroup uart_types UART_TYPES
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_TYPES_H
+#define UART_TYPES_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+@ingroup uartdriver
+@enum UART_STANDARD_BAUDS
+@brief This Enum can be used to set UART standard
+baud-rates using \ref UARTx_BRGSet function e.g. \ref UART1_BRGSet.
+*/
+enum UART_STANDARD_BAUDS{
+UART_110 = 0,
+UART_300 = 1,
+UART_600 = 2,
+UART_1200 = 3,
+UART_2400 = 4,
+UART_4800 = 5,
+UART_9600 = 6,
+UART_14400 = 7,
+UART_19200 = 8,
+UART_38400 = 9,
+UART_57600 = 10,
+UART_115200 = 11,
+UART_230400 = 12,
+UART_460800 = 13,
+UART_921600 = 14,
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_TYPES_H */
+
diff --git a/instrumentation-amplifier.X/mcc_generated_files/uart/usart3.h b/instrumentation-amplifier.X/mcc_generated_files/uart/usart3.h
new file mode 100644
index 0000000..255742a
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/uart/usart3.h
@@ -0,0 +1,306 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.h
+ *
+ * @defgroup usart3 USART3
+ *
+ * @brief This file contains API prototypes and other datatypes for USART3 module.
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef USART3_H
+#define USART3_H
+
+/**
+ Section: Included Files
+ */
+
+#include
+#include
+#include
+#include "../system/system.h"
+#include "uart_drv_interface.h"
+
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+
+/* Normal Mode, Baud register value */
+#define USART3_BAUD_RATE(BAUD_RATE) (((float)4000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
+
+#define UART3_interface UART3
+
+
+#define UART3_Initialize USART3_Initialize
+#define UART3_Deinitialize USART3_Deinitialize
+#define UART3_Write USART3_Write
+#define UART3_Read USART3_Read
+#define UART3_IsRxReady USART3_IsRxReady
+#define UART3_IsTxReady USART3_IsTxReady
+#define UART3_IsTxDone USART3_IsTxDone
+
+#define UART3_TransmitEnable USART3_TransmitEnable
+#define UART3_TransmitDisable USART3_TransmitDisable
+#define UART3_AutoBaudSet USART3_AutoBaudSet
+#define UART3_AutoBaudQuery USART3_AutoBaudQuery
+#define UART3_IsAutoBaudDetectError USART3_IsAutoBaudDetectError
+#define UART3_AutoBaudDetectErrorReset USART3_AutoBaudDetectErrorReset
+#define UART3_BRGCountSet (NULL)
+#define UART3_BRGCountGet (NULL)
+#define UART3_BaudRateSet (NULL)
+#define UART3_BaudRateGet (NULL)
+#define UART3_AutoBaudEventEnableGet (NULL)
+#define UART3_ErrorGet USART3_ErrorGet
+
+#define UART3_TxCompleteCallbackRegister (NULL)
+#define UART3_RxCompleteCallbackRegister (NULL)
+#define UART3_TxCollisionCallbackRegister (NULL)
+#define UART3_FramingErrorCallbackRegister USART3_FramingErrorCallbackRegister
+#define UART3_OverrunErrorCallbackRegister USART3_OverrunErrorCallbackRegister
+#define UART3_ParityErrorCallbackRegister USART3_ParityErrorCallbackRegister
+#define UART3_EventCallbackRegister (NULL)
+
+
+/**
+ @ingroup usart3
+ @struct usart3_status_t
+ @breif This is an instance of USART3_STATUS for USART3 module
+ */
+typedef union {
+ struct {
+ uint8_t perr : 1; /**
-#elif defined(__IAR_SYSTEMS_ASM__)
-#include "assembler/iar.h"
-#include
-#endif
-
-#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/atomic.h b/instrumentation-amplifier.X/mcc_generated_files/utils/atomic.h
deleted file mode 100644
index 7b99064..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/atomic.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ATOMIC_H
-#define ATOMIC_H
-
-/**
- * \defgroup doc_driver_utils_atomic Atomic memory access and critical sections
- * \ingroup doc_driver_utils
- *
- * Atomic memory access and critical sections
- *
- * \{
- */
-
-/* clang-format off */
-
-#if defined(__GNUC__) || defined (__DOXYGEN__)
-
-/**
- * \brief Enter a critical region
- *
- * Saves the contents of the status register, including the Global
- * Interrupt Enable bit, so that it can be restored upon leaving the
- * critical region. Thereafter, clears the Global Interrupt Enable Bit.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler declares a variable with the name of the parameter for
- * holding the SREG value. Since a variable is declared in the macro,
- * this variable must have a name that is unique within the scope
- * that the critical region is declared within, otherwise compilation
- * will fail.
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "in __tmp_reg__, __SREG__" "\n\t" \
- "cli" "\n\t" \
- "push __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-/**
- * \brief Exit a critical region
- *
- * Restores the contents of the status register, including the Global
- * Interrupt Enable bit, as it was when entering the critical region.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler uses this parameter as the name of a variable that holds
- * the SREG value. The parameter must be identical to the parameter
- * used in the corresponding ENTER_CRITICAL().
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "pop __tmp_reg__" "\n\t" \
- "out __SREG__, __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
-#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
-
-#elif defined(__ICCAVR__)
-
-#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
-#define EXIT_CRITICAL(P) __restore_interrupt(P);
-
-#define DISABLE_INTERRUPTS() __disable_interrupt();
-#define ENABLE_INTERRUPTS() __enable_interrupt();
-
-#else
-# error Unsupported compiler.
-#endif
-
-/* clang-format on */
-
-#endif /* ATOMIC_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/compiler.h b/instrumentation-amplifier.X/mcc_generated_files/utils/compiler.h
deleted file mode 100644
index fbd7a59..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/compiler.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef UTILS_COMPILER_H
-#define UTILS_COMPILER_H
-
-/**
- * \defgroup doc_driver_utils_compiler Compiler abstraction
- * \ingroup doc_driver_utils
- *
- * Compiler abstraction layer and code utilities for 8-bit AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#if defined(__GNUC__)
-#include
-#include
-#elif defined(__ICCAVR__)
-#define ENABLE_BIT_DEFINITIONS 1
-#include
-#include
-
-#ifndef CCP_IOREG_gc
-#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
-#endif
-#ifndef CCP_SPM_gc
-#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
-#endif
-
-#else
-#error Unsupported compiler.
-#endif
-
-#include
-#include
-#include
-#include
-
-#include "interrupt_avr8.h"
-
-/**
- * \def UNUSED
- * \brief Marking \a v as a unused parameter or value.
- */
-#define UNUSED(v) (void)(v)
-
-#endif /* UTILS_COMPILER_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h b/instrumentation-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h
deleted file mode 100644
index ad1efd7..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/interrupt_avr8.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_interrupts ISR abstraction
- * \ingroup doc_driver_utils
- *
- * Interrupt-related functionality.
- *
- * \{
- */
-
-#ifndef UTILS_INTERRUPT_AVR8_H
-#define UTILS_INTERRUPT_AVR8_H
-
-/**
- * \weakgroup interrupt_group
- *
- * @{
- */
-
-#ifdef ISR_CUSTOM_H
-#include ISR_CUSTOM_H
-#else
-
-/**
- * \def ISR
- * \brief Define service routine for specified interrupt vector
- *
- * Usage:
- * \code
- ISR(FOO_vect)
- {
- ...
- }
-\endcode
- *
- * \param vect Interrupt vector name as found in the device header files.
- */
-#if defined(__DOXYGEN__)
-#define ISR(vect)
-#elif defined(__GNUC__)
-#include
-#elif defined(__ICCAVR__)
-#define __ISR(x) _Pragma(#x)
-#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
-#endif
-#endif // ISR_CUSTOM_H
-
-#ifdef __GNUC__
-#define cpu_irq_enable() sei()
-#define cpu_irq_disable() cli()
-#else
-#define cpu_irq_enable() __enable_interrupt()
-#define cpu_irq_disable() __disable_interrupt()
-#endif
-
-//! @}
-
-/**
- * \weakgroup interrupt_deprecated_group
- * @{
- */
-// Deprecated definitions.
-#define Enable_global_interrupt() cpu_irq_enable()
-#define Disable_global_interrupt() cpu_irq_disable()
-#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
-//! @}
-
-#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/utils.h b/instrumentation-amplifier.X/mcc_generated_files/utils/utils.h
deleted file mode 100644
index b133c4d..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/utils.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils AVR Code utility functions
- *
- * Compiler abstraction layer and code utilities for AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#ifndef UTILS_H_INCLUDED
-#define UTILS_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Retrieve array size
- */
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTILS_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/utils_assert.h b/instrumentation-amplifier.X/mcc_generated_files/utils/utils_assert.h
deleted file mode 100644
index 25c322e..0000000
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/utils_assert.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_assert Functionality for assert.
- * \ingroup doc_driver_utils
- *
- * \{
- */
-
-#ifndef _ASSERT_H_INCLUDED
-#define _ASSERT_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-/**
- * \brief Assert macro
- *
- * This macro is used to throw asserts. It can be mapped to different function
- * based on debug level.
- *
- * \param[in] condition A condition to be checked;
- * assert is thrown if the given condition is false
- */
-
-#ifdef DEBUG
-#define ASSERT(condition) \
- if (!(condition)) \
- while (true) \
- ;
-#else
-#define ASSERT(condition) ((void)0)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _ASSERT_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/vref/src/vref.c b/instrumentation-amplifier.X/mcc_generated_files/vref/src/vref.c
new file mode 100644
index 0000000..14b549c
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/vref/src/vref.c
@@ -0,0 +1,47 @@
+/**
+ * VREF Generated Driver File.
+ *
+ * @file vref.c
+ *
+ * @ingroup vref
+ *
+ * @brief This file contains the API implementation for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../vref.h"
+
+int8_t VREF_Initialize(void)
+{
+ // ALWAYSON disabled; REFSEL Internal 1.024V reference;
+ VREF.ACREF = 0x0;
+
+ // ALWAYSON enabled; REFSEL VDD as reference;
+ VREF.ADC0REF = 0x85;
+
+ // ALWAYSON enabled; REFSEL Internal 2.048V reference;
+ VREF.DAC0REF = 0x81;
+
+ return 0;
+}
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/vref/vref.h b/instrumentation-amplifier.X/mcc_generated_files/vref/vref.h
new file mode 100644
index 0000000..8186128
--- /dev/null
+++ b/instrumentation-amplifier.X/mcc_generated_files/vref/vref.h
@@ -0,0 +1,55 @@
+/**
+ * VREF Generated Driver API Header File
+ *
+ * @file vref.h
+ *
+ * @defgroup vref VREF
+ *
+ * @brief This file contains the API prototypes for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef VREF_H_INCLUDED
+#define VREF_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup vref
+ * @brief Initializes the VREF module.
+ * @param None.
+ * @retval 0 - VREF is initialized successfully.
+ */
+int8_t VREF_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VREF_H_INCLUDED */
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/nbproject/configurations.xml b/instrumentation-amplifier.X/nbproject/configurations.xml
index 63ad093..6d228eb 100644
--- a/instrumentation-amplifier.X/nbproject/configurations.xml
+++ b/instrumentation-amplifier.X/nbproject/configurations.xml
@@ -7,40 +7,65 @@
-
- mcc_generated_files/config/clock_config.h
+
+ mcc_generated_files/adc/adc0.h
-
- mcc_generated_files/include/dac0.h
- mcc_generated_files/include/cpuint.h
- mcc_generated_files/include/port.h
- mcc_generated_files/include/rtc.h
- mcc_generated_files/include/vref.h
- mcc_generated_files/include/pin_manager.h
- mcc_generated_files/include/opamp.h
- mcc_generated_files/include/ccp.h
- mcc_generated_files/include/rstctrl.h
- mcc_generated_files/include/usart3.h
- mcc_generated_files/include/adc0.h
- mcc_generated_files/include/protected_io.h
- mcc_generated_files/include/tcb0.h
- mcc_generated_files/include/tcb1.h
+
+ mcc_generated_files/dac/dac0.h
-
-
- mcc_generated_files/utils/assembler/iar.h
- mcc_generated_files/utils/assembler/gas.h
+
+ mcc_generated_files/data_streamer/data_streamer.h
+
+
+ mcc_generated_files/opamp/opamp.h
+
+
+
+
+ mcc_generated_files/system/utils/assembler/iar.h
+ mcc_generated_files/system/utils/assembler/gas.h
+
+ mcc_generated_files/system/utils/atomic.h
+ mcc_generated_files/system/utils/utils.h
+ mcc_generated_files/system/utils/assembler.h
+ mcc_generated_files/system/utils/interrupt_avr8.h
+ mcc_generated_files/system/utils/compiler.h
+ mcc_generated_files/system/utils/utils_assert.h
- mcc_generated_files/utils/compiler.h
- mcc_generated_files/utils/interrupt_avr8.h
- mcc_generated_files/utils/utils.h
- mcc_generated_files/utils/utils_assert.h
- mcc_generated_files/utils/assembler.h
- mcc_generated_files/utils/atomic.h
+ mcc_generated_files/system/config_bits.h
+ mcc_generated_files/system/pins.h
+ mcc_generated_files/system/port.h
+ mcc_generated_files/system/clock.h
+ mcc_generated_files/system/system.h
+ mcc_generated_files/system/interrupt.h
+ mcc_generated_files/system/ccp.h
+ mcc_generated_files/system/protected_io.h
+
+
+ mcc_generated_files/timer/tcb1_deprecated.h
+ mcc_generated_files/timer/tcb0_deprecated.h
+ mcc_generated_files/timer/rtc.h
+ mcc_generated_files/timer/tcb0.h
+ mcc_generated_files/timer/tcb1.h
+
+
+ mcc_generated_files/uart/uart_drv_interface.h
+ mcc_generated_files/uart/uart_types.h
+ mcc_generated_files/uart/usart3.h
+
+
+ mcc_generated_files/vref/vref.h
- mcc_generated_files/mcc.h
- data_stream.h
+
+
+ Makefile
+ MyConfig.mc3
+ instrumentation-amplifier.mc3
-
- mcc_generated_files/src/pin_manager.c
- mcc_generated_files/src/cpuint.c
- mcc_generated_files/src/protected_io.S
- mcc_generated_files/src/adc0.c
- mcc_generated_files/src/usart3.c
- mcc_generated_files/src/vref.c
- mcc_generated_files/src/opamp.c
- mcc_generated_files/src/rtc.c
- mcc_generated_files/src/dac0.c
- mcc_generated_files/src/tcb0.c
- mcc_generated_files/src/tcb1.c
+
+
+ mcc_generated_files/adc/src/adc0.c
+
+
+
+
+ mcc_generated_files/dac/src/dac0.c
+
+
+
+
+ mcc_generated_files/data_streamer/src/data_streamer.c
+
+ mcc_generated_files/data_streamer/data_streamer.ds
+
+
+
+ mcc_generated_files/opamp/src/opamp.c
+
+
+
+
+ mcc_generated_files/system/src/system.c
+ mcc_generated_files/system/src/pins.c
+ mcc_generated_files/system/src/config_bits.c
+ mcc_generated_files/system/src/protected_io.S
+ mcc_generated_files/system/src/clock.c
+ mcc_generated_files/system/src/interrupt.c
+
+
+
+
+ mcc_generated_files/timer/src/rtc.c
+ mcc_generated_files/timer/src/tcb0.c
+ mcc_generated_files/timer/src/tcb1.c
+
+
+
+
+ mcc_generated_files/uart/src/usart3.c
+
+
+
+
+ mcc_generated_files/vref/src/vref.c
+
- mcc_generated_files/mcc.c
- mcc_generated_files/device_config.c
main.c
- data_stream.c
-
-
- Makefile
- MyConfig.mc3
@@ -89,13 +142,13 @@
AVR128DB48
- noID
+ nEdbgTool
XC8
- 2.30
+ 2.50
3
-
+
@@ -148,9 +201,9 @@
-
+
@@ -160,6 +213,7 @@
+
@@ -245,17 +299,64 @@
value="Press to select which tool pack to use"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -371,13 +472,13 @@
AVR128DB48
-
+ noID
XC8
- 2.20
+ 2.50
3
-
+
@@ -430,9 +531,9 @@
-
+
@@ -442,6 +543,7 @@
+
@@ -529,15 +631,19 @@
+
+
+
+
diff --git a/non-inverting-pga.X/MyConfig.mc3 b/non-inverting-pga.X/MyConfig.mc3
deleted file mode 100644
index 854ef15..0000000
--- a/non-inverting-pga.X/MyConfig.mc3
+++ /dev/null
@@ -1,11636 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Negative input pin for OPn
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 68
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- TCB0
-
-
-
- 14
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- enabled
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 7
-
-
-
- 6
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- -0.040%
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 142857
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 68
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- true
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
-
-
-
-
- 23
-
-
-
- 0
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 23
-
-
-
- 127
-
-
-
- Output Driver Off
-
-
-
- RTC Clock / 32
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampSingle
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 128
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Ground
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- OFF
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnEventDriven
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 2.0
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- VREF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN2
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OUT
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- enabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 1.024V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 128
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Positive input pin for OPn
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 7
-
-
-
- 5
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- Full Input Range
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 7
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- WIP
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 12
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"},{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 128
-
-
-
- 65
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 117
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- GND
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- Positive input pin for OPn
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- INP
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opNonInvPGA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
-
-
-
-
- INT
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- 1
-
-
-
- ISR_RTC_PIT
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1.024
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 8R, R2 = 8R, R2/R1 = 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 2000000
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- opNonInvPGA
-
-
-
- enabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 1
-
-
-
- 41
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- false
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- alternate
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 3
-
-
-
- 7
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 18
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.3
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\include\pin_manager.h
- bf663ed77b91f2ff225677afc9e52930655424d1b8fd499b0ba1da7b2af31f5a
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- 664cf731a1f6f8b93a46a4041733047d1a3e5fe9116d32fd7a43ea38838751f0
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\include\tcb1.h
- 9d0a32ab9318678859c15e3168e8cdeaeed8bbecceb9b3d2492760ddf6e8c004
-
-
- mcc_generated_files\src\pin_manager.c
- 59e355e23f796da2db5281c66492ee2379422d954bf148636825ab4f62be4407
-
-
- mcc_generated_files\src\tcb1.c
- 273a8fa28040b7994c42af736726f4f37396359c7451d6375efae5b6194f69d7
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\src\tcb0.c
- b7c085eec9b3a2e01df339e0a3b722d2d86f87e41d95cd2c481da3ee3641de39
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- 8572b8c83d8f535a9fabb7a2e29c1c7d12d16b3627ca69daa9ec8358614c281d
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\mcc.h
- 5debd10a8b620e19acfe11fcf02f3254ea03692b5044c51dda72795ad7759aa5
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- mcc_generated_files\src\adc0.c
- 3e7136a4206a3e6a553c7365ce97059eca5e0e88c0417757505eac39ee8c69b3
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- 3ff69dbc2cd9907593088060ebc3087887b342d3c4ac859bbf2c145d7fd9ed15
-
-
- mcc_generated_files\include\opamp.h
- 96fd17bb8127498782b41872069e59c4f66a3c85b4a9a30130b0c3f7f8dca576
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\src\opamp.c
- 5c26fae461022139c033e5886751e1feb5a14e0f3e00d63fce0bbbd04f2a93a8
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/non-inverting-pga.X/MyConfig.mc3.bak b/non-inverting-pga.X/MyConfig.mc3.bak
deleted file mode 100644
index 5c413fc..0000000
--- a/non-inverting-pga.X/MyConfig.mc3.bak
+++ /dev/null
@@ -1,11640 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Negative input pin for OPn
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 68
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 14
-
-
-
- TCB0
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- false
-
-
-
-
-
-
-
- enabled
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- -0.040%
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 142857
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 68
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
-
-
-
-
- 23
-
-
-
- 0
-
-
-
- Wiper from OPn's resistor ladder
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 23
-
-
-
- 127
-
-
-
- RTC Clock / 32
-
-
-
- Output Driver Off
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampSingle
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 128
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Ground
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- OFF
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnEventDriven
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 2.0
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VREF
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN2
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OUT
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 0
-
-
-
- 12
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 1.024V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 128
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Positive input pin for OPn
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 5
-
-
-
- 7
-
-
-
- 0
-
-
-
- 9
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- CLK_PEP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- Full Input Range
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 1
-
-
-
- 7
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 3
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- WIP
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 0
-
-
-
- 12
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"},{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 128
-
-
-
- 65
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 117
-
-
-
- 0
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- GND
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- Positive input pin for OPn
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- INP
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- ISR_USART3_ABE
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opNonInvPGA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
-
-
-
-
- INT
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- ISR_RTC_PIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1.024
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 8R, R2 = 8R, R2/R1 = 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 2000000
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- opNonInvPGA
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 41
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- alternate
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- OPn output
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- disabled
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 3
-
-
-
- 7
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 18
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.3
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\include\pin_manager.h
- b02841d46354b07150659b0d13360da6e183a0ca20fb5a7bacbf52d93de98dd8
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- f99940ca5c1f1a476aefb94b0ae0350fe7965e6ce033776a7cdb494d2116b482
-
-
- mcc_generated_files\include\tcb1.h
- 48affc128bd0298e52e46a4e619fbcf1a699d041c2fc6d057e81a28ef6f2f95c
-
-
- mcc_generated_files\src\pin_manager.c
- c39e2877b78b23cfd769167f30bdd6474700b61f46afd631c4d51e7b702014cb
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\tcb1.c
- 3f164851af42f06ca7274eccb115b5e055054f3c754f625691c8e7260aea65ac
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\src\tcb0.c
- eb14c823736ca31b0bc3d1a7690505ac49bac351927d50250767f748557af01a
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- b516cde371e7d21c5557b3fce53d804baaa6777d33ec56ce3c8381f15296acf0
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\mcc.h
- f9b8d55ff15da0469527b1b9fc790001ea977137f09980e8ddda6770f8c7d239
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- mcc_generated_files\src\adc0.c
- 9650fb685485e198db2b65e85b77f04e0c03ae172e47624dc97f202318f6e787
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- 3ff69dbc2cd9907593088060ebc3087887b342d3c4ac859bbf2c145d7fd9ed15
-
-
- mcc_generated_files\include\opamp.h
- 96fd17bb8127498782b41872069e59c4f66a3c85b4a9a30130b0c3f7f8dca576
-
-
- mcc_generated_files\src\opamp.c
- 5c26fae461022139c033e5886751e1feb5a14e0f3e00d63fce0bbbd04f2a93a8
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/non-inverting-pga.X/data_stream.c b/non-inverting-pga.X/data_stream.c
deleted file mode 100644
index 3d91b80..0000000
--- a/non-inverting-pga.X/data_stream.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "data_stream.h"
-#include "mcc_generated_files/include/usart3.h"
-#include
-
-char TX_buffer[sizeof(data_stream)];
-
-void DS_sendData(void) {
- memcpy(TX_buffer, &data_stream, sizeof(data_stream));
-
- USART3.CTRLA = USART_DREIE_bm; /* Enable Transmit Complete interrupt*/
- USART3.TXDATAL = data_stream.start_token; /* Send the first byte of the buffer*/
- /* once the first byte is transmitted the ISR will kick in*/
-}
-
-void myUSART_3_ISR(void)
-{
- volatile static uint8_t tx_count = 1;
-
- if (data_stream.data_available) {
-
- if (tx_count < (sizeof(TX_buffer) - 1)) {
- USART3.TXDATAL = TX_buffer[tx_count];
- tx_count++;
- }
- else{
-
- tx_count = 1;
- data_stream.data_available = 0;
- USART3.CTRLA &= ~USART_DREIE_bm; /* Disable Transmit Complete interrupt*/
- /* No more bytes available*/
- }
- }
-}
\ No newline at end of file
diff --git a/non-inverting-pga.X/data_stream.h b/non-inverting-pga.X/data_stream.h
deleted file mode 100644
index d167bb0..0000000
--- a/non-inverting-pga.X/data_stream.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef DATA_STREAM_H_
-#define DATA_STREAM_H_
-
-#include
-
-#define START_TOKEN 0x55
-
-typedef struct {
- uint8_t start_token;
- uint16_t dacVal;
- uint16_t opampVal;
- uint8_t end_token;
- uint8_t data_available;
-}data_visualizer;
-
-data_visualizer data_stream;
-
-void DS_sendData(void);
-
-void myUSART_3_ISR(void);
-
-
-#endif /* DATA_STREAM_H_ */
\ No newline at end of file
diff --git a/non-inverting-pga.X/main.c b/non-inverting-pga.X/main.c
index e4bf4f5..5cde4ea 100644
--- a/non-inverting-pga.X/main.c
+++ b/non-inverting-pga.X/main.c
@@ -1,28 +1,27 @@
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
+ (c) 2018 Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip software and any
+ derivatives exclusively with Microchip products. It is your responsibility to comply with third party
+ license terms applicable to your use of third party software (including open source software) that
may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
+
+ THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
+ EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
+ IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
+
+ IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
+ WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
+ HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
+ THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
+ CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
+ OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
SOFTWARE.
-*/
+ */
-#include "mcc_generated_files/mcc.h"
-#include "data_stream.h"
+#include "mcc_generated_files/system/system.h"
#include
#define DEGREE 0.0245 //2pi /256 = 6.28/ 256.
@@ -33,10 +32,10 @@
#define VREF_STARTUP_MICROS (25)
/*Amplitude Volts*/
-#define SINE_WAVE_AMPLITUDE_VOLTS (0.092)
+#define SINE_WAVE_AMPLITUDE_VOLTS (0.128)
/*Offset Volts*/
#define SINE_DC_OFFSET_VOLTS (0.256)
-
+
/*DAC Voltage Reference*/
#define DAC_VOLTAGE_REF (1.024)
/* Number of steps for a sine wave period */
@@ -55,74 +54,77 @@ uint16_t sine_wave[SINE_WAVE_STEPS];
void myRTCISR(void);
void myTCB0ISR(void);
-void myTCB1ISR (void);
+void myTCB1ISR(void);
void sine_wave_table_init(void);
+void adc_resrdy(void);
/*
Main application
-*/
+ */
int main(void)
{
/* Initializes MCU, drivers and middleware */
SYSTEM_Initialize();
-
+
+ DataStreamer.dacVal = 0;
+ DataStreamer.opampVal = 0;
+
sine_wave_table_init();
-
+
+ ADC0_RegisterResrdyCallback(adc_resrdy);
RTC_SetOVFIsrCallback(myRTCISR);
- TCB0_SetCaptIsrCallback(myTCB0ISR);
- USART3_SetTXISRCb(myUSART_3_ISR);
- data_stream.start_token = START_TOKEN;
- data_stream.end_token = (~START_TOKEN);
- TCB1_SetCaptIsrCallback(myTCB1ISR);
+ TCB0_CaptureCallbackRegister(myTCB0ISR);
+ TCB1_CaptureCallbackRegister(myTCB1ISR);
/* Replace with your application code */
- while (1){
+ while (1)
+ {
}
}
-void myRTCISR(void){
+void myRTCISR(void)
+{
LED0_Toggle(); //Control LED
}
-void myTCB0ISR(void){
-
+void myTCB0ISR(void)
+{
+
volatile static uint16_t sine_wave_index = 0;
-
+
DAC0_SetOutput(sine_wave[sine_wave_index]); //Control LED
- data_stream.dacVal = sine_wave[sine_wave_index];
+ DataStreamer.dacVal = sine_wave[sine_wave_index];
sine_wave_index++;
sine_wave_index = sine_wave_index % SINE_WAVE_STEPS;
}
void sine_wave_table_init(void)
{
- for(uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
- {
- sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
- }
-
+ for (uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
+ {
+ sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
+ }
+
}
-void myTCB1ISR (void){
- if (data_stream.data_available == 0) {
+void myTCB1ISR(void)
+{
+ if (USART3_IsTxReady())
+ {
/* Start ADC conversion */
ADC0.COMMAND = ADC_STCONV_bm;
}
-
/* Clear interrupt flag */
- TCB1.INTFLAGS = 0xFF;
}
-ISR (ADC0_RESRDY_vect)
+void adc_resrdy(void)
{
- data_stream.data_available = 1;
- data_stream.opampVal = (ADC0.RES >> 3);
- DS_sendData();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
+ DataStreamer.opampVal = (ADC0.RES >> 3);
+ WriteFrame();
}
/**
End of File
-*/
\ No newline at end of file
+ */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/adc/adc0.h b/non-inverting-pga.X/mcc_generated_files/adc/adc0.h
new file mode 100644
index 0000000..0b930f1
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/adc/adc0.h
@@ -0,0 +1,231 @@
+/**
+ * ADC0 Generated Driver API Header File
+ *
+ * @file adc0.h
+ *
+ * @defgroup adc0 ADC0
+ *
+ * @brief API prototypes and other datatypes for the ADC0 module driver.
+ *
+ * @version ADC0 Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ADC0_H_INCLUDED
+#define ADC0_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup adc0
+ * @enum ADC0_window_mode_t
+ * @brief Window Comparator Modes
+ */
+typedef enum {
+ ADC0_window_disabled, /**
+#include
+
+/**
+ * @def Data Streamer Start Byte Macro.
+ * Macro that represents the byte that is sent to signify the beginning of the Data Streamer frame.
+ */
+#define DATA_STREAMER_START_BYTE 3
+
+/**
+ * @def Data Streamer End Byte Macro.
+ * Macro that represents the byte that is sent to signify the end of the Data Streamer frame.
+ */
+#define DATA_STREAMER_END_BYTE (255 - DATA_STREAMER_START_BYTE)
+
+/**
+ * @ingroup datastreamer
+ * @struct DATA_STREAMER_STRUCT
+ * @brief Structure containing the initial Data Streamer variables.
+ */
+struct __attribute__((packed)) DATA_STREAMER_STRUCT
+{
+ uint16_t dacVal;
+ uint16_t opampVal;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct PACKAGE_STRUCT
+ * @brief Structure containing a pointer assigned to a custom data package and its size which are set by the user.
+ */
+struct PACKAGE_STRUCT
+{
+ void * varStruct;
+ size_t length;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct DataStreamer
+ * @brief An instance of the DATA_STREAMER_STRUCT.
+ */
+extern struct DATA_STREAMER_STRUCT DataStreamer;
+
+/**
+ @ingroup datastreamer
+ @struct DATA_STREAMER_PACKAGE
+ @brief An instance of the PACKAGE_STRUCT.
+ */
+extern struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+/**
+ * @def Data Streamer Write Frame Macro.
+ * Macro used to write the frame to the Data Streamer.
+ */
+#define WriteFrame() DataStreamer_FrameSend(DATA_STREAMER_PACKAGE.varStruct,DATA_STREAMER_PACKAGE.length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Initializes the Data Streamer.
+ * @param None.
+ * @return None.
+ */
+void DataStreamer_Initialize(void);
+
+/**
+ * @ingroup datastreamer
+ * @brief Writes the frame to the Data Streamer.
+ * @param void * package - Pointer to the DATA_STREAMER_PACKAGE structure containing the variables to be sent.
+ * @param size_t length - Size of the DATA_STREAMER_PACKAGE structure in bytes.
+ * @return None.
+ */
+void DataStreamer_FrameSend(void * package, size_t length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Sets the package containing the variables to be sent by the Data Streamer.
+ * @param void * customStructHandler - Pointer to the user-defined structure containing the variables to be sent to the Data Streamer.
+ * @param size_t customlength - Size of the user-defined structure in bytes.
+ * @return None.
+ */
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength);
+
+#endif /* DATA_STREAMER_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/data_streamer/src/data_streamer.c b/non-inverting-pga.X/mcc_generated_files/data_streamer/src/data_streamer.c
new file mode 100644
index 0000000..3b57f3c
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/data_streamer/src/data_streamer.c
@@ -0,0 +1,69 @@
+/**
+ * DATASTREAMER Generated Driver API Source File.
+ *
+ * @file data_streamer.c
+ *
+ * @ingroup datastreamer
+ *
+ * @brief This file contains the implementation for the Data Streamer driver APIs.
+ *
+ * @version Data Streamer Driver Version 1.2.1
+ */
+ /*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../data_streamer.h"
+#include "../../uart/usart3.h"
+
+static const uart_drv_interface_t *DS_UART = &UART3;
+
+
+struct DATA_STREAMER_STRUCT DataStreamer;
+struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+void DataStreamer_Initialize(void)
+{
+ DataStreamer_PackageSet(&DataStreamer, sizeof (DataStreamer));
+}
+
+static void DataStreamer_VariableWrite(char var)
+{
+ while (!(DS_UART->IsTxReady()));
+ DS_UART->Write(var);
+};
+
+void DataStreamer_FrameSend(void * package, size_t length)
+{
+ char * dp = package;
+ DataStreamer_VariableWrite(DATA_STREAMER_START_BYTE);
+ while (length--)
+ {
+ DataStreamer_VariableWrite(*dp++);
+ }
+ DataStreamer_VariableWrite(DATA_STREAMER_END_BYTE);
+ while (!(DS_UART->IsTxDone()));
+};
+
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength)
+{
+ DATA_STREAMER_PACKAGE.varStruct = customStructHandler;
+ DATA_STREAMER_PACKAGE.length = customlength;
+};
diff --git a/non-inverting-pga.X/mcc_generated_files/device_config.c b/non-inverting-pga.X/mcc_generated_files/device_config.c
deleted file mode 100644
index 829d080..0000000
--- a/non-inverting-pga.X/mcc_generated_files/device_config.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include
-
-/**
- * \Configures Fuse bits
- */
-
-FUSES =
-{
- .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
- .BOOTSIZE = 0,
- .CODESIZE = 0,
- .OSCCFG = CLKSEL_OSCHF_gc,
- .SYSCFG0 = CRCSEL_CRC32_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
- .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
- .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
-};
diff --git a/non-inverting-pga.X/mcc_generated_files/include/adc0.h b/non-inverting-pga.X/mcc_generated_files/include/adc0.h
deleted file mode 100644
index 37ac63f..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/adc0.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ADC0_H_INCLUDED
-#define ADC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- adc0_window_disabled,
- adc0_window_below,
- adc0_window_above,
- adc0_window_inside,
- adc0_window_outside
-} adc0_window_mode_t;
-
-/** Function pointer to callback function called by IRQ.
- NULL=default value: No callback function is to be used.
-*/
-typedef void (*adc_irq_cb_t)(void);
-
-/** Datatype for the result of the ADC conversion */
-typedef uint16_t adc_result_t;
-typedef int16_t diff_adc_result_t;
-
-//* Analog channel selection */
-typedef ADC_MUXPOS_t adc_0_channel_t;
-typedef ADC_MUXNEG_t adc_0_muxneg_channel_t;
-
-/**
- * \brief Initialize ADC interface
- * If module is configured to disabled state, the clock to the ADC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the ADC init was successful
- * \retval 1 the ADC init was not successful
- */
-int8_t ADC0_Initialize();
-
-/**
- * \brief Enable ADC0
- * 1. If supported by the clock system, enables the clock to the ADC
- * 2. Enables the ADC module by setting the enable-bit in the ADC control register
- *
- * \return Nothing
- */
-void ADC0_Enable();
-
-/**
- * \brief Disable ADC0
- * 1. Disables the ADC module by clearing the enable-bit in the ADC control register
- * 2. If supported by the clock system, disables the clock to the ADC
- *
- * \return Nothing
- */
-void ADC0_Disable();
-
-/**
- * \brief Enable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_EnableAutoTrigger();
-
-/**
- * \brief Disable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_DisableAutoTrigger();
-
-/**
- * \brief Set conversion window comparator high threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowHigh(adc_result_t high);
-
-/**
- * \brief Set conversion window comparator low threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowLow(adc_result_t low);
-
-/**
- * \brief Set conversion window mode
- *
- * \return Nothing
- */
-void ADC0_SetWindowMode(adc0_window_mode_t mode);
-
-/**
- * \brief Set ADC channel to be used for windowed conversion mode
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_SetWindowChannel(adc_0_channel_t channel);
-
-/**
- * \brief Start a conversion on ADC0
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion on ADC0
- *
- * \param[in] channel,channel1 The ADC channels to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Stop a conversion on ADC0
- *
- * \return Nothing
- */
-void ADC0_StopConversion();
-
-/**
- * \brief Check if the ADC conversion is done
- *
- * \return The status of ADC converison done check
- * \retval true The ADC conversion is done
- * \retval false The ADC converison is not done
- */
-bool ADC0_IsConversionDone();
-
-/**
- * \brief Read a conversion result from ADC0
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversionResult(void);
-
-/**
- * \brief Read the conversion window result from ADC0
- *
- * \return Returns true when a comparison results in a trigger condition, false otherwise.
- */
-bool ADC0_GetWindowResult(void);
-
-/**
- * \brief Start a conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Return the number of bits in the ADC conversion result
- *
- * \return The number of bits in the ADC conversion result
- */
-uint8_t ADC0_GetResolution();
-
-/**
- * \brief Register a callback function to be called if conversion satisfies window criteria.
- *
- * \param[in] f Pointer to function to be called
- *
- * \return Nothing.
- */
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ADC0_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/ccp.h b/non-inverting-pga.X/mcc_generated_files/include/ccp.h
deleted file mode 100644
index 9f416a0..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/ccp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPU_CCP_H
-#define CPU_CCP_H
-
-#include "../utils/compiler.h"
-#include "../include/protected_io.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Write to a CCP-protected 8-bit I/O register
- *
- * \param addr Address of the I/O register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_io(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_IOREG_gc, value);
-}
-
-/** @} */
-
-/**
- * \brief Write to CCP-protected 8-bit SPM register
- *
- * \param addr Address of the SPM register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_spm(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_SPM_gc, value);
-}
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CCP_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/include/cpuint.h b/non-inverting-pga.X/mcc_generated_files/include/cpuint.h
deleted file mode 100644
index 67c012c..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/cpuint.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPUINT_H_INCLUDED
-#define CPUINT_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include "ccp.h"
-#include "../utils/atomic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /** \
- * \brief Initialize cpuint interface \
- * \
- * \return Initialization status \
- */
-int8_t CPUINT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPUINT_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/dac0.h b/non-inverting-pga.X/mcc_generated_files/include/dac0.h
deleted file mode 100644
index 70239d9..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/dac0.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef DAC0_H_INCLUDED
-#define DAC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Datatype for the resolution of the DAC */
-typedef uint16_t dac_resolution_t;
-
-/**
- * \brief Initialize DAC interface
- * If module is configured to disabled state, the clock to the DAC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the DAC init was successful
- * \retval 1 the DAC init was not successful
- */
-int8_t DAC0_Initialize();
-
-/**
- * \brief Enable DAC0
- * 1. If supported by the clock system, enables the clock to the DAC
- * 2. Enables the DAC module by setting the enable-bit in the DAC control register
- *
- * \return Nothing
- */
-void DAC0_Enable();
-
-/**
- * \brief Disable DAC0
- * 1. Disables the DAC module by clearing the enable-bit in the DAC control register
- * 2. If supported by the clock system, disables the clock to the DAC
- *
- * \return Nothing
- */
-void DAC0_Disable();
-
-/**
- * \brief Start a conversion on DAC0
- *
- * \param[in] value The digital value to be converted to analogue voltage by the DAC
- *
- * \return Nothing
- */
-void DAC0_SetOutput(dac_resolution_t value);
-
-/**
- * \brief Return the number of bits in the DAC resolution
- *
- * \return The number of bits in the DAC resolution
- */
-uint8_t DAC0_GetResolution();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DAC0_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/opamp.h b/non-inverting-pga.X/mcc_generated_files/include/opamp.h
deleted file mode 100644
index 2211749..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/opamp.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef OPAMP_H_INCLUDED
-#define OPAMP_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include
-
-#define OPAMP_TIMEBASE_VALUE (23)
-
-/**
- @Summary
- Initializes the OPAMP_Initialize.
-
- @Description
- This routine initializes the OPAMP_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- OPAMP_Initialize();
-
-*/
-void OPAMP_Initialize();
-
-/**
- * @brief Enables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_EnableSystem(void);
-
-/**
- * @brief Disables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_DisableSystem(void);
-
-//OP0 Non-Inverting Programmable Gain Amplifier APIs
-
-/**
- * @brief Sets OP0's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets the R1 and R2 values of OP0's internal resistor ladder as per user selection
- * @return None
- * @param [in] Desired resistor selection
- For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
- */
-void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value);
-
-/**
- * @brief Sets OP0's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP0SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP0's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP0Settled(void);
-
-/**
- * @brief Sets OP0's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
-
-#endif /* OPAMP_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/pin_manager.h b/non-inverting-pga.X/mcc_generated_files/include/pin_manager.h
deleted file mode 100644
index 29ff050..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/pin_manager.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef PINS_H_INCLUDED
-#define PINS_H_INCLUDED
-
-#include
-#include "port.h"
-
-//get/set LED0 aliases
-#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
-#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
-#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
-#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
-#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
-#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
-#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA2 aliases
-#define PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
-#define PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
-#define PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
-#define PA2_GetValue() (VPORTA.IN & (0x1 << 2))
-#define PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
-#define PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
-#define PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA3 aliases
-#define PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
-#define PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
-#define PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
-#define PA3_GetValue() (VPORTA.IN & (0x1 << 3))
-#define PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
-#define PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
-#define PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD6 aliases
-#define PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
-#define PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
-#define PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
-#define PD6_GetValue() (VPORTD.IN & (0x1 << 6))
-#define PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
-#define PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
-#define PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
-#define PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB1 aliases
-#define PB1_SetHigh() do { PORTB_OUTSET = 0x2; } while(0)
-#define PB1_SetLow() do { PORTB_OUTCLR = 0x2; } while(0)
-#define PB1_Toggle() do { PORTB_OUTTGL = 0x2; } while(0)
-#define PB1_GetValue() (VPORTB.IN & (0x1 << 1))
-#define PB1_SetDigitalInput() do { PORTB_DIRCLR = 0x2; } while(0)
-#define PB1_SetDigitalOutput() do { PORTB_DIRSET = 0x2; } while(0)
-#define PB1_SetPullUp() do { PORTB_PIN1CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB1_ResetPullUp() do { PORTB_PIN1CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB1_SetInverted() do { PORTB_PIN1CTRL |= PORT_INVEN_bm; } while(0)
-#define PB1_ResetInverted() do { PORTB_PIN1CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB1_DisableInterruptOnChange() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB1_EnableInterruptForBothEdges() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB1_EnableInterruptForRisingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB1_EnableInterruptForFallingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB1_DisableDigitalInputBuffer() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB1_EnableInterruptForLowLevelSensing() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD2 aliases
-#define PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
-#define PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
-#define PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
-#define PD2_GetValue() (VPORTD.IN & (0x1 << 2))
-#define PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
-#define PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
-#define PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB0 aliases
-#define PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
-#define PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
-#define PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
-#define PB0_GetValue() (VPORTB.IN & (0x1 << 0))
-#define PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
-#define PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
-#define PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
-#define PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-void PIN_MANAGER_Initialize();
-void PORTB_LED0_DefaultInterruptHandler(void);
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA2_DefaultInterruptHandler(void);
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA3_DefaultInterruptHandler(void);
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD6_DefaultInterruptHandler(void);
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB1_DefaultInterruptHandler(void);
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD2_DefaultInterruptHandler(void);
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB0_DefaultInterruptHandler(void);
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-#endif /* PINS_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/include/port.h b/non-inverting-pga.X/mcc_generated_files/include/port.h
deleted file mode 100644
index 6a314fd..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/port.h
+++ /dev/null
@@ -1,1383 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef PORT_INCLUDED
-#define PORT_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../utils/compiler.h"
-
-enum port_pull_mode {
- PORT_PULL_OFF,
- PORT_PULL_UP,
-};
-
-enum port_dir {
- PORT_DIR_IN,
- PORT_DIR_OUT,
- PORT_DIR_OFF,
-};
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= mask;
- } else {
- VPORTE.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= (1 << pin);
- } else {
- VPORTE.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTE_toggle_port_level(const uint8_t mask)
-{
- PORTE.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTE_toggle_pin_level(const uint8_t pin)
-{
- PORTE.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTE_get_port_level()
-{
- return VPORTE.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTE_get_pin_level(const uint8_t pin)
-{
- return VPORTE.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTE_write_port(const uint8_t value)
-{
- VPORTE.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= mask;
- } else {
- VPORTF.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= (1 << pin);
- } else {
- VPORTF.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTF_toggle_port_level(const uint8_t mask)
-{
- PORTF.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTF_toggle_pin_level(const uint8_t pin)
-{
- PORTF.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTF_get_port_level()
-{
- return VPORTF.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTF_get_pin_level(const uint8_t pin)
-{
- return VPORTF.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTF_write_port(const uint8_t value)
-{
- VPORTF.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= mask;
- } else {
- VPORTA.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= (1 << pin);
- } else {
- VPORTA.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTA_toggle_port_level(const uint8_t mask)
-{
- PORTA.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTA_toggle_pin_level(const uint8_t pin)
-{
- PORTA.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTA_get_port_level()
-{
- return VPORTA.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTA_get_pin_level(const uint8_t pin)
-{
- return VPORTA.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTA_write_port(const uint8_t value)
-{
- VPORTA.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= mask;
- } else {
- VPORTB.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= (1 << pin);
- } else {
- VPORTB.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTB_toggle_port_level(const uint8_t mask)
-{
- PORTB.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTB_toggle_pin_level(const uint8_t pin)
-{
- PORTB.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTB_get_port_level()
-{
- return VPORTB.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTB_get_pin_level(const uint8_t pin)
-{
- return VPORTB.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTB_write_port(const uint8_t value)
-{
- VPORTB.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= mask;
- } else {
- VPORTC.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= (1 << pin);
- } else {
- VPORTC.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTC_toggle_port_level(const uint8_t mask)
-{
- PORTC.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTC_toggle_pin_level(const uint8_t pin)
-{
- PORTC.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTC_get_port_level()
-{
- return VPORTC.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTC_get_pin_level(const uint8_t pin)
-{
- return VPORTC.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTC_write_port(const uint8_t value)
-{
- VPORTC.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= mask;
- } else {
- VPORTD.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= (1 << pin);
- } else {
- VPORTD.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTD_toggle_port_level(const uint8_t mask)
-{
- PORTD.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTD_toggle_pin_level(const uint8_t pin)
-{
- PORTD.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTD_get_port_level()
-{
- return VPORTD.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTD_get_pin_level(const uint8_t pin)
-{
- return VPORTD.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTD_write_port(const uint8_t value)
-{
- VPORTD.OUT = value;
-}
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/protected_io.h b/non-inverting-pga.X/mcc_generated_files/include/protected_io.h
deleted file mode 100644
index ec8fcc3..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/protected_io.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_system_protected_io Protected IO
- * \ingroup doc_driver_system
- *
- * \section doc_driver_protected_io_rev Revision History
- * - v0.0.0.1 Initial Commit
- *
- *@{
- */
-
-#ifndef PROTECTED_IO_H
-#define PROTECTED_IO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__DOXYGEN__)
-//! \name IAR Memory Model defines.
-//@{
-
-/**
- * \def CONFIG_MEMORY_MODEL_TINY
- * \brief Configuration symbol to enable 8 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_TINY
-
-/**
- * \def CONFIG_MEMORY_MODEL_SMALL
- * \brief Configuration symbol to enable 16 bit pointers.
- * \note If no memory model is defined, SMALL is default.
- *
- */
-#define CONFIG_MEMORY_MODEL_SMALL
-
-/**
- * \def CONFIG_MEMORY_MODEL_LARGE
- * \brief Configuration symbol to enable 24 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_LARGE
-
-//@}
-#endif
-
-/**
- * \brief Write to am 8-bit I/O register protected by CCP or a protection bit
- *
- * \param addr Address of the I/O register
- * \param magic CCP magic value or Mask for protection bit
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
-
-/** @} */
-
-#endif /* PROTECTED_IO_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/include/rstctrl.h b/non-inverting-pga.X/mcc_generated_files/include/rstctrl.h
deleted file mode 100644
index 538084b..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/rstctrl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RSTCTRL_INCLUDED
-#define RSTCTRL_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ccp.h"
-
-static inline void RSTCTRL_reset(void)
-{
- /* SWRR is protected with CCP */
- ccp_write_io((void *)&RSTCTRL.SWRR, 0x0);
-
-}
-
-static inline uint8_t RSTCTRL_get_reset_cause(void)
-{
- return RSTCTRL.RSTFR;
-}
-
-static inline void RSTCTRL_clear_reset_cause(void)
-{
- RSTCTRL.RSTFR
- = RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RSTCTRL_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/rtc.h b/non-inverting-pga.X/mcc_generated_files/include/rtc.h
deleted file mode 100644
index 978d393..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/rtc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RTCDRIVER_H
-#define RTCDRIVER_H
-
-#include "../utils/compiler.h"
-#include
-#include
-
-/** Datatype used to hold the number of ticks until a timer expires */
-
-typedef void (*RTC_cb_t)(void);
-void RTC_SetOVFIsrCallback(RTC_cb_t cb);
-void RTC_SetCMPIsrCallback(RTC_cb_t cb);
-void RTC_SetPITIsrCallback(RTC_cb_t cb);
-int8_t RTC_Initialize();
-void RTC_WriteCounter(uint16_t timerVal);
-void RTC_WritePeroid(uint16_t timerVal);
-uint16_t RTC_ReadCounter();
-uint16_t RTC_ReadPeriod();
-void RTC_EnableCMPInterrupt();
-void RTC_DisableCMPInterrupt();
-void RTC_EnableOVFInterrupt();
-void RTC_DisableOVFInterrupt();
-void RTC_EnablePITInterrupt();
-void RTC_DisablePITInterrupt();
-void RTC_ClearOVFInterruptFlag();
-bool RTC_IsOVFInterruptEnabled();
-
-
-#endif /* RTCDRIVER_H */
-
-/** @}*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/tcb0.h b/non-inverting-pga.X/mcc_generated_files/include/tcb0.h
deleted file mode 100644
index a1721c6..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/tcb0.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB0_H_INCLUDED
-#define TCB0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB0_cb_t)(void);
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb);
-void TCB0_SetOvfIsrCallback(TCB0_cb_t cb);
-int8_t TCB0_Initialize();
-void TCB0_EnableCaptInterrupt(void);
-void TCB0_DisableCaptInterrupt(void);
-uint16_t TCB0_ReadTimer(void);
-void TCB0_WriteTimer(uint16_t timerVal);
-void TCB0_ClearCaptInterruptFlag(void);
-bool TCB0_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/tcb1.h b/non-inverting-pga.X/mcc_generated_files/include/tcb1.h
deleted file mode 100644
index 7bed96b..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/tcb1.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB1_H_INCLUDED
-#define TCB1_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB1_cb_t)(void);
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb);
-void TCB1_SetOvfIsrCallback(TCB1_cb_t cb);
-int8_t TCB1_Initialize();
-void TCB1_EnableCaptInterrupt(void);
-void TCB1_DisableCaptInterrupt(void);
-uint16_t TCB1_ReadTimer(void);
-void TCB1_WriteTimer(uint16_t timerVal);
-void TCB1_ClearCaptInterruptFlag(void);
-bool TCB1_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/usart3.h b/non-inverting-pga.X/mcc_generated_files/include/usart3.h
deleted file mode 100644
index b1b355f..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/usart3.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef USART3_H_INCLUDED
-#define USART3_H_INCLUDED
-
-#include
-#include
-#include "../utils/compiler.h"
-#include "../utils/atomic.h"
-#include "../config/clock_config.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Normal Mode, Baud register value */
-#define USART3_BAUD_RATE(BAUD_RATE) (((float)24000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
-
-/* USART3 Ringbuffer */
-
-#define USART3_RX_BUFFER_SIZE 8
-#define USART3_TX_BUFFER_SIZE 8
-#define USART3_RX_BUFFER_MASK (USART3_RX_BUFFER_SIZE - 1)
-#define USART3_TX_BUFFER_MASK (USART3_TX_BUFFER_SIZE - 1)
-
-typedef enum { USART3_RX_CB = 1, USART3_TX_CB } usart3_cb_t;
-typedef void (*usart_callback)(void);
-
-/**
- * \brief Initialize USART interface
- * If module is configured to disabled state, the clock to the USART is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the USART init was successful
- * \retval 1 the USART init was not successful
- */
-void USART3_Initialize();
-
-/**
- * \brief Enable RX and TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX and TX enable-bits in the USART control register
- *
- * \return Nothing
- */
-void USART3_Enable();
-
-/**
- * \brief Enable RX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableRx();
-
-/**
- * \brief Enable TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the TX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableTx();
-
-/**
- * \brief Disable USART3
- * 1. Disables the USART module by clearing the enable-bit(s) in the USART control register
- * 2. If supported by the clock system, disables the clock to the USART
- *
- * \return Nothing
- */
-void USART3_Disable();
-
-/**
- * \brief Get recieved data from USART3
- *
- * \return Data register from USART3 module
- */
-uint8_t USART3_GetData();
-
-/**
- * \brief Check if the usart can accept data to be transmitted
- *
- * \return The status of USART TX data ready check
- * \retval false The USART can not receive data to be transmitted
- * \retval true The USART can receive data to be transmitted
- */
-bool USART3_IsTxReady();
-
-/**
- * \brief Check if the USART has received data
- *
- * \return The status of USART RX data ready check
- * \retval true The USART has received data
- * \retval false The USART has not received data
- */
-bool USART3_IsRxReady();
-
-/**
- * \brief Check if USART3 data is transmitted
- *
- * \return Receiver ready status
- * \retval true Data is not completely shifted out of the shift register
- * \retval false Data completely shifted out if the USART shift register
- */
-bool USART3_IsTxBusy();
-
-
-
-bool USART3_IsTxDone();
-/**
- * \brief Read one character from USART3
- *
- * Function will block if a character is not available.
- *
- * \return Data read from the USART3 module
- */
-uint8_t USART3_Read(void);
-
-/**
- * \brief Write one character to USART3
- *
- * Function will block until a character can be accepted.
- *
- * \param[in] data The character to write to the USART
- *
- * \return Nothing
- */
-void USART3_Write(const uint8_t data);
-
-/**
- * \brief Set call back function for USART3
- *
- * \param[in] cb The call back function to set
- *
- * \param[in] type The type of ISR to be set
- *
- * \return Nothing
- */
-
-void USART3_DefaultRxIsrCb(void);
-
-void USART3_DefaultTxIsrCb(void);
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type);
-
-void USART3_SetRXISRCb(usart_callback cb);
-
-void USART3_SetTXISRCb(usart_callback cb);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* USART3_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/include/vref.h b/non-inverting-pga.X/mcc_generated_files/include/vref.h
deleted file mode 100644
index 9002df4..0000000
--- a/non-inverting-pga.X/mcc_generated_files/include/vref.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef VREF_H_INCLUDED
-#define VREF_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- @Summary
- Initializes the VREF_Initialize.
-
- @Description
- This routine initializes the VREF_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- VREF_Initialize();
-
-*/
-int8_t VREF_Initialize(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CCL_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/mcc.c b/non-inverting-pga.X/mcc_generated_files/mcc.c
deleted file mode 100644
index e77c74d..0000000
--- a/non-inverting-pga.X/mcc_generated_files/mcc.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "mcc.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void)
-{
- PIN_MANAGER_Initialize();
- //CPU_Initialize();
- BOD_Initialize();
- WDT_Initialize();
- CLKCTRL_Initialize();
- SLPCTRL_Initialize();
- OPAMP_Initialize();
- ADC0_Initialize();
- DAC0_Initialize();
- RTC_Initialize();
- TCB0_Initialize();
- USART3_Initialize();
- VREF_Initialize();
- CPUINT_Initialize();
- TCB1_Initialize();
-}
-
-/**
- * \brief Initialize bod interface
- */
-int8_t BOD_Initialize()
-{
- //SLEEP DIS;
- ccp_write_io((void*)&(BOD.CTRLA),0x00);
-
- //VLMCFG FALLING; VLMIE disabled;
- BOD.INTCTRL = 0x00;
-
- //VLMLVL OFF;
- BOD.VLMCTRLA = 0x00;
-
- return 0;
-}
-
-ISR(BOD_VLM_vect)
-{
- /* Insert your AC interrupt handling code here */
-
- /* The interrupt flag has to be cleared manually */
- BOD.INTFLAGS = BOD_VLMIE_bm;
-}
-
-/**
- * \brief Initialize clkctrl interface
- */
-int8_t CLKCTRL_Initialize()
-{
- //RUNSTDBY disabled;
- ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0x00);
-
- //RUNSTDBY disabled; CSUT 1K; SEL disabled; LPMODE disabled; ENABLE disabled;
- ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),0x00);
-
- //PDIV 6X; PEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),0x10);
-
- //CFDSRC CLKMAIN; CFDTST disabled; CFDEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),0x00);
-
- //INTTYPE INT; CFD disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),0x00);
-
- //CLKOUT disabled; CLKSEL OSCHF;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),0x00);
-
- //PLLS disabled; EXTS disabled; XOSC32KS disabled; OSC32KS disabled; OSCHFS disabled; SOSC disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKSTATUS),0x00);
-
- //RUNSTDBY disabled; FREQSEL 24M; AUTOTUNE disabled;
- ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),0x24);
-
- return 0;
-}
-
-/**
- * \brief Initialize slpctrl interface
- */
-int8_t SLPCTRL_Initialize()
-{
- //SMODE IDLE; SEN disabled;
- ccp_write_io((void*)&(SLPCTRL.CTRLA),0x00);
-
- return 0;
-}
-
-/**
- * \brief Initialize wdt interface
- */
-
-int8_t WDT_Initialize()
-{
- //WINDOW OFF; PERIOD OFF;
- ccp_write_io((void*)&(WDT.CTRLA),0x00);
-
- return 0;
-}
-/*TODO comment will remove once complier support will be available.
-int8_t CPU_Initialize()
-{
- return 0;
-
-}
-*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/mcc.h b/non-inverting-pga.X/mcc_generated_files/mcc.h
deleted file mode 100644
index f89ead4..0000000
--- a/non-inverting-pga.X/mcc_generated_files/mcc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef MCC_H
-#define MCC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "utils/compiler.h"
-#include "include/pin_manager.h"
-#include "include/cpuint.h"
-#include "include/opamp.h"
-#include "include/dac0.h"
-#include "include/tcb0.h"
-#include "include/tcb1.h"
-#include "include/vref.h"
-#include "include/usart3.h"
-#include "include/rtc.h"
-#include "include/adc0.h"
-#include "config/clock_config.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void);
-int8_t BOD_Initialize();
-int8_t CLKCTRL_Initialize();
-int8_t SLPCTRL_Initialize();
-int8_t WDT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* MCC_H */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/opamp/opamp.h b/non-inverting-pga.X/mcc_generated_files/opamp/opamp.h
new file mode 100644
index 0000000..fd05eb1
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/opamp/opamp.h
@@ -0,0 +1,109 @@
+/**
+ * OPAMP Generated Driver API Header File
+ *
+ * @file opamp.h
+ *
+ * @defgroup opamp OPAMP
+ *
+ * @brief This file contains API prototypes and other datatypes for the OPAMP module.
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef OPAMP_H_INCLUDED
+#define OPAMP_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+#include
+
+#define OPAMP_TIMEBASE_VALUE (3)
+
+/**
+ * @ingroup opamp
+ * @brief This routine initializes the OPAMP and must be called before any other OPAMP routine is called.
+ * This routine should only be called once during system initialization.
+ * @param void
+ * @return void
+ */
+void OPAMP_Initialize(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine enables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_EnableSystem(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine disables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_DisableSystem(void);
+
+//OP0 Non-Inverting Programmable Gain Amplifier APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets the R1 and R2 values of OP0's internal resistor ladder as per user selection
+ * @param value - esired resistor selection. For the available resistor values, refer to OPAMP_MUXWIP_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP0SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP0's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP0 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP0Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
+
+#endif /* OPAMP_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/opamp/src/opamp.c b/non-inverting-pga.X/mcc_generated_files/opamp/src/opamp.c
new file mode 100644
index 0000000..6937d5b
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/opamp/src/opamp.c
@@ -0,0 +1,132 @@
+/**
+ * OPAMP Generated Driver File
+ *
+ * @file opamp.c
+ *
+ * @ingroup opamp
+ *
+ * @brief This is the generated driver implementation file for the OPAMP driver using AVR MCUs
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../opamp.h"
+
+void OPAMP_Initialize(void)
+{
+ OPAMP_DisableSystem();
+
+ //TIMEBASE 3;
+ OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
+
+ //DBGRUN disabled;
+ OPAMP.DBGCTRL = 0x0;
+
+ //IRSEL FULL;
+ OPAMP.PWRCTRL = 0x0;
+
+ //OP0 Configuration : Non-Inverting Programmable Gain Amplifier
+ //OP0 Gain : 2
+
+ //MUXNEG Wiper from OPn's resistor ladder; MUXPOS DAC output;
+ OPAMP.OP0INMUX = 0x12;
+
+ //MUXBOT Ground; MUXTOP OPn output; MUXWIP R1 = 8R, R2 = 8R, R2/R1 = 1;
+ OPAMP.OP0RESMUX = 0x75;
+
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP0CTRLA = 0x5;
+
+ //SETTLE 127;
+ OPAMP.OP0SETTLE = 0x7F;
+
+ //OP1 Configuration : Connected Directly to Pins
+
+ //MUXNEG Negative input pin for OPn; MUXPOS Positive input pin for OPn;
+ OPAMP.OP1INMUX = 0x0;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP1RESMUX = 0x0;
+
+ //ALWAYSON disabled; EVENTEN enabled; OUTMODE Output Driver Off; RUNSTBY disabled;
+ OPAMP.OP1CTRLA = 0x2;
+
+ //SETTLE 127;
+ OPAMP.OP1SETTLE = 0x7F;
+
+ //OP2 Configuration : Connected Directly to Pins
+
+ //MUXNEG Negative input pin for OPn; MUXPOS Positive input pin for OPn;
+ OPAMP.OP2INMUX = 0x0;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP2RESMUX = 0x0;
+
+ //ALWAYSON disabled; EVENTEN enabled; OUTMODE Output Driver Off; RUNSTBY disabled;
+ OPAMP.OP2CTRLA = 0x2;
+
+ //SETTLE 127;
+ OPAMP.OP2SETTLE = 0x7F;
+
+ OPAMP_EnableSystem();
+}
+
+void OPAMP_EnableSystem(void)
+{
+ OPAMP.CTRLA |= OPAMP_ENABLE_bm;
+}
+
+void OPAMP_DisableSystem(void)
+{
+ OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
+}
+
+//OP0 Non-Inverting Programmable Gain Amplifier APIs
+
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
+{
+ OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
+}
+
+void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value)
+{
+ OPAMP.OP0RESMUX = (OPAMP.OP0RESMUX & ~OPAMP_MUXWIP_gm) | value;
+}
+
+void OPAMP_SetOP0SettleTime(uint8_t settleTime)
+{
+ if (settleTime > 127) {
+ settleTime = 127;
+ }
+ OPAMP.OP0SETTLE = settleTime;
+}
+
+bool OPAMP_IsOP0Settled(void)
+{
+ return OPAMP.OP0STATUS > 0;
+}
+
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
+{
+ OPAMP.OP0CAL = calValue;
+}
diff --git a/non-inverting-pga.X/mcc_generated_files/src/adc0.c b/non-inverting-pga.X/mcc_generated_files/src/adc0.c
deleted file mode 100644
index 5d865cd..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/adc0.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/adc0.h"
-
-adc_irq_cb_t ADC0_window_cb = NULL;
-
-/**
- * \brief Initialize ADC interface
- */
-int8_t ADC0_Initialize()
-{
-
- //SAMPNUM ACC8;
- ADC0.CTRLB = 0x03;
-
- //PRESC DIV12;
- ADC0.CTRLC = 0x03;
-
- //INITDLY DLY0; SAMPDLY DLY0;
- ADC0.CTRLD = 0x00;
-
- //WINCM NONE;
- ADC0.CTRLE = 0x00;
-
- //DBGRUN disabled;
- ADC0.DBGCTRL = 0x00;
-
- //STARTEI disabled;
- ADC0.EVCTRL = 0x00;
-
- //WCMP disabled; RESRDY enabled;
- ADC0.INTCTRL = 0x01;
-
- //MUXPOS AIN2;
- ADC0.MUXPOS = 0x02;
-
- //MUXNEG AIN0;
- ADC0.MUXNEG = 0x00;
-
- //SAMPLEN 1;
- ADC0.SAMPCTRL = 0x01;
-
- // Window comparator high threshold
- ADC0.WINHT = 0x00;
-
- // Window comparator low threshold
- ADC0.WINLT = 0x00;
-
- //RUNSTBY disabled; CONVMODE disabled; LEFTADJ disabled; RESSEL 10BIT; FREERUN disabled; ENABLE enabled;
- ADC0.CTRLA = 0x05;
-
-
- return 0;
-}
-
-void ADC0_Enable()
-{
- ADC0.CTRLA |= ADC_ENABLE_bm;
-}
-
-void ADC0_Disable()
-{
- ADC0.CTRLA &= ~ADC_ENABLE_bm;
-}
-
-void ADC0_EnableAutoTrigger()
-{
- ADC0.EVCTRL |= ADC_STARTEI_bm;
-}
-
-void ADC0_DisableAutoTrigger()
-{
- ADC0.EVCTRL &= ~ADC_STARTEI_bm;
-}
-
-void ADC0_SetWindowHigh(adc_result_t high)
-{
- ADC0.WINHT = high;
-}
-
-void ADC0_SetWindowLow(adc_result_t low)
-{
- ADC0.WINLT = low;
-}
-
-void ADC0_SetWindowMode(adc0_window_mode_t mode)
-{
- ADC0.CTRLE = mode;
-}
-
-void ADC0_SetWindowChannel(adc_0_channel_t channel)
-{
- ADC0.MUXPOS = channel;
-}
-
-void ADC0_StartConversion(adc_0_channel_t channel)
-{
- ADC0.CTRLA &= ~ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- ADC0.CTRLA |= ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.MUXNEG = channel1;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StopConversion()
-{
- ADC0.COMMAND = ADC_SPCONV_bm;
-}
-
-bool ADC0_IsConversionDone()
-{
- return (ADC0.INTFLAGS & ADC_RESRDY_bm);
-}
-
-adc_result_t ADC0_GetConversionResult(void)
-{
- return (ADC0.RES);
-}
-
-bool ADC0_GetWindowResult(void)
-{
- bool temp = (ADC0.INTFLAGS & ADC_WCMP_bm);
- ADC0.INTFLAGS = ADC_WCMP_bm; // Clear intflag if set
- return temp;
-}
-
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel)
-{
- adc_result_t res;
-
- ADC0_StartConversion(channel);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
- return res;
-}
-
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- diff_adc_result_t res;
-
- ADC0_StartDiffConversion(channel, channel1);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS |= ADC_RESRDY_bm;
- return res;
-}
-
-uint8_t ADC0_GetResolution()
-{
- return (ADC0.CTRLA & ADC_RESSEL0_bm) ? 10 : 12;
-}
-
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f)
-{
- ADC0_window_cb = f;
-}
-
-ISR(ADC0_WCMP_vect)
-{
-
- if (ADC0_window_cb != NULL) {
- ADC0_window_cb();
- }
-
- // Clear the interrupt flag
- ADC0.INTFLAGS = ADC_WCMP_bm;
-}
-
-//ISR(ADC0_RESRDY_vect)
-//{
-// /* Insert your ADC result ready interrupt handling code here *///
-//
-// /* The interrupt flag has to be cleared manually */
-// ADC0.INTFLAGS = ADC_RESRDY_bm;
-//}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/src/cpuint.c b/non-inverting-pga.X/mcc_generated_files/src/cpuint.c
deleted file mode 100644
index ea41199..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/cpuint.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/cpuint.h"
-
-/**
- * \brief Initialize cpuint interface
- */
-int8_t CPUINT_Initialize()
-{
- /* IVSEL and CVT are Configuration Change Protected */
-
- //IVSEL disabled; CVT disabled; LVL0RR disabled;
- ccp_write_io((void*)&(CPUINT.CTRLA),0x00);
-
- //LVL0PRI 0;
- CPUINT.LVL0PRI = 0x00;
-
- //LVL1VEC 0;
- CPUINT.LVL1VEC = 0x00;
-
- ENABLE_INTERRUPTS();
-
- return 0;
-}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/src/dac0.c b/non-inverting-pga.X/mcc_generated_files/src/dac0.c
deleted file mode 100644
index 1aba646..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/dac0.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-
-#include "../include/dac0.h"
-/**
- * \brief Initialize DAC interface
- */
-int8_t DAC0_Initialize()
-{
- //RUNSTDBY disabled; OUTEN enabled; ENABLE enabled;
- DAC0.CTRLA = 0x41;
-
- //DATA 0;
- DAC0.DATA = 0x00;
-
- return 0;
-}
-
-void DAC0_Enable()
-{
- DAC0.CTRLA |= DAC_ENABLE_bm;
-}
-
-void DAC0_Disable()
-{
- DAC0.CTRLA &= ~DAC_ENABLE_bm;
-}
-
-void DAC0_SetOutput(dac_resolution_t value)
-{
- value = value << DAC_DATA_gp;
- value = value & 0xFFC0;
- DAC0.DATA = value;
-}
-
-uint8_t DAC0_GetResolution()
-{
- return 10;
-}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/src/opamp.c b/non-inverting-pga.X/mcc_generated_files/src/opamp.c
deleted file mode 100644
index f6ecf3f..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/opamp.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#include "../include/opamp.h"
-
-void OPAMP_Initialize()
-{
- OPAMP_DisableSystem();
-
- //TIMEBASE 23;
- OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
-
- //DBGRUN disabled;
- OPAMP.DBGCTRL = 0x00;
-
- //IRSEL FULL;
- OPAMP.PWRCTRL = 0x00;
-
- //OP0 Configuration : Non-Inverting Programmable Gain Amplifier
- //OP0 Gain : 2.0
-
- //MUXNEG WIP; MUXPOS DAC;
- OPAMP.OP0INMUX = 0x12;
-
- //MUXWIP WIP3; MUXBOT GND; MUXTOP OUT;
- OPAMP.OP0RESMUX = 0x75;
-
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP0CTRLA = 0x05;
-
- //SETTLE 127;
- OPAMP.OP0SETTLE = 0x7F;
-
- //OP1 Configuration : Connected Directly to Pins
-
- //MUXNEG INN; MUXPOS INP;
- OPAMP.OP1INMUX = 0x00;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP1RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE OFF; EVENTEN enabled; ALWAYSON disabled;
- OPAMP.OP1CTRLA = 0x02;
-
- //SETTLE 127;
- OPAMP.OP1SETTLE = 0x7F;
-
- //OP2 Configuration : Connected Directly to Pins
-
- //MUXNEG INN; MUXPOS INP;
- OPAMP.OP2INMUX = 0x00;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP2RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE OFF; EVENTEN enabled; ALWAYSON disabled;
- OPAMP.OP2CTRLA = 0x02;
-
- //SETTLE 127;
- OPAMP.OP2SETTLE = 0x7F;
-
- OPAMP_EnableSystem();
-}
-
-void OPAMP_EnableSystem(void)
-{
- OPAMP.CTRLA |= OPAMP_ENABLE_bm;
-}
-
-void OPAMP_DisableSystem(void)
-{
- OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
-}
-
-//OP0 Non-Inverting Programmable Gain Amplifier APIs
-
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
-{
- OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
-}
-
-void OPAMP_SetOP0WiperResMux(OPAMP_OP0RESMUX_MUXWIP_t value)
-{
- OPAMP.OP0RESMUX = (OPAMP.OP0RESMUX & ~OPAMP_MUXWIP_gm) | value;
-}
-
-void OPAMP_SetOP0SettleTime(uint8_t settleTime)
-{
- if (settleTime > 127) {
- settleTime = 127;
- }
- OPAMP.OP0SETTLE = settleTime;
-}
-
-bool OPAMP_IsOP0Settled(void)
-{
- return OPAMP.OP0STATUS > 0;
-}
-
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
-{
- OPAMP.OP0CAL = calValue;
-}
diff --git a/non-inverting-pga.X/mcc_generated_files/src/pin_manager.c b/non-inverting-pga.X/mcc_generated_files/src/pin_manager.c
deleted file mode 100644
index 034dab3..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/pin_manager.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/pin_manager.h"
-static void (*PORTB_LED0_InterruptHandler)(void);
-static void (*PORTA_PA2_InterruptHandler)(void);
-static void (*PORTA_PA3_InterruptHandler)(void);
-static void (*PORTD_PD6_InterruptHandler)(void);
-static void (*PORTB_PB1_InterruptHandler)(void);
-static void (*PORTD_PD2_InterruptHandler)(void);
-static void (*PORTB_PB0_InterruptHandler)(void);
-
-void PORT_Initialize(void);
-
-void PIN_MANAGER_Initialize()
-{
- PORT_Initialize();
-
- /* DIR Registers Initialization */
- PORTA.DIR = 0x0C;
- PORTB.DIR = 0x09;
- PORTC.DIR = 0x00;
- PORTD.DIR = 0x44;
- PORTE.DIR = 0x00;
- PORTF.DIR = 0x00;
-
- /* OUT Registers Initialization */
- PORTA.OUT = 0x00;
- PORTB.OUT = 0x00;
- PORTC.OUT = 0x00;
- PORTD.OUT = 0x00;
- PORTE.OUT = 0x00;
- PORTF.OUT = 0x00;
-
- /* PINxCTRL registers Initialization */
- PORTA.PIN0CTRL = 0x00;
- PORTA.PIN1CTRL = 0x00;
- PORTA.PIN2CTRL = 0x00;
- PORTA.PIN3CTRL = 0x00;
- PORTA.PIN4CTRL = 0x00;
- PORTA.PIN5CTRL = 0x00;
- PORTA.PIN6CTRL = 0x00;
- PORTA.PIN7CTRL = 0x00;
- PORTB.PIN0CTRL = 0x00;
- PORTB.PIN1CTRL = 0x00;
- PORTB.PIN2CTRL = 0x00;
- PORTB.PIN3CTRL = 0x00;
- PORTB.PIN4CTRL = 0x00;
- PORTB.PIN5CTRL = 0x00;
- PORTB.PIN6CTRL = 0x00;
- PORTB.PIN7CTRL = 0x00;
- PORTC.PIN0CTRL = 0x00;
- PORTC.PIN1CTRL = 0x00;
- PORTC.PIN2CTRL = 0x00;
- PORTC.PIN3CTRL = 0x00;
- PORTC.PIN4CTRL = 0x00;
- PORTC.PIN5CTRL = 0x00;
- PORTC.PIN6CTRL = 0x00;
- PORTC.PIN7CTRL = 0x00;
- PORTD.PIN0CTRL = 0x00;
- PORTD.PIN1CTRL = 0x04;
- PORTD.PIN2CTRL = 0x04;
- PORTD.PIN3CTRL = 0x04;
- PORTD.PIN4CTRL = 0x04;
- PORTD.PIN5CTRL = 0x00;
- PORTD.PIN6CTRL = 0x04;
- PORTD.PIN7CTRL = 0x04;
- PORTE.PIN0CTRL = 0x00;
- PORTE.PIN1CTRL = 0x04;
- PORTE.PIN2CTRL = 0x00;
- PORTE.PIN3CTRL = 0x04;
- PORTE.PIN4CTRL = 0x00;
- PORTE.PIN5CTRL = 0x00;
- PORTE.PIN6CTRL = 0x00;
- PORTE.PIN7CTRL = 0x00;
- PORTF.PIN0CTRL = 0x00;
- PORTF.PIN1CTRL = 0x00;
- PORTF.PIN2CTRL = 0x00;
- PORTF.PIN3CTRL = 0x00;
- PORTF.PIN4CTRL = 0x00;
- PORTF.PIN5CTRL = 0x00;
- PORTF.PIN6CTRL = 0x00;
- PORTF.PIN7CTRL = 0x00;
-
- /* Multi-pin Config registers Initialization */
- PORTA.PINCONFIG = 0x00;
- PORTA.PINCTRLCLR = 0x00;
- PORTA.PINCTRLSET = 0x00;
- PORTA.PINCTRLUPD = 0x00;
- PORTB.PINCONFIG = 0x00;
- PORTB.PINCTRLCLR = 0x00;
- PORTB.PINCTRLSET = 0x00;
- PORTB.PINCTRLUPD = 0x00;
- PORTC.PINCONFIG = 0x00;
- PORTC.PINCTRLCLR = 0x00;
- PORTC.PINCTRLSET = 0x00;
- PORTC.PINCTRLUPD = 0x00;
- PORTD.PINCONFIG = 0x00;
- PORTD.PINCTRLCLR = 0x00;
- PORTD.PINCTRLSET = 0x00;
- PORTD.PINCTRLUPD = 0x00;
- PORTE.PINCONFIG = 0x00;
- PORTE.PINCTRLCLR = 0x00;
- PORTE.PINCTRLSET = 0x00;
- PORTE.PINCTRLUPD = 0x00;
- PORTF.PINCONFIG = 0x00;
- PORTF.PINCTRLCLR = 0x00;
- PORTF.PINCTRLSET = 0x00;
- PORTF.PINCTRLUPD = 0x00;
-
- /* PORTMUX Initialization */
- PORTMUX.ACROUTEA = 0x00;
- PORTMUX.CCLROUTEA = 0x00;
- PORTMUX.EVSYSROUTEA = 0x00;
- PORTMUX.SPIROUTEA = 0x00;
- PORTMUX.TCAROUTEA = 0x00;
- PORTMUX.TCBROUTEA = 0x00;
- PORTMUX.TCDROUTEA = 0x00;
- PORTMUX.TWIROUTEA = 0x00;
- PORTMUX.USARTROUTEA = 0x00;
- PORTMUX.USARTROUTEB = 0x00;
- PORTMUX.ZCDROUTEA = 0x00;
-
- // register default ISC callback functions at runtime; use these methods to register a custom function
- PORTB_LED0_SetInterruptHandler(PORTB_LED0_DefaultInterruptHandler);
- PORTA_PA2_SetInterruptHandler(PORTA_PA2_DefaultInterruptHandler);
- PORTA_PA3_SetInterruptHandler(PORTA_PA3_DefaultInterruptHandler);
- PORTD_PD6_SetInterruptHandler(PORTD_PD6_DefaultInterruptHandler);
- PORTB_PB1_SetInterruptHandler(PORTB_PB1_DefaultInterruptHandler);
- PORTD_PD2_SetInterruptHandler(PORTD_PD2_DefaultInterruptHandler);
- PORTB_PB0_SetInterruptHandler(PORTB_PB0_DefaultInterruptHandler);
-}
-
-void PORT_Initialize(void)
-{
- /* On AVR devices all peripherals are enable from power on reset, this
- * disables all peripherals to save power. Driver shall enable
- * peripheral if used */
-
- /* Set all pins to low power mode */
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
-}
-
-/**
- Allows selecting an interrupt handler for PORTB_LED0 at application runtime
-*/
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_LED0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_LED0_DefaultInterruptHandler(void)
-{
- // add your PORTB_LED0 interrupt custom code
- // or set custom function using PORTB_LED0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA2 at application runtime
-*/
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA2_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA2_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA2 interrupt custom code
- // or set custom function using PORTA_PA2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA3 at application runtime
-*/
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA3_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA3_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA3 interrupt custom code
- // or set custom function using PORTA_PA3_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD6 at application runtime
-*/
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD6_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD6_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD6 interrupt custom code
- // or set custom function using PORTD_PD6_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB1 at application runtime
-*/
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB1_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB1_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB1 interrupt custom code
- // or set custom function using PORTB_PB1_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD2 at application runtime
-*/
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD2_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD2_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD2 interrupt custom code
- // or set custom function using PORTD_PD2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB0 at application runtime
-*/
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB0_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB0 interrupt custom code
- // or set custom function using PORTB_PB0_SetInterruptHandler()
-}
diff --git a/non-inverting-pga.X/mcc_generated_files/src/rtc.c b/non-inverting-pga.X/mcc_generated_files/src/rtc.c
deleted file mode 100644
index 11771a9..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/rtc.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/rtc.h"
-
-/**
- * \brief Initialize rtc interface
- *
- * \return Initialization status.
- */
-
-void (*RTC_OVF_isr_cb)(void) = NULL;
-void (*RTC_CMP_isr_cb)(void) = NULL;
-void (*RTC_PIT_isr_cb)(void) = NULL;
-
-/**
- * \brief Initialize RTC interface
- */
-int8_t RTC_Initialize()
-{
- while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
- }
- //Compare
- RTC.CMP = 0x00;
-
- //Count
- RTC.CNT = 0x00;
-
- //Period
- RTC.PER = 0x3FF;
-
- //Clock selection
- RTC.CLKSEL = 0x00;
-
- //CMP disabled; OVF enabled;
- RTC.INTCTRL = 0x01;
-
- //RUNSTDBY disabled; PRESCALER DIV32; CORREN disabled; RTCEN enabled;
- RTC.CTRLA = 0x29;
-
- while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
- }
- //PI disabled;
- RTC.PITINTCTRL = 0x00;
-
-
- return 0;
-}
-
-void RTC_SetOVFIsrCallback(RTC_cb_t cb)
-{
- RTC_OVF_isr_cb = cb;
-}
-
-void RTC_SetCMPIsrCallback(RTC_cb_t cb)
-{
- RTC_CMP_isr_cb = cb;
-}
-
-void RTC_SetPITIsrCallback(RTC_cb_t cb)
-{
- RTC_PIT_isr_cb = cb;
-}
-
-ISR(RTC_CNT_vect)
-{
- if (RTC.INTFLAGS & RTC_OVF_bm )
- {
- if (RTC_OVF_isr_cb != NULL)
- {
- (*RTC_OVF_isr_cb)();
- }
- }
-
- if (RTC.INTFLAGS & RTC_CMP_bm )
- {
- if (RTC_CMP_isr_cb != NULL)
- {
- (*RTC_CMP_isr_cb)();
- }
- }
- RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
-}
-
-ISR(RTC_PIT_vect)
-{
- if (RTC_PIT_isr_cb != NULL)
- {
- (*RTC_PIT_isr_cb)();
- }
- RTC.PITINTFLAGS = RTC_PI_bm;
-}
-
-inline void RTC_WriteCounter(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_CNTBUSY_bm);
- RTC.CNT = timerVal;
-}
-
-inline uint16_t RTC_ReadCounter(void)
-{
- return RTC.CNT;
-}
-
-inline void RTC_WritePeroid(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_PERBUSY_bm);
- RTC.PER = timerVal;
-}
-
-inline uint16_t RTC_ReadPeriod(void)
-{
- return RTC.PER;
-}
-
-inline void RTC_EnableCMPInterrupt(void)
-{
- RTC.INTCTRL |= RTC_CMP_bm;
-}
-
-inline void RTC_DisableCMPInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_CMP_bm;
-}
-
-inline void RTC_EnableOVFInterrupt(void)
-{
- RTC.INTCTRL |= RTC_OVF_bm;
-}
-
-inline void RTC_DisableOVFInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_OVF_bm;
-}
-
-inline void RTC_EnablePITInterrupt(void)
-{
- RTC.PITINTCTRL |= RTC_PI_bm;
-}
-
-inline void RTC_DisablePITInterrupt(void)
-{
- RTC.PITINTCTRL &= ~RTC_PI_bm;
-}
-
-inline void RTC_ClearOVFInterruptFlag(void)
-{
- RTC.INTFLAGS &= ~RTC_OVF_bm;
-}
-
-inline bool RTC_IsOVFInterruptEnabled(void)
-{
- return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
-}
diff --git a/non-inverting-pga.X/mcc_generated_files/src/tcb0.c b/non-inverting-pga.X/mcc_generated_files/src/tcb0.c
deleted file mode 100644
index 368d94a..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/tcb0.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb0.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB0_CAPT_isr_cb)(void) = NULL;
-
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb)
-{
- TCB0_CAPT_isr_cb = cb;
-}
-
-ISR(TCB0_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB0.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB0_CAPT_isr_cb != NULL)
- {
- (*TCB0_CAPT_isr_cb)();
- }
-
- TCB0.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB0_Initialize()
-{
- //Compare or Capture
- TCB0.CCMP = 0x284F;
-
- //Count
- TCB0.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB0.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB0.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB0.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB0.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB0.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB0.TEMP = 0x00;
-
- //RUNSTDBY enabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB0.CTRLA = 0x41;
-
- return 0;
-}
-
-void TCB0_WriteTimer(uint16_t timerVal)
-{
- TCB0.CNT=timerVal;
-}
-
-uint16_t TCB0_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB0.CNT;
-
- return readVal;
-}
-
-void TCB0_EnableCaptInterrupt(void)
-{
- TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB0_DisableCaptInterrupt(void)
-{
- TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB0_ClearCaptInterruptFlag(void)
-{
- TCB0.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB0_IsCaptInterruptEnabled(void)
-{
- return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/non-inverting-pga.X/mcc_generated_files/src/tcb1.c b/non-inverting-pga.X/mcc_generated_files/src/tcb1.c
deleted file mode 100644
index 5146d75..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/tcb1.c
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb1.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-void (*TCB1_CAPT_isr_cb)(void) = NULL;
-
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb)
-{
- TCB1_CAPT_isr_cb = cb;
-}
-
-ISR(TCB1_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB1.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB1_CAPT_isr_cb != NULL)
- {
- (*TCB1_CAPT_isr_cb)();
- }
-
- TCB1.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB1_Initialize()
-{
- //Compare or Capture
- TCB1.CCMP = 0x752F;
-
- //Count
- TCB1.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN enabled; CNTMODE INT;
- TCB1.CTRLB = 0x10;
-
- //DBGRUN disabled;
- TCB1.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB1.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB1.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB1.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB1.TEMP = 0x00;
-
- //RUNSTDBY disabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB1.CTRLA = 0x01;
-
- return 0;
-}
-
-void TCB1_WriteTimer(uint16_t timerVal)
-{
- TCB1.CNT=timerVal;
-}
-
-uint16_t TCB1_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB1.CNT;
-
- return readVal;
-}
-
-void TCB1_EnableCaptInterrupt(void)
-{
- TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB1_DisableCaptInterrupt(void)
-{
- TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB1_ClearCaptInterruptFlag(void)
-{
- TCB1.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB1_IsCaptInterruptEnabled(void)
-{
- return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
-
diff --git a/non-inverting-pga.X/mcc_generated_files/src/usart3.c b/non-inverting-pga.X/mcc_generated_files/src/usart3.c
deleted file mode 100644
index 908fe38..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/usart3.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/usart3.h"
-
-#if defined(__GNUC__)
-
-int USART3_printCHAR(char character, FILE *stream)
-{
- USART3_Write(character);
- return 0;
-}
-
-FILE USART3_stream = FDEV_SETUP_STREAM(USART3_printCHAR, NULL, _FDEV_SETUP_WRITE);
-
-#elif defined(__ICCAVR__)
-
-int putchar(int outChar)
-{
- USART3_Write(outChar);
- return outChar;
-}
-#endif
-
-/* Static Variables holding the ringbuffer used in IRQ mode */
-static uint8_t USART3_rxbuf[USART3_RX_BUFFER_SIZE];
-static volatile uint8_t USART3_rx_head;
-static volatile uint8_t USART3_rx_tail;
-static volatile uint8_t USART3_rx_elements;
-static uint8_t USART3_txbuf[USART3_TX_BUFFER_SIZE];
-static volatile uint8_t USART3_tx_head;
-static volatile uint8_t USART3_tx_tail;
-static volatile uint8_t USART3_tx_elements;
-
-void (*USART3_rx_isr_cb)(void) = &USART3_DefaultRxIsrCb;
-
-void (*USART3_tx_isr_cb)(void) = &USART3_DefaultTxIsrCb;
-
-void USART3_DefaultRxIsrCb(void)
-{
- uint8_t data;
- uint8_t tmphead;
-
- /* Read the received data */
- data = USART3.RXDATAL;
- /* Calculate buffer index */
- tmphead = (USART3_rx_head + 1) & USART3_RX_BUFFER_MASK;
-
- if (tmphead == USART3_rx_tail) {
- /* ERROR! Receive buffer overflow */
- }else {
- /*Store new index*/
- USART3_rx_head = tmphead;
-
- /* Store received data in buffer */
- USART3_rxbuf[tmphead] = data;
- USART3_rx_elements++;
- }
-}
-
-void USART3_DefaultTxIsrCb(void)
-{
- uint8_t tmptail;
-
- /* Check if all data is transmitted */
- if (USART3_tx_elements != 0) {
- /* Calculate buffer index */
- tmptail = (USART3_tx_tail + 1) & USART3_TX_BUFFER_MASK;
- /* Store new index */
- USART3_tx_tail = tmptail;
- /* Start transmission */
- USART3.TXDATAL = USART3_txbuf[tmptail];
-
- USART3_tx_elements--;
- }
-
- if (USART3_tx_elements == 0) {
- /* Disable Tx interrupt */
- USART3.CTRLA &= ~(1 << USART_DREIE_bp);
- }
-}
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type)
-{
- switch (type) {
- case USART3_RX_CB:
- USART3_rx_isr_cb = cb;
- break;
- case USART3_TX_CB:
- USART3_tx_isr_cb = cb;
- break;
- default:
- // do nothing
- break;
- }
-}
-
-void USART3_SetRXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_RX_CB);
-}
-
-void USART3_SetTXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_TX_CB);
-}
-
-/* Interrupt service routine for RX complete */
-ISR(USART3_RXC_vect)
-{
- if (USART3_rx_isr_cb != NULL)
- {
- (*USART3_rx_isr_cb)();
- }
-}
-
-/* Interrupt service routine for Data Register Empty */
-ISR(USART3_DRE_vect)
-{
- if (USART3_tx_isr_cb != NULL)
- {
- (*USART3_tx_isr_cb)();
- }
-}
-
-ISR(USART3_TXC_vect)
-{
- USART3.STATUS |= USART_TXCIF_bm;
-}
-
-bool USART3_IsTxReady()
-{
- return (USART3_tx_elements != USART3_TX_BUFFER_SIZE);
-}
-
-bool USART3_IsRxReady()
-{
- return (USART3_rx_elements != 0);
-}
-
-bool USART3_IsTxBusy()
-{
- return (!(USART3.STATUS & USART_TXCIF_bm));
-}
-
-bool USART3_IsTxDone()
-{
- return (USART3.STATUS & USART_TXCIF_bm);
-}
-
-uint8_t USART3_Read(void)
-{
- uint8_t tmptail;
-
- /* Wait for incoming data */
- while (USART3_rx_elements == 0)
- ;
- /* Calculate buffer index */
- tmptail = (USART3_rx_tail + 1) & USART3_RX_BUFFER_MASK;
- /* Store new index */
- USART3_rx_tail = tmptail;
- ENTER_CRITICAL(R);
- USART3_rx_elements--;
- EXIT_CRITICAL(R);
-
- /* Return data */
- return USART3_rxbuf[tmptail];
-}
-
-void USART3_Write(const uint8_t data)
-{
- uint8_t tmphead;
-
- /* Calculate buffer index */
- tmphead = (USART3_tx_head + 1) & USART3_TX_BUFFER_MASK;
- /* Wait for free space in buffer */
- while (USART3_tx_elements == USART3_TX_BUFFER_SIZE)
- ;
- /* Store data in buffer */
- USART3_txbuf[tmphead] = data;
- /* Store new index */
- USART3_tx_head = tmphead;
- ENTER_CRITICAL(W);
- USART3_tx_elements++;
- EXIT_CRITICAL(W);
- /* Enable Tx interrupt */
- USART3.CTRLA |= (1 << USART_DREIE_bp);
-}
-
-void USART3_Initialize()
-{
- //set baud rate register
- USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
-
- //RXCIE disabled; TXCIE disabled; DREIE enabled; RXSIE disabled; LBME disabled; ABEIE disabled; RS485 DISABLE;
- USART3.CTRLA = 0x20;
-
- //RXEN disabled; TXEN enabled; SFDEN disabled; ODME disabled; RXMODE NORMAL; MPCM disabled;
- USART3.CTRLB = 0x40;
-
- //CMODE ASYNCHRONOUS; PMODE DISABLED; SBMODE 1BIT; CHSIZE 8BIT; UDORD disabled; UCPHA disabled;
- USART3.CTRLC = 0x03;
-
- //DBGCTRL_DBGRUN
- USART3.DBGCTRL = 0x00;
-
- //EVCTRL_IREI
- USART3.EVCTRL = 0x00;
-
- //RXPLCTRL_RXPL
- USART3.RXPLCTRL = 0x00;
-
- //TXPLCTRL_TXPL
- USART3.TXPLCTRL = 0x00;
-
-
- uint8_t x;
-
- /* Initialize ringbuffers */
- x = 0;
-
- USART3_rx_tail = x;
- USART3_rx_head = x;
- USART3_rx_elements = x;
- USART3_tx_tail = x;
- USART3_tx_head = x;
- USART3_tx_elements = x;
-
-#if defined(__GNUC__)
- stdout = &USART3_stream;
-#endif
-
-}
-
-void USART3_Enable()
-{
- USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
-}
-
-void USART3_EnableRx()
-{
- USART3.CTRLB |= USART_RXEN_bm;
-}
-
-void USART3_EnableTx()
-{
- USART3.CTRLB |= USART_TXEN_bm;
-}
-
-void USART3_Disable()
-{
- USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
-}
-
-uint8_t USART3_GetData()
-{
- return USART3.RXDATAL;
-}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/src/vref.c b/non-inverting-pga.X/mcc_generated_files/src/vref.c
deleted file mode 100644
index 36893ad..0000000
--- a/non-inverting-pga.X/mcc_generated_files/src/vref.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/vref.h"
-
-int8_t VREF_Initialize()
-{
- //ALWAYSON disabled; REFSEL 1V024;
- VREF.ACREF = 0x00;
-
- //ALWAYSON enabled; REFSEL 1V024;
- VREF.ADC0REF = 0x80;
-
- //ALWAYSON enabled; REFSEL 1V024;
- VREF.DAC0REF = 0x80;
-
- return 0;
-}
diff --git a/non-inverting-pga.X/mcc_generated_files/system/ccp.h b/non-inverting-pga.X/mcc_generated_files/system/ccp.h
new file mode 100644
index 0000000..9fb8a16
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/ccp.h
@@ -0,0 +1,72 @@
+/**
+ * CCP Header File
+ *
+ * @file ccp.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the Configuration Change Protection (CCP) header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CPU_CCP_H
+#define CPU_CCP_H
+
+#include "../system/utils/compiler.h"
+#include "../system/protected_io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Writes to a CCP-protected 8-bit I/O register.
+ * @param addr Address of the I/O register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_io(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_IOREG_gc, value);
+}
+
+/**
+ * @brief Writes to a CCP-protected 8-bit SPM register.
+ * @param addr Address of the SPM register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impacton calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_spm(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_SPM_gc, value);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CPU_CCP_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/clock.h b/non-inverting-pga.X/mcc_generated_files/system/clock.h
new file mode 100644
index 0000000..c769897
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/clock.h
@@ -0,0 +1,70 @@
+
+/**
+ * CLKCTRL Generated Driver API Header File
+ *
+ * @file clkctrl.h
+ *
+ * @defgroup clkctrl CLKCTRL
+ *
+ * @brief This header file provides APIs for the CLKCTRL driver.
+ *
+ * @version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CLOCK_H
+#define CLOCK_H
+
+#ifndef F_CPU
+#define F_CPU 4000000UL
+#endif
+
+#include "ccp.h"
+
+/**
+ * @ingroup clkctrl
+ * @brief Initializes the CLKCTRL module.
+ * @param None.
+ * @return None.
+ */
+void CLOCK_Initialize(void);
+
+/**
+ * @ingroup clkctrl
+ * @brief Enables the Clock Failure Detection on the main clock.
+ * @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
+ * @return None.
+ */
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);
+
+/**
+ * @ingroup clkctrl
+ * @brief Disables the Clock Failure Detection on the main clock.
+ * @param None.
+ * @return None.
+ */
+void CFD_Disable(void);
+
+#endif // CLOCK_H
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/config_bits.h b/non-inverting-pga.X/mcc_generated_files/system/config_bits.h
new file mode 100644
index 0000000..4a4e1b6
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/config_bits.h
@@ -0,0 +1,44 @@
+/**
+ * CONFIGURATION BITS Generated Driver Header File
+ *
+ * @file config_bits.h
+ *
+ * @defgroup config_bitsdriver CONFIGBITS Driver
+ *
+ * @brief This file contains the API Prototypes for the Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef CONFIG_BITS_H
+#define CONFIG_BITS_H
+
+#include "../system/clock.h"
+
+#endif //CONFIG_BITS_H
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/interrupt.h b/non-inverting-pga.X/mcc_generated_files/system/interrupt.h
new file mode 100644
index 0000000..d2a9281
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/interrupt.h
@@ -0,0 +1,57 @@
+/**
+ * Interrupt Manager Generated Driver API Header File.
+ *
+ * @file interrupt.h
+ *
+ * @defgroup interrupt INTERRUPT
+ *
+ * @brief This file contains the API prototype for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef INTERRUPT_H
+#define INTERRUPT_H
+
+#include "../system/utils/compiler.h"
+#include "ccp.h"
+#include "../system/utils/atomic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup interrupt
+ * @brief Initializes the Interrupt module.
+ * @retval 0 - Initialization is successful.
+ */
+int8_t CPUINT_Initialize();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INTERRUPT_H */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/pins.h b/non-inverting-pga.X/mcc_generated_files/system/pins.h
new file mode 100644
index 0000000..9ec439f
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/pins.h
@@ -0,0 +1,288 @@
+/**
+ * Generated Pins header File
+ *
+ * @file pins.h
+ *
+ * @defgroup pinsdriver Pins Driver
+ *
+ * @brief This is generated driver header for pins.
+ * This header file provides APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PINS_H_INCLUDED
+#define PINS_H_INCLUDED
+
+#include
+#include "./port.h"
+
+//get/set IO_PB0 aliases
+#define IO_PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
+#define IO_PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
+#define IO_PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
+#define IO_PB0_GetValue() (VPORTB.IN & (0x1 << 0))
+#define IO_PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
+#define IO_PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
+#define IO_PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB0_SetInterruptHandler IO_PB0_SetInterruptHandler
+
+//get/set IO_PD2 aliases
+#define IO_PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
+#define IO_PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
+#define IO_PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
+#define IO_PD2_GetValue() (VPORTD.IN & (0x1 << 2))
+#define IO_PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
+#define IO_PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
+#define IO_PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD2_SetInterruptHandler IO_PD2_SetInterruptHandler
+
+//get/set IO_PD6 aliases
+#define IO_PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
+#define IO_PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
+#define IO_PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
+#define IO_PD6_GetValue() (VPORTD.IN & (0x1 << 6))
+#define IO_PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
+#define IO_PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
+#define IO_PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD6_SetInterruptHandler IO_PD6_SetInterruptHandler
+
+//get/set IO_PA3 aliases
+#define IO_PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
+#define IO_PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
+#define IO_PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
+#define IO_PA3_GetValue() (VPORTA.IN & (0x1 << 3))
+#define IO_PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
+#define IO_PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
+#define IO_PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA3_SetInterruptHandler IO_PA3_SetInterruptHandler
+
+//get/set IO_PA2 aliases
+#define IO_PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
+#define IO_PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
+#define IO_PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
+#define IO_PA2_GetValue() (VPORTA.IN & (0x1 << 2))
+#define IO_PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
+#define IO_PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
+#define IO_PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA2_SetInterruptHandler IO_PA2_SetInterruptHandler
+
+//get/set LED0 aliases
+#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
+#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
+#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
+#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
+#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
+#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
+#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB3_SetInterruptHandler LED0_SetInterruptHandler
+
+/**
+ * @ingroup pinsdriver
+ * @brief GPIO and peripheral I/O initialization
+ * @param none
+ * @return none
+ */
+void PIN_MANAGER_Initialize();
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PB0 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PB0_SetInterruptHandler() method.
+ * This handler is called every time the IO_PB0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PB0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PB0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PB0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD6 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD6_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD6 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD6_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD6 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD6 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA3 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA3_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA3 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA3_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA3 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA3 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for LED0 pin.
+ * This is a predefined interrupt handler to be used together with the LED0_SetInterruptHandler() method.
+ * This handler is called every time the LED0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void LED0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for LED0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for LED0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+#endif /* PINS_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/port.h b/non-inverting-pga.X/mcc_generated_files/system/port.h
new file mode 100644
index 0000000..0272de1
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/port.h
@@ -0,0 +1,1320 @@
+/**
+ * Generated Ports header File
+ *
+ * @file port.h
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This Source file provides APIs.
+ *
+ * @version Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef PORT_INCLUDED
+#define PORT_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "utils/compiler.h"
+
+/* @ingroup pinsdriver
+ * @enum port_pull_mode
+ * Defines the pullup modes.
+ */
+enum port_pull_mode {
+ PORT_PULL_OFF,
+ PORT_PULL_UP,
+};
+
+/* @ingroup pinsdriver
+ * @enum port_dir
+ * Defines the port directions.
+ */
+enum port_dir {
+ PORT_DIR_IN,
+ PORT_DIR_OUT,
+ PORT_DIR_OFF,
+};
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= mask;
+ } else {
+ VPORTA.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= (1 << pin);
+ } else {
+ VPORTA.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTA_toggle_port_level(const uint8_t mask)
+{
+ PORTA.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTA_toggle_pin_level(const uint8_t pin)
+{
+ PORTA.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTA_get_port_level()
+{
+ return VPORTA.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTA_get_pin_level(const uint8_t pin)
+{
+ return VPORTA.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTA_write_port(const uint8_t value)
+{
+ VPORTA.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= mask;
+ } else {
+ VPORTB.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= (1 << pin);
+ } else {
+ VPORTB.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTB_toggle_port_level(const uint8_t mask)
+{
+ PORTB.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTB_toggle_pin_level(const uint8_t pin)
+{
+ PORTB.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTB_get_port_level()
+{
+ return VPORTB.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTB_get_pin_level(const uint8_t pin)
+{
+ return VPORTB.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTB_write_port(const uint8_t value)
+{
+ VPORTB.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= mask;
+ } else {
+ VPORTC.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= (1 << pin);
+ } else {
+ VPORTC.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTC_toggle_port_level(const uint8_t mask)
+{
+ PORTC.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTC_toggle_pin_level(const uint8_t pin)
+{
+ PORTC.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTC_get_port_level()
+{
+ return VPORTC.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTC_get_pin_level(const uint8_t pin)
+{
+ return VPORTC.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTC_write_port(const uint8_t value)
+{
+ VPORTC.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= mask;
+ } else {
+ VPORTD.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= (1 << pin);
+ } else {
+ VPORTD.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTD_toggle_port_level(const uint8_t mask)
+{
+ PORTD.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTD_toggle_pin_level(const uint8_t pin)
+{
+ PORTD.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTD_get_port_level()
+{
+ return VPORTD.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTD_get_pin_level(const uint8_t pin)
+{
+ return VPORTD.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTD_write_port(const uint8_t value)
+{
+ VPORTD.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= mask;
+ } else {
+ VPORTE.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= (1 << pin);
+ } else {
+ VPORTE.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTE_toggle_port_level(const uint8_t mask)
+{
+ PORTE.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTE_toggle_pin_level(const uint8_t pin)
+{
+ PORTE.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTE_get_port_level()
+{
+ return VPORTE.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTE_get_pin_level(const uint8_t pin)
+{
+ return VPORTE.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTE_write_port(const uint8_t value)
+{
+ VPORTE.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= mask;
+ } else {
+ VPORTF.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= (1 << pin);
+ } else {
+ VPORTF.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTF_toggle_port_level(const uint8_t mask)
+{
+ PORTF.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTF_toggle_pin_level(const uint8_t pin)
+{
+ PORTF.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTF_get_port_level()
+{
+ return VPORTF.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTF_get_pin_level(const uint8_t pin)
+{
+ return VPORTF.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTF_write_port(const uint8_t value)
+{
+ VPORTF.OUT = value;
+}
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/protected_io.h b/non-inverting-pga.X/mcc_generated_files/system/protected_io.h
new file mode 100644
index 0000000..74e1fb5
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/protected_io.h
@@ -0,0 +1,80 @@
+/**
+ * protected_io Header File
+ *
+ * @file protected_io.h
+ *
+ * @defgroup doc_driver_system_protected_io Protected IO
+ *
+ * @brief This file contains the generated prtected_io header file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
+ *
+ *@{
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PROTECTED_IO_H
+#define PROTECTED_IO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__DOXYGEN__)
+//! \name IAR Memory Model defines.
+//@{
+
+/**
+ * @def CONFIG_MEMORY_MODEL_TINY
+ * @brief Configuration symbol to enable 8 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_TINY
+
+/**
+ * @def CONFIG_MEMORY_MODEL_SMALL
+ * @brief Configuration symbol to enable 16 bit pointers.
+ * NOTE: If no memory model is defined, SMALL is default.
+ */
+#define CONFIG_MEMORY_MODEL_SMALL
+
+/**
+ * @def CONFIG_MEMORY_MODEL_LARGE
+ * @brief Configuration symbol to enable 24 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_LARGE
+
+//@}
+#endif
+
+/**
+ * @brief Writes to an 8-bit I/O register protected by CCP or a protection bit.
+ * @param addr Address of the I/O register.
+ * @param magic CCP magic value or Mask for protection bit.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
+
+/** @} */
+
+#endif /* PROTECTED_IO_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/src/clock.c b/non-inverting-pga.X/mcc_generated_files/system/src/clock.c
new file mode 100644
index 0000000..f0a30a7
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/clock.c
@@ -0,0 +1,104 @@
+
+
+/**
+ * CLKCTRL Generated Driver File
+ *
+ * @file clkctrl.c
+ *
+ * @ingroup clkctrl
+ *
+ * @brief This file contains the driver code for CLKCTRL module.
+ *
+ * version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../clock.h"
+
+void CLOCK_Initialize(void)
+{
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),(0 << CLKCTRL_CLKOUT_bp) // CLKOUT disabled
+ | CLKCTRL_CLKSEL_OSCHF_gc // CLKSEL Internal high-frequency oscillator
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc // PDIV 6X
+ | (0 << CLKCTRL_PEN_bp) // PEN disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),(0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),(0 << CLKCTRL_AUTOTUNE_bp) // AUTOTUNE disabled
+ | CLKCTRL_FRQSEL_4M_gc // FRQSEL 4 MHz system clock (default)
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFTUNE),0x0 // TUNE 0x0
+ );
+ ccp_write_io((void*)&(CLKCTRL.PLLCTRLA),CLKCTRL_MULFAC_DISABLE_gc // MULFAC PLL is disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | CLKCTRL_SOURCE_OSCHF_gc // SOURCE OSCHF
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc // CSUT 1k cycles
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | (0 << CLKCTRL_LPMODE_bp) // LPMODE disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << CLKCTRL_SEL_bp) // SEL disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),(0 << CLKCTRL_CFDEN_bp) // CFDEN disabled
+ | CLKCTRL_CFDSRC_CLKMAIN_gc // CFDSRC CLKMAIN
+ | (0 << CLKCTRL_CFDTST_bp) // CFDTST disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ | CLKCTRL_INTTYPE_INT_gc // INTTYPE INT
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTFLAGS),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSCHFCTRLA),CLKCTRL_CSUTHF_256_gc // CSUTHF 256
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | CLKCTRL_FRQRANGE_8M_gc // FRQRANGE 8M
+ | (0 << CLKCTRL_RUNSTBY_bp) // RUNSTBY disabled
+ | CLKCTRL_SELHF_XTAL_gc // SELHF XTAL
+ );
+
+ // System clock stability check by polling the status register.
+ while(!(CLKCTRL.MCLKSTATUS & CLKCTRL_OSCHFS_bm))
+ {
+ }
+
+}
+
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source)
+{
+ /* Enable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, cfd_source | CLKCTRL_CFDEN_bm);
+}
+
+void CFD_Disable(void)
+{
+ /* Disable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, CLKCTRL.MCLKCTRLC & ~CLKCTRL_CFDEN_bm);
+}
+
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/src/config_bits.c b/non-inverting-pga.X/mcc_generated_files/system/src/config_bits.c
new file mode 100644
index 0000000..f785fe7
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/config_bits.c
@@ -0,0 +1,49 @@
+/**
+ * CONFIGURATION BITS Generated Driver Source File
+ *
+ * @file config_bits.c
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the API implementation for the Device Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include
+
+/**
+ * Configures the Fuse bits.
+ */
+FUSES =
+{
+ .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
+ .BOOTSIZE = 0x0,
+ .CODESIZE = 0x0,
+ .OSCCFG = CLKSEL_OSCHF_gc,
+ .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
+ .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
+ .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
+};
diff --git a/non-inverting-pga.X/mcc_generated_files/system/src/interrupt.c b/non-inverting-pga.X/mcc_generated_files/system/src/interrupt.c
new file mode 100644
index 0000000..f5169f3
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/interrupt.c
@@ -0,0 +1,53 @@
+/**
+ * Interrupt Manager Generated Driver File.
+ *
+ * @file interrupt.c
+ *
+ * @ingroup interrupt
+ *
+ * @brief This file contains the API implementation for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../interrupt.h"
+
+int8_t CPUINT_Initialize()
+{
+ /* IVSEL and CVT are Configuration Change Protected */
+
+ //CVT disabled; IVSEL disabled; LVL0RR disabled;
+ ccp_write_io((void*)&(CPUINT.CTRLA),0x0);
+
+ //LVL0PRI 0;
+ CPUINT.LVL0PRI = 0x0;
+
+ //LVL1VEC 0;
+ CPUINT.LVL1VEC = 0x0;
+
+ ENABLE_INTERRUPTS();
+
+ return 0;
+}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/src/pins.c b/non-inverting-pga.X/mcc_generated_files/system/src/pins.c
new file mode 100644
index 0000000..058873d
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/pins.c
@@ -0,0 +1,278 @@
+/**
+ * Generated Driver File
+ *
+ * @file pins.c
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This is generated driver implementation for pins.
+ * This file provides implementations for pin APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../pins.h"
+
+static void (*IO_PB0_InterruptHandler)(void);
+static void (*IO_PD2_InterruptHandler)(void);
+static void (*IO_PD6_InterruptHandler)(void);
+static void (*IO_PA3_InterruptHandler)(void);
+static void (*IO_PA2_InterruptHandler)(void);
+static void (*LED0_InterruptHandler)(void);
+
+void PIN_MANAGER_Initialize()
+{
+
+ /* OUT Registers Initialization */
+ PORTA.OUT = 0x0;
+ PORTB.OUT = 0x1;
+ PORTC.OUT = 0x0;
+ PORTD.OUT = 0x0;
+ PORTE.OUT = 0x0;
+ PORTF.OUT = 0x0;
+
+ /* DIR Registers Initialization */
+ PORTA.DIR = 0xC;
+ PORTB.DIR = 0x9;
+ PORTC.DIR = 0x0;
+ PORTD.DIR = 0x40;
+ PORTE.DIR = 0x0;
+ PORTF.DIR = 0x0;
+
+ /* PINxCTRL registers Initialization */
+ PORTA.PIN0CTRL = 0x0;
+ PORTA.PIN1CTRL = 0x0;
+ PORTA.PIN2CTRL = 0x0;
+ PORTA.PIN3CTRL = 0x0;
+ PORTA.PIN4CTRL = 0x0;
+ PORTA.PIN5CTRL = 0x0;
+ PORTA.PIN6CTRL = 0x0;
+ PORTA.PIN7CTRL = 0x0;
+ PORTB.PIN0CTRL = 0x0;
+ PORTB.PIN1CTRL = 0x0;
+ PORTB.PIN2CTRL = 0x0;
+ PORTB.PIN3CTRL = 0x0;
+ PORTB.PIN4CTRL = 0x0;
+ PORTB.PIN5CTRL = 0x0;
+ PORTB.PIN6CTRL = 0x0;
+ PORTB.PIN7CTRL = 0x0;
+ PORTC.PIN0CTRL = 0x0;
+ PORTC.PIN1CTRL = 0x0;
+ PORTC.PIN2CTRL = 0x0;
+ PORTC.PIN3CTRL = 0x0;
+ PORTC.PIN4CTRL = 0x0;
+ PORTC.PIN5CTRL = 0x0;
+ PORTC.PIN6CTRL = 0x0;
+ PORTC.PIN7CTRL = 0x0;
+ PORTD.PIN0CTRL = 0x0;
+ PORTD.PIN1CTRL = 0x0;
+ PORTD.PIN2CTRL = 0x4;
+ PORTD.PIN3CTRL = 0x0;
+ PORTD.PIN4CTRL = 0x0;
+ PORTD.PIN5CTRL = 0x0;
+ PORTD.PIN6CTRL = 0x0;
+ PORTD.PIN7CTRL = 0x0;
+ PORTE.PIN0CTRL = 0x0;
+ PORTE.PIN1CTRL = 0x0;
+ PORTE.PIN2CTRL = 0x0;
+ PORTE.PIN3CTRL = 0x0;
+ PORTE.PIN4CTRL = 0x0;
+ PORTE.PIN5CTRL = 0x0;
+ PORTE.PIN6CTRL = 0x0;
+ PORTE.PIN7CTRL = 0x0;
+ PORTF.PIN0CTRL = 0x0;
+ PORTF.PIN1CTRL = 0x0;
+ PORTF.PIN2CTRL = 0x0;
+ PORTF.PIN3CTRL = 0x0;
+ PORTF.PIN4CTRL = 0x0;
+ PORTF.PIN5CTRL = 0x0;
+ PORTF.PIN6CTRL = 0x0;
+ PORTF.PIN7CTRL = 0x0;
+
+ /* PORTMUX Initialization */
+ PORTMUX.ACROUTEA = 0x0;
+ PORTMUX.CCLROUTEA = 0x0;
+ PORTMUX.EVSYSROUTEA = 0x0;
+ PORTMUX.SPIROUTEA = 0x0;
+ PORTMUX.TCAROUTEA = 0x0;
+ PORTMUX.TCBROUTEA = 0x0;
+ PORTMUX.TCDROUTEA = 0x0;
+ PORTMUX.TWIROUTEA = 0x0;
+ PORTMUX.USARTROUTEA = 0x0;
+ PORTMUX.USARTROUTEB = 0x0;
+ PORTMUX.ZCDROUTEA = 0x0;
+
+ // register default ISC callback functions at runtime; use these methods to register a custom function
+ IO_PB0_SetInterruptHandler(IO_PB0_DefaultInterruptHandler);
+ IO_PD2_SetInterruptHandler(IO_PD2_DefaultInterruptHandler);
+ IO_PD6_SetInterruptHandler(IO_PD6_DefaultInterruptHandler);
+ IO_PA3_SetInterruptHandler(IO_PA3_DefaultInterruptHandler);
+ IO_PA2_SetInterruptHandler(IO_PA2_DefaultInterruptHandler);
+ LED0_SetInterruptHandler(LED0_DefaultInterruptHandler);
+}
+
+/**
+ Allows selecting an interrupt handler for IO_PB0 at application runtime
+*/
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PB0_InterruptHandler = interruptHandler;
+}
+
+void IO_PB0_DefaultInterruptHandler(void)
+{
+ // add your IO_PB0 interrupt custom code
+ // or set custom function using IO_PB0_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD2 at application runtime
+*/
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD2_InterruptHandler = interruptHandler;
+}
+
+void IO_PD2_DefaultInterruptHandler(void)
+{
+ // add your IO_PD2 interrupt custom code
+ // or set custom function using IO_PD2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD6 at application runtime
+*/
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD6_InterruptHandler = interruptHandler;
+}
+
+void IO_PD6_DefaultInterruptHandler(void)
+{
+ // add your IO_PD6 interrupt custom code
+ // or set custom function using IO_PD6_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA3 at application runtime
+*/
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA3_InterruptHandler = interruptHandler;
+}
+
+void IO_PA3_DefaultInterruptHandler(void)
+{
+ // add your IO_PA3 interrupt custom code
+ // or set custom function using IO_PA3_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA2 at application runtime
+*/
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA2_InterruptHandler = interruptHandler;
+}
+
+void IO_PA2_DefaultInterruptHandler(void)
+{
+ // add your IO_PA2 interrupt custom code
+ // or set custom function using IO_PA2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for LED0 at application runtime
+*/
+void LED0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ LED0_InterruptHandler = interruptHandler;
+}
+
+void LED0_DefaultInterruptHandler(void)
+{
+ // add your LED0 interrupt custom code
+ // or set custom function using LED0_SetInterruptHandler()
+}
+ISR(PORTA_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTA.INTFLAGS & PORT_INT3_bm)
+ {
+ IO_PA3_InterruptHandler();
+ }
+ if(VPORTA.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PA2_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTA.INTFLAGS = 0xff;
+}
+
+ISR(PORTB_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTB.INTFLAGS & PORT_INT0_bm)
+ {
+ IO_PB0_InterruptHandler();
+ }
+ if(VPORTB.INTFLAGS & PORT_INT3_bm)
+ {
+ LED0_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTB.INTFLAGS = 0xff;
+}
+
+ISR(PORTC_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTC.INTFLAGS = 0xff;
+}
+
+ISR(PORTD_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTD.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PD2_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT6_bm)
+ {
+ IO_PD6_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTD.INTFLAGS = 0xff;
+}
+
+ISR(PORTE_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTE.INTFLAGS = 0xff;
+}
+
+ISR(PORTF_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTF.INTFLAGS = 0xff;
+}
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/instrumentation-amplifier.X/mcc_generated_files/src/protected_io.S b/non-inverting-pga.X/mcc_generated_files/system/src/protected_io.S
similarity index 62%
rename from instrumentation-amplifier.X/mcc_generated_files/src/protected_io.S
rename to non-inverting-pga.X/mcc_generated_files/system/src/protected_io.S
index b93dd68..6aaf66e 100644
--- a/instrumentation-amplifier.X/mcc_generated_files/src/protected_io.S
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/protected_io.S
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * protected_io Source Code File
+ *
+ * @file protected_io.S
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated protected_io source code file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/non-inverting-pga.X/mcc_generated_files/system/src/system.c b/non-inverting-pga.X/mcc_generated_files/system/src/system.c
new file mode 100644
index 0000000..ffdd246
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/src/system.c
@@ -0,0 +1,52 @@
+/**
+ * System Driver Source File
+ *
+ * @file system.c
+ *
+ * @ingroup systemdriver
+ *
+ * @brief This file contains the API implementation for the System driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../system.h"
+
+void SYSTEM_Initialize(void)
+{
+ CLOCK_Initialize();
+ PIN_MANAGER_Initialize();
+ TCB0_Initialize();
+ TCB1_Initialize();
+ ADC0_Initialize();
+ DAC0_Initialize();
+ DataStreamer_Initialize();
+ OPAMP_Initialize();
+ RTC_Initialize();
+ USART3_Initialize();
+ VREF_Initialize();
+ CPUINT_Initialize();
+}
+
diff --git a/non-inverting-pga.X/mcc_generated_files/system/system.h b/non-inverting-pga.X/mcc_generated_files/system/system.h
new file mode 100644
index 0000000..dba0220
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/system.h
@@ -0,0 +1,71 @@
+/**
+ * System Driver Header File
+ *
+ * @file system.h
+ *
+ * @defgroup systemdriver System Driver
+ *
+ * @brief This file contains the API prototype for the System Driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef MCC_H
+#define MCC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../system/utils/compiler.h"
+#include "config_bits.h"
+#include "../system/pins.h"
+#include "../adc/adc0.h"
+#include "../dac/dac0.h"
+#include "../data_streamer/data_streamer.h"
+#include "../opamp/opamp.h"
+#include "../timer/rtc.h"
+#include "../uart/usart3.h"
+#include "../vref/vref.h"
+#include "../system/interrupt.h"
+#include "../system/clock.h"
+#include "../timer/tcb0.h"
+#include "../timer/tcb1.h"
+/**
+ * @ingroup systemdriver
+ * @brief Initializes the System module. This routine is called only once during system initialization, before calling any other API.
+ * @param None.
+ * @return None.
+*/
+void SYSTEM_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MCC_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/assembler.h b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler.h
new file mode 100644
index 0000000..0c6484a
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler.h
@@ -0,0 +1,49 @@
+/**
+ * Assembler Header File
+ *
+ * @file assembler.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the assembler header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ASSEMBLER_H_INCLUDED
+#define ASSEMBLER_H_INCLUDED
+
+#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__)
+#error This file may only be included from assembly files
+#endif
+
+#if defined(__ASSEMBLER__)
+#include "assembler/gas.h"
+#include
+#elif defined(__IAR_SYSTEMS_ASM__)
+#include "assembler/iar.h"
+#include
+#endif
+
+#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/utils/assembler/gas.h b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler/gas.h
similarity index 67%
rename from voltage-follower.X/mcc_generated_files/utils/assembler/gas.h
rename to non-inverting-pga.X/mcc_generated_files/system/utils/assembler/gas.h
index a164306..871a60a 100644
--- a/voltage-follower.X/mcc_generated_files/utils/assembler/gas.h
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler/gas.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * GAS Header File
+ *
+ * @file gas.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated GAS header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
@@ -50,7 +50,11 @@
.if \is_public
.global \name
.endif
+ #ifdef __XC8
+ .section .text.\name, code
+ #else
.section .text.\name, "ax", @progbits
+ #endif
.type \name, @function
\name :
.endm
diff --git a/voltage-follower.X/mcc_generated_files/utils/assembler/iar.h b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler/iar.h
similarity index 61%
rename from voltage-follower.X/mcc_generated_files/utils/assembler/iar.h
rename to non-inverting-pga.X/mcc_generated_files/system/utils/assembler/iar.h
index 69650d6..c52425f 100644
--- a/voltage-follower.X/mcc_generated_files/utils/assembler/iar.h
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/assembler/iar.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * IAR Header File
+ *
+ * @file iar.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated IAR header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/atomic.h b/non-inverting-pga.X/mcc_generated_files/system/utils/atomic.h
new file mode 100644
index 0000000..2f71dc3
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/atomic.h
@@ -0,0 +1,87 @@
+/**
+ * CONFIGURATION BITS Generated Atomic Header File
+ *
+ * @file atomic.h
+ *
+ * @defgroup doc_driver_utils_atomic Atomic memory access and critical sections
+ *
+ * @brief This file contains the atomic memory access and critical sections header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ATOMIC_H
+#define ATOMIC_H
+
+/* clang-format off */
+
+#if defined(__GNUC__) || defined (__DOXYGEN__)
+
+/**
+ * @brief Enters critical region. Saves the contents of the status register, including the Global Interrupt Enable bit, so that it can be restored upon leaving the critical region.
+ * Thereafter, clears the Global Interrupt Enable Bit.This macro takes a parameter P that is unused for the GCC compiler,but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler declares a variable with the name of the parameter forholding the SREG value.
+ * Compilation will fail when the variable declared in the macro is not unique within the scope that the critical region is declared within.
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG.
+ */
+
+#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "in __tmp_reg__, __SREG__" "\n\t" \
+ "cli" "\n\t" \
+ "push __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+/**
+ * @brief Exits a critical region. Restores the contents of the status register, including the Global Interrupt Enable bit, as it was when entering the critical region.
+ * This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler uses this parameter as the name of a variable that holds the SREG value.
+ * The parameter must be identical to the parameter used in the corresponding ENTER_CRITICAL().
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
+ */
+
+#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "pop __tmp_reg__" "\n\t" \
+ "out __SREG__, __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
+#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
+
+#elif defined(__ICCAVR__)
+
+#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
+#define EXIT_CRITICAL(P) __restore_interrupt(P);
+
+#define DISABLE_INTERRUPTS() __disable_interrupt();
+#define ENABLE_INTERRUPTS() __enable_interrupt();
+
+#else
+# error Unsupported compiler.
+#endif
+
+/* clang-format on */
+
+#endif /* ATOMIC_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/compiler.h b/non-inverting-pga.X/mcc_generated_files/system/utils/compiler.h
new file mode 100644
index 0000000..682900b
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/compiler.h
@@ -0,0 +1,72 @@
+/**
+ * Compiler Header File
+ *
+ * @file compiler.h
+ *
+ * @defgroup doc_driver_utils_compiler Compiler abstraction
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for 8-bit AVR. This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef UTILS_COMPILER_H
+#define UTILS_COMPILER_H
+
+#if defined(__GNUC__)
+#include
+#include
+#if defined(__XC8__)
+#include
+#endif
+#elif defined(__ICCAVR__)
+#define ENABLE_BIT_DEFINITIONS 1
+#include
+#include
+
+#ifndef CCP_IOREG_gc
+#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
+#endif
+#ifndef CCP_SPM_gc
+#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
+#endif
+
+#else
+#error Unsupported compiler.
+#endif
+
+#include
+#include
+#include
+#include
+
+#include "interrupt_avr8.h"
+
+/**
+ * @def UNUSED
+ * @brief Marking \a v as a unused parameter or value.
+ */
+#define UNUSED(v) (void)(v)
+
+#endif /* UTILS_COMPILER_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/interrupt_avr8.h b/non-inverting-pga.X/mcc_generated_files/system/utils/interrupt_avr8.h
new file mode 100644
index 0000000..99068db
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/interrupt_avr8.h
@@ -0,0 +1,88 @@
+/**
+ * interrupt_avr8 Header File
+ *
+ * @file interrupt_avr8.h
+ *
+ * @defgroup doc_driver_utils_interrupts ISR abstraction
+ *
+ * @brief Interrupt-related functionality.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_INTERRUPT_AVR8_H
+#define UTILS_INTERRUPT_AVR8_H
+
+/**
+ * \weakgroup interrupt_group
+ *
+ * @{
+ */
+
+#ifdef ISR_CUSTOM_H
+#include ISR_CUSTOM_H
+#else
+
+/**
+ * @def ISR
+ * @brief Define service routine for specified interrupt vector.
+ * @code
+ ISR(FOO_vect)
+ {
+ ...
+ }
+ * @endcode
+ *
+ * @param vect Interrupt vector name as found in the device header files.
+ */
+#if defined(__DOXYGEN__)
+#define ISR(vect)
+#elif defined(__GNUC__)
+#include
+#elif defined(__ICCAVR__)
+#define __ISR(x) _Pragma(#x)
+#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
+#endif
+#endif // ISR_CUSTOM_H
+
+#ifdef __GNUC__
+#define cpu_irq_enable() sei()
+#define cpu_irq_disable() cli()
+#else
+#define cpu_irq_enable() __enable_interrupt()
+#define cpu_irq_disable() __disable_interrupt()
+#endif
+
+//! @}
+
+/**
+ * \weakgroup interrupt_deprecated_group
+ * @{
+ */
+// Deprecated definitions.
+#define Enable_global_interrupt() cpu_irq_enable()
+#define Disable_global_interrupt() cpu_irq_disable()
+#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
+//! @}
+
+#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/utils.h b/non-inverting-pga.X/mcc_generated_files/system/utils/utils.h
new file mode 100644
index 0000000..a7b1b42
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/utils.h
@@ -0,0 +1,52 @@
+/**
+ * utils Header File
+ *
+ * @file system.h
+ *
+ * @defgroup doc_driver_utils AVR Code utility functions
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for AVR.This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.1
+ * \{
+ *
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_H_INCLUDED
+#define UTILS_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Retrieve array size
+ */
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTILS_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/system/utils/utils_assert.h b/non-inverting-pga.X/mcc_generated_files/system/utils/utils_assert.h
new file mode 100644
index 0000000..b603f51
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/system/utils/utils_assert.h
@@ -0,0 +1,60 @@
+/**
+ * utils_assert Header File
+ *
+ * @file utils_assert.h
+ *
+ * @defgroup doc_driver_utils_assert Functionality for assert
+ *
+ * @brief This file contains the generated utils_assert header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef _ASSERT_H_INCLUDED
+#define _ASSERT_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/**
+ * @brief Assert macro
+ * Macro used to throw asserts. It can be mapped to different function based on debug level.
+ * @param[in] condition A condition to be checked; assert is thrown if the given condition is false.
+ */
+
+#ifdef DEBUG
+#define ASSERT(condition) \
+ if (!(condition)) \
+ while (true) \
+ ;
+#else
+#define ASSERT(condition) ((void)0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ASSERT_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/rtc.h b/non-inverting-pga.X/mcc_generated_files/timer/rtc.h
new file mode 100644
index 0000000..10a822f
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/rtc.h
@@ -0,0 +1,193 @@
+/**
+ * RTC Generated Driver API Header File.
+ *
+ * @file rtc.h
+ *
+ * @defgroup rtc RTC
+ *
+ * @brief This file contains the API prototypes of the RTC driver.
+ *
+ * @version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef RTCDRIVER_H
+#define RTCDRIVER_H
+
+#include "../system/utils/compiler.h"
+#include
+#include
+
+/**
+ * @ingroup rtc
+ * @typedef void RTC_cb_t
+ * @brief Function pointer to callback function called by the RTC. The default value is set to NULL which means that no callback function will be used.
+ */
+typedef void (*RTC_cb_t)(void);
+/**
+ * @ingroup rtc
+ * @brief Interrupt Service Routine (ISR) callback function to be called if Overflow (OVF) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on Overflow event.
+ * @return None.
+ */
+void RTC_SetOVFIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if Compare (CMP) match Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on compare match event.
+ * @return None.
+ */
+void RTC_SetCMPIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if the Periodic Interrupt Timer (PIT) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on periodic interrupt event.
+ * @return None.
+ */
+void RTC_SetPITIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief Initializes the RTC module.
+ * @param None.
+ * @retval 0 - the RTC initialization is successful
+ * @retval 1 - the RTC initialization is not successful
+ */
+int8_t RTC_Initialize(void);
+/**
+ * @ingroup rtc
+ * @brief Starts the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Start(void);
+/**
+ * @ingroup rtc
+ * @brief Stops the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Stop(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Counter register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Counter register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCounter(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Period register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Period register of the RTC.
+ * @return None.
+ */
+void RTC_WritePeriod(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Returns the counter value from the Counter register.
+ * @param None.
+ * @return uint16_t - Value of the Counter register.
+ */
+uint16_t RTC_ReadCounter(void);
+/**
+ * @ingroup rtc
+ * @brief Returns the value of the Period register.
+ * @param None.
+ * @return uint16_t - Value of the Period register.
+ */
+uint16_t RTC_ReadPeriod(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Compare (CMP) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the CMP Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Overflow (OVF) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the OVF Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Periodic Interrupt Timer (PIT) interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the PIT Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Clears the OVF Interrupt flag.
+ * @param None.
+ * @return None.
+ */
+void RTC_ClearOVFInterruptFlag(void);
+/**
+ * @ingroup rtc
+ * @brief Checks if Overflow interrupt has occurred.
+ * @param None.
+ * @retval True - Interrupt is enabled.
+ * @retval False - Interrupt is disabled.
+ */
+bool RTC_IsOVFInterruptEnabled(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the CMP register of the RTC module.
+ * @param uint16_t value - Value to be written to the CMP register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCMPRegister(uint16_t value);
+/**
+ * @ingroup rtc
+ * @brief Returns the value from the CMP register.
+ * @param None.
+ * @return uint16_t - Value of the Compare register.
+ */
+uint16_t RTC_ReadCMPRegister(void);
+
+
+#endif /* RTCDRIVER_H */
+
+/** @}*/
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/src/rtc.c b/non-inverting-pga.X/mcc_generated_files/timer/src/rtc.c
new file mode 100644
index 0000000..1d6c1eb
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/src/rtc.c
@@ -0,0 +1,202 @@
+/**
+ * RTC Generated Driver API Source File.
+ *
+ * @file rtc.c
+ *
+ * @ingroup rtc
+ *
+ * @brief This file contains the API implementations for the RTC driver.
+ *
+ * version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../rtc.h"
+
+void (*RTC_OVF_isr_cb)(void) = NULL;
+void (*RTC_CMP_isr_cb)(void) = NULL;
+void (*RTC_PIT_isr_cb)(void) = NULL;
+
+int8_t RTC_Initialize(void)
+{
+ while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ //Compare
+ RTC.CMP = 0x0;
+
+ //Count
+ RTC.CNT = 0x0;
+
+ //Period
+ RTC.PER = 0x3FF;
+
+ //Clock selection
+ RTC.CLKSEL = 0x0;
+
+
+ // CMP disabled; OVF enabled;
+ RTC.INTCTRL = 0x1;
+
+ // DBGRUN disabled;
+ RTC.DBGCTRL = 0x0;
+
+ // CORREN disabled; PRESCALER RTC Clock / 32; RTCEN enabled; RUNSTDBY disabled;
+ RTC.CTRLA = 0x29;
+
+
+ while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ // PI disabled;
+ RTC.PITINTCTRL = 0x0;
+
+ // DBGRUN disabled;
+ RTC.PITDBGCTRL = 0x0;
+
+ return 0;
+}
+
+void RTC_Start(void)
+{
+ RTC.CTRLA |= RTC_RTCEN_bm;
+}
+
+void RTC_Stop(void)
+{
+ RTC.CTRLA &= ~RTC_RTCEN_bm;
+}
+
+void RTC_SetOVFIsrCallback(RTC_cb_t cb)
+{
+ RTC_OVF_isr_cb = cb;
+}
+
+void RTC_SetCMPIsrCallback(RTC_cb_t cb)
+{
+ RTC_CMP_isr_cb = cb;
+}
+
+void RTC_SetPITIsrCallback(RTC_cb_t cb)
+{
+ RTC_PIT_isr_cb = cb;
+}
+
+ISR(RTC_CNT_vect)
+{
+ if ( (RTC.INTCTRL & RTC_OVF_bm) && (RTC.INTFLAGS & RTC_OVF_bm) )
+ {
+ if (RTC_OVF_isr_cb != NULL)
+ {
+ (*RTC_OVF_isr_cb)();
+ }
+ }
+
+ if ( (RTC.INTCTRL & RTC_CMP_bm) && (RTC.INTFLAGS & RTC_CMP_bm) )
+ {
+ if (RTC_CMP_isr_cb != NULL)
+ {
+ (*RTC_CMP_isr_cb)();
+ }
+ }
+ RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
+}
+
+ISR(RTC_PIT_vect)
+{
+ if (RTC_PIT_isr_cb != NULL)
+ {
+ (*RTC_PIT_isr_cb)();
+ }
+ RTC.PITINTFLAGS = RTC_PI_bm;
+}
+
+inline void RTC_WriteCounter(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_CNTBUSY_bm);
+ RTC.CNT = timerVal;
+}
+
+inline uint16_t RTC_ReadCounter(void)
+{
+ return RTC.CNT;
+}
+
+inline void RTC_WritePeriod(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_PERBUSY_bm);
+ RTC.PER = timerVal;
+}
+
+inline uint16_t RTC_ReadPeriod(void)
+{
+ return RTC.PER;
+}
+
+inline void RTC_EnableCMPInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_CMP_bm;
+}
+
+inline void RTC_DisableCMPInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_CMP_bm;
+}
+
+inline void RTC_EnableOVFInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_OVF_bm;
+}
+
+inline void RTC_DisableOVFInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_OVF_bm;
+}
+
+inline void RTC_EnablePITInterrupt(void)
+{
+ RTC.PITINTCTRL |= RTC_PI_bm;
+}
+
+inline void RTC_DisablePITInterrupt(void)
+{
+ RTC.PITINTCTRL &= ~RTC_PI_bm;
+}
+
+inline void RTC_ClearOVFInterruptFlag(void)
+{
+ RTC.INTFLAGS = RTC_OVF_bm;
+}
+
+inline bool RTC_IsOVFInterruptEnabled(void)
+{
+ return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
+}
+
+inline void RTC_WriteCMPRegister(uint16_t value)
+{
+ RTC.CMP = value;
+}
+
+inline uint16_t RTC_ReadCMPRegister(void)
+{
+ return RTC.CMP;
+}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/src/tcb0.c b/non-inverting-pga.X/mcc_generated_files/timer/src/tcb0.c
new file mode 100644
index 0000000..cf0217c
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/src/tcb0.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB0 Generated Driver File
+ *
+ * @file tcb0.c
+ *
+ * @ingroup tcb0
+ *
+ * @brief This file contains the API implementation for the TCB0 module driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb0.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB0_OVF_isr_cb)(void);
+static void TCB0_DefaultOverflowCallback(void);
+static void (*TCB0_CAPT_isr_cb)(void);
+static void TCB0_DefaultCaptureCallback(void);
+
+void TCB0_Initialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB0.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB0.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB0.CCMP = 0x6B8U; // CCMP 0x6B8
+
+ TCB0.CNT = 0x0; // CNT 0xNAN
+
+ TCB0.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_OverflowCallbackRegister(TCB0_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_CaptureCallbackRegister(TCB0_DefaultCaptureCallback);
+
+ TCB0.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB0.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (1 << TCB_RUNSTDBY_bp) // RUNSTDBY enabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB0_Deinitialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CCMP = 0x0;
+
+ TCB0.CNT = 0x0;
+
+ TCB0.CTRLB = 0x0;
+
+ TCB0.DBGCTRL = 0x0;
+
+ TCB0.EVCTRL = 0x0;
+
+ TCB0.INTCTRL = 0x0;
+
+ TCB0.TEMP = 0x0;
+
+ TCB0.CTRLA = 0x0;
+
+ TCB0.INTFLAGS = ~0x0;
+}
+
+void TCB0_Start(void)
+{
+ TCB0.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB0_Stop(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB0_CounterSet(uint16_t timerVal)
+{
+ TCB0.CNT = timerVal;
+}
+
+uint16_t TCB0_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB0.CNT;
+
+ return readVal;
+}
+void TCB0_PeriodSet(uint16_t periodVal)
+{
+ TCB0.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB0_PeriodGet(void)
+{
+ return (uint16_t)TCB0.CCMP;
+}
+
+uint16_t TCB0_MaxCountGet(void)
+{
+ return TCB0_MAX_COUNT;
+}
+
+void TCB0_CAPTInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB0_CAPTInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB0_OVFInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB0_OVFInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB0_IsCaptInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB0_IsOvfInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB0_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB0_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB0_INT_vect)
+{
+ if (0U != (TCB0.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB0_CAPT_isr_cb != NULL)
+ {
+ (*TCB0_CAPT_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB0.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB0_OVF_isr_cb != NULL)
+ {
+ (*TCB0_OVF_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/src/tcb1.c b/non-inverting-pga.X/mcc_generated_files/timer/src/tcb1.c
new file mode 100644
index 0000000..e539285
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/src/tcb1.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB1 Generated Driver File
+ *
+ * @file tcb1.c
+ *
+ * @ingroup tcb1
+ *
+ * @brief This file contains the API implementation for the TCB1 module driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb1.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB1_OVF_isr_cb)(void);
+static void TCB1_DefaultOverflowCallback(void);
+static void (*TCB1_CAPT_isr_cb)(void);
+static void TCB1_DefaultCaptureCallback(void);
+
+void TCB1_Initialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB1.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB1.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB1.CCMP = 0x1388U; // CCMP 0x1388
+
+ TCB1.CNT = 0x0; // CNT 0xNAN
+
+ TCB1.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_OverflowCallbackRegister(TCB1_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_CaptureCallbackRegister(TCB1_DefaultCaptureCallback);
+
+ TCB1.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB1.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (0 << TCB_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB1_Deinitialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CCMP = 0x0;
+
+ TCB1.CNT = 0x0;
+
+ TCB1.CTRLB = 0x0;
+
+ TCB1.DBGCTRL = 0x0;
+
+ TCB1.EVCTRL = 0x0;
+
+ TCB1.INTCTRL = 0x0;
+
+ TCB1.TEMP = 0x0;
+
+ TCB1.CTRLA = 0x0;
+
+ TCB1.INTFLAGS = ~0x0;
+}
+
+void TCB1_Start(void)
+{
+ TCB1.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB1_Stop(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB1_CounterSet(uint16_t timerVal)
+{
+ TCB1.CNT = timerVal;
+}
+
+uint16_t TCB1_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB1.CNT;
+
+ return readVal;
+}
+void TCB1_PeriodSet(uint16_t periodVal)
+{
+ TCB1.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB1_PeriodGet(void)
+{
+ return (uint16_t)TCB1.CCMP;
+}
+
+uint16_t TCB1_MaxCountGet(void)
+{
+ return TCB1_MAX_COUNT;
+}
+
+void TCB1_CAPTInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB1_CAPTInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB1_OVFInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB1_OVFInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB1_IsCaptInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB1_IsOvfInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB1_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB1_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB1_INT_vect)
+{
+ if (0U != (TCB1.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB1_CAPT_isr_cb != NULL)
+ {
+ (*TCB1_CAPT_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB1.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB1_OVF_isr_cb != NULL)
+ {
+ (*TCB1_OVF_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/tcb0.h b/non-inverting-pga.X/mcc_generated_files/timer/tcb0.h
new file mode 100644
index 0000000..cdca1b9
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/tcb0.h
@@ -0,0 +1,205 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the API prototypes and other data types for TCB0.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_H_INCLUDED
+#define TCB0_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb0_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 maximum count value
+ */
+#define TCB0_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Initializes the TCB0 module
+ * @param None.
+ * @return None.
+ */
+void TCB0_Initialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Deinitializes the TCB0 module.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Deinitialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Starts the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Start(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Stops the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Stop(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB0_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb0
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB0_CounterGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB0_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB0_PeriodGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB0_MaxCountGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/tcb0_deprecated.h b/non-inverting-pga.X/mcc_generated_files/timer/tcb0_deprecated.h
new file mode 100644
index 0000000..bc8bb5a
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/tcb0_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB0 driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_DEPRECATED_H
+#define TCB0_DEPRECATED_H
+
+#warning "The tcb0_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterGet API.
+ * The TCB0_Read will be deprecated in the future release. Use TCB0_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Read TCB0_CounterGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_Write will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Write TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptEnable API.
+ * The TCB0_EnableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableCaptInterrupt TCB0_CAPTInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptDisable API.
+ * The TCB0_DisableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableCaptInterrupt TCB0_CAPTInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptEnable API.
+ * The TCB0_EnableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableOvfInterrupt TCB0_OVFInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptDisable API.
+ * The TCB0_DisableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableOvfInterrupt TCB0_OVFInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusClear API.
+ * The TCB0_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearOvfInterruptFlag TCB0_OverflowStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusClear API.
+ * The TCB0_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearCaptInterruptFlag TCB0_CaptureStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusGet API.
+ * The TCB0_IsOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsOvfInterruptFlag TCB0_OverflowStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusGet API.
+ * The TCB0_IsCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsCaptInterruptFlag TCB0_CaptureStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Start API.
+ * The TCB0_PWM_Enable will be deprecated in the future release. Use TCB0_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Enable TCB0_Start
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Stop API.
+ * The TCB0_PWM_Disable will be deprecated in the future release. Use TCB0_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Disable TCB0_Stop
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_load_counter will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_counter TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_PeriodSet API.
+ * The TCB0_load_top will be deprecated in the future release. Use TCB0_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_top TCB0_PeriodSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_DutyCycleSet API.
+ * The TCB0_load_duty_cycle will be deprecated in the future release. Use TCB0_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_duty_cycle TCB0_DutyCycleSet
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+#endif // TCB0_DEPRECATED_H
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/tcb1.h b/non-inverting-pga.X/mcc_generated_files/timer/tcb1.h
new file mode 100644
index 0000000..d253414
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/tcb1.h
@@ -0,0 +1,205 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the API prototypes and other data types for TCB1.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_H_INCLUDED
+#define TCB1_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb1_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 maximum count value
+ */
+#define TCB1_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Initializes the TCB1 module
+ * @param None.
+ * @return None.
+ */
+void TCB1_Initialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Deinitializes the TCB1 module.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Deinitialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Starts the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Start(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Stops the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Stop(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB1_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb1
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB1_CounterGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB1_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB1_PeriodGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB1_MaxCountGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/timer/tcb1_deprecated.h b/non-inverting-pga.X/mcc_generated_files/timer/tcb1_deprecated.h
new file mode 100644
index 0000000..8c47aed
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/timer/tcb1_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB1 driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_DEPRECATED_H
+#define TCB1_DEPRECATED_H
+
+#warning "The tcb1_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterGet API.
+ * The TCB1_Read will be deprecated in the future release. Use TCB1_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Read TCB1_CounterGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_Write will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Write TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptEnable API.
+ * The TCB1_EnableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableCaptInterrupt TCB1_CAPTInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptDisable API.
+ * The TCB1_DisableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableCaptInterrupt TCB1_CAPTInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptEnable API.
+ * The TCB1_EnableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableOvfInterrupt TCB1_OVFInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptDisable API.
+ * The TCB1_DisableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableOvfInterrupt TCB1_OVFInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusClear API.
+ * The TCB1_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearOvfInterruptFlag TCB1_OverflowStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusClear API.
+ * The TCB1_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearCaptInterruptFlag TCB1_CaptureStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusGet API.
+ * The TCB1_IsOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsOvfInterruptFlag TCB1_OverflowStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusGet API.
+ * The TCB1_IsCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsCaptInterruptFlag TCB1_CaptureStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Start API.
+ * The TCB1_PWM_Enable will be deprecated in the future release. Use TCB1_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Enable TCB1_Start
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Stop API.
+ * The TCB1_PWM_Disable will be deprecated in the future release. Use TCB1_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Disable TCB1_Stop
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_load_counter will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_counter TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_PeriodSet API.
+ * The TCB1_load_top will be deprecated in the future release. Use TCB1_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_top TCB1_PeriodSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_DutyCycleSet API.
+ * The TCB1_load_duty_cycle will be deprecated in the future release. Use TCB1_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_duty_cycle TCB1_DutyCycleSet
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+#endif // TCB1_DEPRECATED_H
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/uart/src/usart3.c b/non-inverting-pga.X/mcc_generated_files/uart/src/usart3.c
new file mode 100644
index 0000000..8ce1b02
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/uart/src/usart3.c
@@ -0,0 +1,309 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.c
+ *
+ * @ingroup usart3
+ *
+ * @brief This is the generated driver implementation file for the USART3 driver using
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+/**
+ Section: Included Files
+*/
+
+#include "../usart3.h"
+
+/**
+ Section: Macro Declarations
+*/
+
+
+
+/**
+ Section: Driver Interface
+ */
+
+const uart_drv_interface_t UART3 = {
+ .Initialize = &USART3_Initialize,
+ .Deinitialize = &USART3_Deinitialize,
+ .Read = &USART3_Read,
+ .Write = &USART3_Write,
+ .IsRxReady = &USART3_IsRxReady,
+ .IsTxReady = &USART3_IsTxReady,
+ .IsTxDone = &USART3_IsTxDone,
+ .TransmitEnable = &USART3_TransmitEnable,
+ .TransmitDisable = &USART3_TransmitDisable,
+ .AutoBaudSet = &USART3_AutoBaudSet,
+ .AutoBaudQuery = &USART3_AutoBaudQuery,
+ .BRGCountSet = NULL,
+ .BRGCountGet = NULL,
+ .BaudRateSet = NULL,
+ .BaudRateGet = NULL,
+ .AutoBaudEventEnableGet = NULL,
+ .ErrorGet = &USART3_ErrorGet,
+ .TxCompleteCallbackRegister = NULL,
+ .RxCompleteCallbackRegister = NULL,
+ .TxCollisionCallbackRegister = NULL,
+ .FramingErrorCallbackRegister = &USART3_FramingErrorCallbackRegister,
+ .OverrunErrorCallbackRegister = &USART3_OverrunErrorCallbackRegister,
+ .ParityErrorCallbackRegister = &USART3_ParityErrorCallbackRegister,
+ .EventCallbackRegister = NULL,
+};
+
+/**
+ Section: USART3 variables
+*/
+static volatile usart3_status_t usart3RxLastError;
+
+/**
+ Section: USART3 APIs
+*/
+void (*USART3_FramingErrorHandler)(void);
+void (*USART3_OverrunErrorHandler)(void);
+void (*USART3_ParityErrorHandler)(void);
+
+static void USART3_DefaultFramingErrorCallback(void);
+static void USART3_DefaultOverrunErrorCallback(void);
+static void USART3_DefaultParityErrorCallback(void);
+
+
+
+/**
+ Section: USART3 APIs
+*/
+
+void USART3_Initialize(void)
+{
+ // Set the USART3 module to the options selected in the user interface.
+
+ //BAUD 138;
+ USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
+
+ // ABEIE disabled; DREIE disabled; LBME disabled; RS485 DISABLE; RXCIE disabled; RXSIE disabled; TXCIE disabled;
+ USART3.CTRLA = 0x0;
+
+ // MPCM disabled; ODME disabled; RXEN disabled; RXMODE NORMAL; SFDEN disabled; TXEN enabled;
+ USART3.CTRLB = 0x40;
+
+ // CMODE Asynchronous Mode; UCPHA enabled; UDORD disabled; CHSIZE Character size: 8 bit; PMODE No Parity; SBMODE 1 stop bit;
+ USART3.CTRLC = 0x3;
+
+ //DBGRUN disabled;
+ USART3.DBGCTRL = 0x0;
+
+ //IREI disabled;
+ USART3.EVCTRL = 0x0;
+
+ //RXPL 0x0;
+ USART3.RXPLCTRL = 0x0;
+
+ //TXPL 0x0;
+ USART3.TXPLCTRL = 0x0;
+
+ USART3_FramingErrorCallbackRegister(USART3_DefaultFramingErrorCallback);
+ USART3_OverrunErrorCallbackRegister(USART3_DefaultOverrunErrorCallback);
+ USART3_ParityErrorCallbackRegister(USART3_DefaultParityErrorCallback);
+ usart3RxLastError.status = 0;
+}
+
+void USART3_Deinitialize(void)
+{
+ USART3.BAUD = 0x00;
+ USART3.CTRLA = 0x00;
+ USART3.CTRLB = 0x00;
+ USART3.CTRLC = 0x00;
+ USART3.DBGCTRL = 0x00;
+ USART3.EVCTRL = 0x00;
+ USART3.RXPLCTRL = 0x00;
+ USART3.TXPLCTRL = 0x00;
+}
+
+void USART3_Enable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
+}
+
+void USART3_Disable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
+}
+
+void USART3_TransmitEnable(void)
+{
+ USART3.CTRLB |= USART_TXEN_bm;
+}
+
+void USART3_TransmitDisable(void)
+{
+ USART3.CTRLB &= ~(USART_TXEN_bm);
+}
+
+void USART3_ReceiveEnable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm ;
+}
+
+void USART3_ReceiveDisable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm);
+}
+
+void USART3_AutoBaudSet(bool enable)
+{
+ if(enable)
+ {
+ USART3.CTRLB |= USART_RXMODE_gm & (0x02 << USART_RXMODE_gp);
+ USART3.STATUS |= USART_WFB_bm ;
+ }
+ else
+ {
+ USART3.CTRLB &= ~(USART_RXMODE_gm);
+ USART3.STATUS &= ~(USART_BDF_bm);
+ }
+}
+
+bool USART3_AutoBaudQuery(void)
+{
+ return (bool)(USART3.STATUS & USART_BDF_bm) ;
+}
+
+bool USART3_IsAutoBaudDetectError(void)
+{
+ return (bool)(USART3.STATUS & USART_ISFIF_bm) ;
+}
+
+void USART3_AutoBaudDetectErrorReset(void)
+{
+ USART3.STATUS |= USART_ISFIF_bm ;
+ USART3_AutoBaudSet(false);
+ USART3_ReceiveDisable();
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ USART3_ReceiveEnable();
+ USART3_AutoBaudSet(true);
+}
+
+bool USART3_IsRxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_RXCIF_bm);
+}
+
+bool USART3_IsTxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_DREIF_bm);
+}
+
+bool USART3_IsTxDone(void)
+{
+ return (bool)(USART3.STATUS & USART_TXCIF_bm);
+}
+
+size_t USART3_ErrorGet(void)
+{
+ usart3RxLastError.status = 0;
+
+ if(USART3.RXDATAH & USART_FERR_bm)
+ {
+ usart3RxLastError.ferr = 1;
+ if(NULL != USART3_FramingErrorHandler)
+ {
+ USART3_FramingErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_PERR_bm)
+ {
+ usart3RxLastError.perr = 1;
+ if(NULL != USART3_ParityErrorHandler)
+ {
+ USART3_ParityErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_BUFOVF_bm)
+ {
+ usart3RxLastError.oerr = 1;
+ if(NULL != USART3_OverrunErrorHandler)
+ {
+ USART3_OverrunErrorHandler();
+ }
+ }
+ return usart3RxLastError.status;
+}
+
+uint8_t USART3_Read(void)
+{
+ return USART3.RXDATAL;
+}
+
+
+void USART3_Write(uint8_t txData)
+{
+ USART3.TXDATAL = txData; // Write the data byte to the USART.
+}
+static void USART3_DefaultFramingErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultOverrunErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultParityErrorCallback(void)
+{
+
+}
+
+void USART3_FramingErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_FramingErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_OverrunErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_OverrunErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_ParityErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_ParityErrorHandler = callbackHandler;
+ }
+}
+
+
+
+
diff --git a/non-inverting-pga.X/mcc_generated_files/uart/uart_drv_interface.h b/non-inverting-pga.X/mcc_generated_files/uart/uart_drv_interface.h
new file mode 100644
index 0000000..3c4a04b
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/uart/uart_drv_interface.h
@@ -0,0 +1,90 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_drv_interface.h
+ *
+ * @defgroup uart_drv_interface UART_DRV_INTERFACE
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_DRV_INTERFACE_H
+#define UART_DRV_INTERFACE_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+#include "uart_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+ @ingroup UART
+ @struct uart_drv_interface_t
+ @brief Structure containing the function pointers of UART driver.
+*/
+typedef struct {
+void (*Initialize)(void);
+void (*Deinitialize)(void);
+uint8_t (*Read)(void);
+void (*Write)(uint8_t);
+bool (*IsRxReady)(void);
+bool (*IsTxReady)(void);
+bool (*IsTxDone)(void);
+void (*TransmitEnable)(void);
+void (*TransmitDisable)(void);
+void (*AutoBaudSet)(bool enable);
+bool (*AutoBaudQuery)(void);
+bool (*AutoBaudEventEnableGet)(void);
+void (*BRGCountSet)(uint32_t brgValue);
+uint32_t (*BRGCountGet)(void);
+void (*BaudRateSet)(uint32_t baudRate);
+uint32_t (*BaudRateGet)(void);
+size_t (*ErrorGet)(void);
+void (*TxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*RxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*TxCollisionCallbackRegister)(void (*CallbackHandler) (void));
+void (*FramingErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*OverrunErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*ParityErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*EventCallbackRegister)(void (*CallbackHandler) (void));
+}uart_drv_interface_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_DRV_INTERFACE_H */
+
diff --git a/non-inverting-pga.X/mcc_generated_files/uart/uart_types.h b/non-inverting-pga.X/mcc_generated_files/uart/uart_types.h
new file mode 100644
index 0000000..33de07b
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/uart/uart_types.h
@@ -0,0 +1,81 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_types.h
+ *
+ * @defgroup uart_types UART_TYPES
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_TYPES_H
+#define UART_TYPES_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+@ingroup uartdriver
+@enum UART_STANDARD_BAUDS
+@brief This Enum can be used to set UART standard
+baud-rates using \ref UARTx_BRGSet function e.g. \ref UART1_BRGSet.
+*/
+enum UART_STANDARD_BAUDS{
+UART_110 = 0,
+UART_300 = 1,
+UART_600 = 2,
+UART_1200 = 3,
+UART_2400 = 4,
+UART_4800 = 5,
+UART_9600 = 6,
+UART_14400 = 7,
+UART_19200 = 8,
+UART_38400 = 9,
+UART_57600 = 10,
+UART_115200 = 11,
+UART_230400 = 12,
+UART_460800 = 13,
+UART_921600 = 14,
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_TYPES_H */
+
diff --git a/non-inverting-pga.X/mcc_generated_files/uart/usart3.h b/non-inverting-pga.X/mcc_generated_files/uart/usart3.h
new file mode 100644
index 0000000..255742a
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/uart/usart3.h
@@ -0,0 +1,306 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.h
+ *
+ * @defgroup usart3 USART3
+ *
+ * @brief This file contains API prototypes and other datatypes for USART3 module.
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef USART3_H
+#define USART3_H
+
+/**
+ Section: Included Files
+ */
+
+#include
+#include
+#include
+#include "../system/system.h"
+#include "uart_drv_interface.h"
+
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+
+/* Normal Mode, Baud register value */
+#define USART3_BAUD_RATE(BAUD_RATE) (((float)4000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
+
+#define UART3_interface UART3
+
+
+#define UART3_Initialize USART3_Initialize
+#define UART3_Deinitialize USART3_Deinitialize
+#define UART3_Write USART3_Write
+#define UART3_Read USART3_Read
+#define UART3_IsRxReady USART3_IsRxReady
+#define UART3_IsTxReady USART3_IsTxReady
+#define UART3_IsTxDone USART3_IsTxDone
+
+#define UART3_TransmitEnable USART3_TransmitEnable
+#define UART3_TransmitDisable USART3_TransmitDisable
+#define UART3_AutoBaudSet USART3_AutoBaudSet
+#define UART3_AutoBaudQuery USART3_AutoBaudQuery
+#define UART3_IsAutoBaudDetectError USART3_IsAutoBaudDetectError
+#define UART3_AutoBaudDetectErrorReset USART3_AutoBaudDetectErrorReset
+#define UART3_BRGCountSet (NULL)
+#define UART3_BRGCountGet (NULL)
+#define UART3_BaudRateSet (NULL)
+#define UART3_BaudRateGet (NULL)
+#define UART3_AutoBaudEventEnableGet (NULL)
+#define UART3_ErrorGet USART3_ErrorGet
+
+#define UART3_TxCompleteCallbackRegister (NULL)
+#define UART3_RxCompleteCallbackRegister (NULL)
+#define UART3_TxCollisionCallbackRegister (NULL)
+#define UART3_FramingErrorCallbackRegister USART3_FramingErrorCallbackRegister
+#define UART3_OverrunErrorCallbackRegister USART3_OverrunErrorCallbackRegister
+#define UART3_ParityErrorCallbackRegister USART3_ParityErrorCallbackRegister
+#define UART3_EventCallbackRegister (NULL)
+
+
+/**
+ @ingroup usart3
+ @struct usart3_status_t
+ @breif This is an instance of USART3_STATUS for USART3 module
+ */
+typedef union {
+ struct {
+ uint8_t perr : 1; /**
-#elif defined(__IAR_SYSTEMS_ASM__)
-#include "assembler/iar.h"
-#include
-#endif
-
-#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/atomic.h b/non-inverting-pga.X/mcc_generated_files/utils/atomic.h
deleted file mode 100644
index 7b99064..0000000
--- a/non-inverting-pga.X/mcc_generated_files/utils/atomic.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ATOMIC_H
-#define ATOMIC_H
-
-/**
- * \defgroup doc_driver_utils_atomic Atomic memory access and critical sections
- * \ingroup doc_driver_utils
- *
- * Atomic memory access and critical sections
- *
- * \{
- */
-
-/* clang-format off */
-
-#if defined(__GNUC__) || defined (__DOXYGEN__)
-
-/**
- * \brief Enter a critical region
- *
- * Saves the contents of the status register, including the Global
- * Interrupt Enable bit, so that it can be restored upon leaving the
- * critical region. Thereafter, clears the Global Interrupt Enable Bit.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler declares a variable with the name of the parameter for
- * holding the SREG value. Since a variable is declared in the macro,
- * this variable must have a name that is unique within the scope
- * that the critical region is declared within, otherwise compilation
- * will fail.
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "in __tmp_reg__, __SREG__" "\n\t" \
- "cli" "\n\t" \
- "push __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-/**
- * \brief Exit a critical region
- *
- * Restores the contents of the status register, including the Global
- * Interrupt Enable bit, as it was when entering the critical region.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler uses this parameter as the name of a variable that holds
- * the SREG value. The parameter must be identical to the parameter
- * used in the corresponding ENTER_CRITICAL().
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "pop __tmp_reg__" "\n\t" \
- "out __SREG__, __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
-#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
-
-#elif defined(__ICCAVR__)
-
-#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
-#define EXIT_CRITICAL(P) __restore_interrupt(P);
-
-#define DISABLE_INTERRUPTS() __disable_interrupt();
-#define ENABLE_INTERRUPTS() __enable_interrupt();
-
-#else
-# error Unsupported compiler.
-#endif
-
-/* clang-format on */
-
-#endif /* ATOMIC_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/compiler.h b/non-inverting-pga.X/mcc_generated_files/utils/compiler.h
deleted file mode 100644
index fbd7a59..0000000
--- a/non-inverting-pga.X/mcc_generated_files/utils/compiler.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef UTILS_COMPILER_H
-#define UTILS_COMPILER_H
-
-/**
- * \defgroup doc_driver_utils_compiler Compiler abstraction
- * \ingroup doc_driver_utils
- *
- * Compiler abstraction layer and code utilities for 8-bit AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#if defined(__GNUC__)
-#include
-#include
-#elif defined(__ICCAVR__)
-#define ENABLE_BIT_DEFINITIONS 1
-#include
-#include
-
-#ifndef CCP_IOREG_gc
-#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
-#endif
-#ifndef CCP_SPM_gc
-#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
-#endif
-
-#else
-#error Unsupported compiler.
-#endif
-
-#include
-#include
-#include
-#include
-
-#include "interrupt_avr8.h"
-
-/**
- * \def UNUSED
- * \brief Marking \a v as a unused parameter or value.
- */
-#define UNUSED(v) (void)(v)
-
-#endif /* UTILS_COMPILER_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/interrupt_avr8.h b/non-inverting-pga.X/mcc_generated_files/utils/interrupt_avr8.h
deleted file mode 100644
index ad1efd7..0000000
--- a/non-inverting-pga.X/mcc_generated_files/utils/interrupt_avr8.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_interrupts ISR abstraction
- * \ingroup doc_driver_utils
- *
- * Interrupt-related functionality.
- *
- * \{
- */
-
-#ifndef UTILS_INTERRUPT_AVR8_H
-#define UTILS_INTERRUPT_AVR8_H
-
-/**
- * \weakgroup interrupt_group
- *
- * @{
- */
-
-#ifdef ISR_CUSTOM_H
-#include ISR_CUSTOM_H
-#else
-
-/**
- * \def ISR
- * \brief Define service routine for specified interrupt vector
- *
- * Usage:
- * \code
- ISR(FOO_vect)
- {
- ...
- }
-\endcode
- *
- * \param vect Interrupt vector name as found in the device header files.
- */
-#if defined(__DOXYGEN__)
-#define ISR(vect)
-#elif defined(__GNUC__)
-#include
-#elif defined(__ICCAVR__)
-#define __ISR(x) _Pragma(#x)
-#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
-#endif
-#endif // ISR_CUSTOM_H
-
-#ifdef __GNUC__
-#define cpu_irq_enable() sei()
-#define cpu_irq_disable() cli()
-#else
-#define cpu_irq_enable() __enable_interrupt()
-#define cpu_irq_disable() __disable_interrupt()
-#endif
-
-//! @}
-
-/**
- * \weakgroup interrupt_deprecated_group
- * @{
- */
-// Deprecated definitions.
-#define Enable_global_interrupt() cpu_irq_enable()
-#define Disable_global_interrupt() cpu_irq_disable()
-#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
-//! @}
-
-#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/utils.h b/non-inverting-pga.X/mcc_generated_files/utils/utils.h
deleted file mode 100644
index b133c4d..0000000
--- a/non-inverting-pga.X/mcc_generated_files/utils/utils.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils AVR Code utility functions
- *
- * Compiler abstraction layer and code utilities for AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#ifndef UTILS_H_INCLUDED
-#define UTILS_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Retrieve array size
- */
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTILS_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/utils/utils_assert.h b/non-inverting-pga.X/mcc_generated_files/utils/utils_assert.h
deleted file mode 100644
index 25c322e..0000000
--- a/non-inverting-pga.X/mcc_generated_files/utils/utils_assert.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_assert Functionality for assert.
- * \ingroup doc_driver_utils
- *
- * \{
- */
-
-#ifndef _ASSERT_H_INCLUDED
-#define _ASSERT_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-/**
- * \brief Assert macro
- *
- * This macro is used to throw asserts. It can be mapped to different function
- * based on debug level.
- *
- * \param[in] condition A condition to be checked;
- * assert is thrown if the given condition is false
- */
-
-#ifdef DEBUG
-#define ASSERT(condition) \
- if (!(condition)) \
- while (true) \
- ;
-#else
-#define ASSERT(condition) ((void)0)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _ASSERT_H_INCLUDED */
diff --git a/non-inverting-pga.X/mcc_generated_files/vref/src/vref.c b/non-inverting-pga.X/mcc_generated_files/vref/src/vref.c
new file mode 100644
index 0000000..b504765
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/vref/src/vref.c
@@ -0,0 +1,47 @@
+/**
+ * VREF Generated Driver File.
+ *
+ * @file vref.c
+ *
+ * @ingroup vref
+ *
+ * @brief This file contains the API implementation for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../vref.h"
+
+int8_t VREF_Initialize(void)
+{
+ // ALWAYSON disabled; REFSEL Internal 1.024V reference;
+ VREF.ACREF = 0x0;
+
+ // ALWAYSON enabled; REFSEL Internal 1.024V reference;
+ VREF.ADC0REF = 0x80;
+
+ // ALWAYSON enabled; REFSEL Internal 1.024V reference;
+ VREF.DAC0REF = 0x80;
+
+ return 0;
+}
\ No newline at end of file
diff --git a/non-inverting-pga.X/mcc_generated_files/vref/vref.h b/non-inverting-pga.X/mcc_generated_files/vref/vref.h
new file mode 100644
index 0000000..8186128
--- /dev/null
+++ b/non-inverting-pga.X/mcc_generated_files/vref/vref.h
@@ -0,0 +1,55 @@
+/**
+ * VREF Generated Driver API Header File
+ *
+ * @file vref.h
+ *
+ * @defgroup vref VREF
+ *
+ * @brief This file contains the API prototypes for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef VREF_H_INCLUDED
+#define VREF_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup vref
+ * @brief Initializes the VREF module.
+ * @param None.
+ * @retval 0 - VREF is initialized successfully.
+ */
+int8_t VREF_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VREF_H_INCLUDED */
\ No newline at end of file
diff --git a/non-inverting-pga.X/nbproject/configurations.xml b/non-inverting-pga.X/nbproject/configurations.xml
index e0f6cff..cb799d5 100644
--- a/non-inverting-pga.X/nbproject/configurations.xml
+++ b/non-inverting-pga.X/nbproject/configurations.xml
@@ -7,40 +7,65 @@
-
- mcc_generated_files/config/clock_config.h
+
+ mcc_generated_files/adc/adc0.h
-
- mcc_generated_files/include/dac0.h
- mcc_generated_files/include/cpuint.h
- mcc_generated_files/include/port.h
- mcc_generated_files/include/rtc.h
- mcc_generated_files/include/vref.h
- mcc_generated_files/include/pin_manager.h
- mcc_generated_files/include/opamp.h
- mcc_generated_files/include/ccp.h
- mcc_generated_files/include/rstctrl.h
- mcc_generated_files/include/usart3.h
- mcc_generated_files/include/adc0.h
- mcc_generated_files/include/protected_io.h
- mcc_generated_files/include/tcb0.h
- mcc_generated_files/include/tcb1.h
+
+ mcc_generated_files/dac/dac0.h
-
-
- mcc_generated_files/utils/assembler/iar.h
- mcc_generated_files/utils/assembler/gas.h
+
+ mcc_generated_files/data_streamer/data_streamer.h
+
+
+ mcc_generated_files/opamp/opamp.h
+
+
+
+
+ mcc_generated_files/system/utils/assembler/gas.h
+ mcc_generated_files/system/utils/assembler/iar.h
+
+ mcc_generated_files/system/utils/interrupt_avr8.h
+ mcc_generated_files/system/utils/compiler.h
+ mcc_generated_files/system/utils/utils_assert.h
+ mcc_generated_files/system/utils/atomic.h
+ mcc_generated_files/system/utils/assembler.h
+ mcc_generated_files/system/utils/utils.h
- mcc_generated_files/utils/compiler.h
- mcc_generated_files/utils/interrupt_avr8.h
- mcc_generated_files/utils/utils.h
- mcc_generated_files/utils/utils_assert.h
- mcc_generated_files/utils/assembler.h
- mcc_generated_files/utils/atomic.h
+ mcc_generated_files/system/ccp.h
+ mcc_generated_files/system/pins.h
+ mcc_generated_files/system/system.h
+ mcc_generated_files/system/protected_io.h
+ mcc_generated_files/system/config_bits.h
+ mcc_generated_files/system/clock.h
+ mcc_generated_files/system/port.h
+ mcc_generated_files/system/interrupt.h
+
+
+ mcc_generated_files/timer/tcb0_deprecated.h
+ mcc_generated_files/timer/tcb0.h
+ mcc_generated_files/timer/tcb1.h
+ mcc_generated_files/timer/tcb1_deprecated.h
+ mcc_generated_files/timer/rtc.h
+
+
+ mcc_generated_files/uart/usart3.h
+ mcc_generated_files/uart/uart_types.h
+ mcc_generated_files/uart/uart_drv_interface.h
+
+
+ mcc_generated_files/vref/vref.h
- mcc_generated_files/mcc.h
- data_stream.h
+
+
+ Makefile
+ MyConfig.mc3
+ non-inverting-pga.mc3
-
- mcc_generated_files/src/pin_manager.c
- mcc_generated_files/src/cpuint.c
- mcc_generated_files/src/protected_io.S
- mcc_generated_files/src/adc0.c
- mcc_generated_files/src/usart3.c
- mcc_generated_files/src/vref.c
- mcc_generated_files/src/opamp.c
- mcc_generated_files/src/rtc.c
- mcc_generated_files/src/dac0.c
- mcc_generated_files/src/tcb0.c
- mcc_generated_files/src/tcb1.c
+
+
+ mcc_generated_files/adc/src/adc0.c
+
+
+
+
+ mcc_generated_files/dac/src/dac0.c
+
+
+
+
+ mcc_generated_files/data_streamer/src/data_streamer.c
+
+ mcc_generated_files/data_streamer/data_streamer.ds
+
+
+
+ mcc_generated_files/opamp/src/opamp.c
+
+
+
+
+ mcc_generated_files/system/src/protected_io.S
+ mcc_generated_files/system/src/clock.c
+ mcc_generated_files/system/src/system.c
+ mcc_generated_files/system/src/pins.c
+ mcc_generated_files/system/src/interrupt.c
+ mcc_generated_files/system/src/config_bits.c
+
+
+
+
+ mcc_generated_files/timer/src/rtc.c
+ mcc_generated_files/timer/src/tcb1.c
+ mcc_generated_files/timer/src/tcb0.c
+
+
+
+
+ mcc_generated_files/uart/src/usart3.c
+
+
+
+
+ mcc_generated_files/vref/src/vref.c
+
- mcc_generated_files/mcc.c
- mcc_generated_files/device_config.c
main.c
- data_stream.c
-
-
- Makefile
- MyConfig.mc3
@@ -89,13 +142,13 @@
AVR128DB48
- noID
+ nEdbgTool
XC8
- 2.30
+ 2.50
3
-
+
@@ -148,9 +201,9 @@
-
+
@@ -160,6 +213,7 @@
+
@@ -245,17 +299,70 @@
value="Press to select which tool pack to use"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -268,13 +375,19 @@
+
+
+
+
+
+
@@ -288,7 +401,6 @@
value="${memories.instruction.ram.ranges}"/>
-
@@ -371,13 +483,13 @@
AVR128DB48
-
+ noID
XC8
- 2.20
+ 2.50
3
-
+
@@ -430,9 +542,9 @@
-
+
@@ -442,6 +554,7 @@
+
@@ -529,15 +642,19 @@
+
+
+
+
diff --git a/non-inverting-pga.X/non-inverting-pga.mc3 b/non-inverting-pga.X/non-inverting-pga.mc3
new file mode 100644
index 0000000..8ff9d52
--- /dev/null
+++ b/non-inverting-pga.X/non-inverting-pga.mc3
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ADC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Application Builder
+ class com.microchip.mcc.melody.module.FrameworkModule
+
+
+ CLKCTRL
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ CPUINT
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Configuration Bits
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ DAC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ MAIN MANAGER
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ OPAMP
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Pin Manager
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ RTC
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB1
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ USART3
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ VREF
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ meta
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ module0
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module1
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module19
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module2
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module23
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module3
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module4
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module46
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module48
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module5
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module70
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module77
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module8
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module80
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module81
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module9
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+
+
+
+
+
+
+ {}
+
+
+
+ {"userAddedModules":["module5","module4","module9","module8","module48","module1","module0","module3","module2","module46","module77","module70","module81","module80"],"version":"CURRENT","modules":{"module5":{"scriptId":"@mchp-mcc/scf-avr8-clkctrl-v3","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"scf_avr8_clkctrl_v3":{"interfaceId":{"name":"scf-avr8-clkctrl-v3","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CLKCTRL"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"configbits_basic_interface":{"interfaceId":{"name":"configbits-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"configbits_basic_interface"}},"config_device":{"interfaceId":{"name":"config-device","version":"^1"},"handle":{"providerId":"module1","exportId":"config_device"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"frqselOschfctrla":"4 MHz system clock (default)","penMclkctrlb":false,"pdivMclkctrlb":"6X"}}}},"module4":{"scriptId":"@mchp-mcc/scf-avr8-interrupt-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_interrupt_v1":{"interfaceId":{"name":"scf-avr8-interrupt-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CPUINT"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"iSreg":true}}}},"module9":{"scriptId":"@mchp-mcc/scf-avr8-vref-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_vref_v1":{"interfaceId":{"name":"scf-avr8-vref-v1","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"vdd":3.3,"alwaysonAdc0ref":true,"refselAdc0ref":"Internal 1.024V reference","alwaysonDac0ref":true,"refselDac0ref":"Internal 1.024V reference"}}}},"module8":{"scriptId":"@mchp-mcc/data-streamer-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic-drv-interface","version":"^2.1.0"},"handle":{"providerId":"module23","exportId":"uart_basic_drv_interface"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"software":{"dataStreamerTable":[{"rowId":0.0,"uid":"defaultRow_0","varName":"dacVal","varType":"uint16_t"},{"rowId":1.0,"uid":"dynamicRow_1730713492275","dynamicallyAdded":true,"varName":"opampVal","varType":"uint16_t"}]}}}},"module48":{"scriptId":"@mchp-mcc/scf-avr8-opamp-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"DAC":{"interfaceId":{"name":"dac-general-parameters-avr8","version":"^0.1.0"},"handle":{"providerId":"module70","exportId":"DAC"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_opamp_v1":{"interfaceId":{"name":"scf-avr8-opamp-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"OPAMP"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"mode":"Single OPAMPs","tripleOpampConfiguration":"Instrumentation Amplifier","op1Enabled":false,"op2Enabled":false,"op0Configuration":"Non-Inverting Programmable Gain Amplifier"},"op0Hardware":{"muxposOp0inmux":"DAC output","op0CustomGain":"3","muxwipOp0resmux":"R1 \u003d 8R, R2 \u003d 8R, R2/R1 \u003d 1"},"op1Hardware":{"muxposOp1inmux":"DAC output","op1CustomGain":"3"},"op2Hardware":{"op2CustomGain":"3"},"software":{"op0outAttribs":{"PD2":{"ioc":"NONE"}},"op1outAttribs":{"PD5":{"ioc":"NONE"}},"op2outAttribs":{"PE2":{"ioc":"NONE"}}},"global":{"irselPwrctrl":"FULL"}}}},"module1":{"scriptId":"@mchp-mcc/avr8-configuration-bits-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_main":{"interfaceId":{"name":"initializer-main","version":"^0.*"},"handle":{"providerId":"module0","exportId":"initializer_main"}},"avr8_configuration_bits_v1":{"interfaceId":{"name":"avr8-configuration-bits-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Configuration Bits"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module0":{"scriptId":"@mchp-mcc/main-manager","imports":{"main":{"interfaceId":{"name":"main-manager","version":"^1.*"},"handle":{"providerId":"mccDevice","exportId":"MAIN MANAGER"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module3":{"scriptId":"@mchp-mcc/pin-content-processor","imports":{"device-meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin-architecture":{"interfaceId":{"name":"pin-architecture","version":"1.0.0"},"handle":{"providerId":"module2","exportId":"pin-architecture"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"saved":{"meta":{"module":"module48"},"rows":{"pcp":{"GPIO$GPIO$input":{"pins":{"PB3":{"state":"MUL"}}},"GPIO$GPIO$output":{"pins":{"PB3":{"state":"L"}}}}},"userEditedData":{"cname":{"eview":{"PB3":"LED0"}}}}}},"module2":{"scriptId":"@mchp-mcc/avr8-pin-manager","imports":{"avr8-pin-manager":{"interfaceId":{"name":"avr8-pin-manager","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Pin Manager"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"adapterdata":{"cname":{"eview":{"dataMap":{"PB3":{"value":"LED0"}}}}}}},"module19":{"scriptId":"@mchp-mcc/scf-avr8-usart-v1","imports":{"osc_clock":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_usart_v1":{"interfaceId":{"name":"scf-avr8-usart-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"USART3"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"rxc":false},"hardware":{"rxenCtrlb":false}}}},"module46":{"scriptId":"@mchp-mcc/scf-avr8-rtc-v1","imports":{"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_rtc_v1":{"interfaceId":{"name":"scf-avr8-rtc-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"RTC"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"prescalerCtrla":"RTC Clock / 32","requestedPeriodValue":1.0,"requestedCompareValue":0.0}}}},"module23":{"scriptId":"@mchp-mcc/uart-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic","version":"^6.0.0"},"handle":{"providerId":"module19","exportId":"uart_basic","label":"UART3"}}},"framewSpecificState":{"userEditedImports":["uart_basic"]},"payload":{"main":{"interrupt":{"interruptDriven":false}}}},"module77":{"scriptId":"@mchp-mcc/scf-avr8-adc-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"adc_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0"},"handle":{"providerId":"module9","exportId":"VREF"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"scf_avr8_adc_v1":{"interfaceId":{"name":"scf-avr8-adc-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"ADC0"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"resselCtrla":"10-bit mode","leftadjCtrla":false,"muxposMuxpos":"ADC input pin 2"},"interrupt":{"resrdyIntctrl":true},"clockSettgins":{"sampnumCtrlb":"8 results accumulated","sampleLen":1.0},"software":{"anxattribspinkey1":{}}}}},"module70":{"scriptId":"@mchp-mcc/scf-avr8-dac-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"scf_avr8_dac_v1":{"interfaceId":{"name":"scf-avr8-dac-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"DAC0"}},"dac_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0.1.0"},"handle":{"providerId":"module9","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"outenCtrla":true}}}},"module81":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB0"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"clkselCtrla":"DIV1","timerPeriod":4.3E-4},"advanced":{"runstdbyCtrla":true},"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true}}}},"module80":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB1"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true},"hardware":{"timerPeriod":0.00125}}}}},"content":{"@mchp-mcc/avr-8bit":"4.11.0","@mchp-mcc/scf-avr8-dac-v1":"4.0.10","@mchp-mcc/data-streamer-driver":"2.0.1","@mchp-mcc/scf-avr8-tcb-v1":"6.0.0","@mchp-mcc/avr8-pin-manager":"4.6.1","@mchp-mcc/scf-avr8-adc-v1":"4.2.6","@mchp-mcc/scf-avr8-interrupt-v1":"5.0.12","@mchp-mcc/scf-avr8-usart-v1":"10.2.0","@mchp-mcc/main-manager":"3.1.2","@mchp-mcc/scf-avr8-opamp-v1":"1.0.7","@mchp-mcc/scf-avr8-rtc-v1":"4.2.5","@mchp-mcc/pin-content-processor":"3.9.0","@mchp-mcc/uart-driver":"1.10.2","@mchp-mcc/scf-avr8-vref-v1":"4.0.3","@mchp-mcc/scf-avr8-clkctrl-v3":"2.0.10","@mchp-mcc/avr8-configuration-bits-v1":"4.2.14"}}
+
+
+
+
+ main.c
+ 8c0f34e8f96915ad988aa3ea4806527b58b1baf7cd2b4b48ea095186ec987daf
+
+
+ mcc_generated_files\adc\adc0.h
+ 9745d0a3ed92e097097ed23d6f5d20aeaad97ae5ab197d16969759411e89db3e
+
+
+ mcc_generated_files\adc\src\adc0.c
+ dc6e58ebd730df7ed83de9164ca01375a68c9920d76bdde04a879621de7e9985
+
+
+ mcc_generated_files\dac\dac0.h
+ 0549c6cb256039e641849689faac07bd2cdf824d89e7651010b851bdabd5ae5d
+
+
+ mcc_generated_files\dac\src\dac0.c
+ 3b967ab389e7669b5b2fcd31bd20b78c67003f81104d14a98c27dca231cdff0b
+
+
+ mcc_generated_files\data_streamer\data_streamer.ds
+ 3721ae781b96b0bd26a19283e767918b5cea96a3f094f07a22f80819c8656aa7
+
+
+ mcc_generated_files\data_streamer\data_streamer.h
+ fe53812ab04c7af2990c90247b0917b55cb8cf59c7327cdc38735efbc95258b1
+
+
+ mcc_generated_files\data_streamer\src\data_streamer.c
+ f6b1ef7fe11e0343605365ce7bfc7af81cdc33bf43770f5cfd78cf17a49534c5
+
+
+ mcc_generated_files\opamp\opamp.h
+ 11b338f63f4867b1f8d1d537eee65c169d2f6374d59aee22bb564dd4c2f3ebdb
+
+
+ mcc_generated_files\opamp\src\opamp.c
+ 6cdf47ede155ff28bc9a9e80e6f995f4632755c04dac6d387967f309ec624e66
+
+
+ mcc_generated_files\system\ccp.h
+ 00d4c7f49db8510d0ad35d5b65b82db98d0da655c1ea8e81b657e00f49f2640e
+
+
+ mcc_generated_files\system\clock.h
+ 5342e3ba7f014024b35fe2eea86794d9bb9ec656c55311f8b96c34e9eac4b215
+
+
+ mcc_generated_files\system\config_bits.h
+ cfb3dfe72760dc2066638db643962b2a7db39169cfda29327dcb4d3ec4a26be3
+
+
+ mcc_generated_files\system\interrupt.h
+ 49902a470e198f90d0ea9db752f6313c7074811e1a4da98a4d1e8572db7378f5
+
+
+ mcc_generated_files\system\pins.h
+ b26ae4ef405bbc331b310b6ef9a6a5fdf0c3816b9de10d58e6f593013bcf5fdc
+
+
+ mcc_generated_files\system\port.h
+ b11a993ebf82a6c6f20be03184935a8a4cd3798f435debebdb8cb65da36f64fb
+
+
+ mcc_generated_files\system\protected_io.h
+ 72f5b206c649b31773ab739c0828b1eb6f88d99a27e0fc63f6a9f4119e632370
+
+
+ mcc_generated_files\system\src\clock.c
+ 8de3793d4c564ef1697ce28b5d0955018bc0d17d3a8ecb550ac3e53fa4405f7b
+
+
+ mcc_generated_files\system\src\config_bits.c
+ da35086390f11b66ed0afa138a8c6f5adf00722322388b38601d7253b3bee4b1
+
+
+ mcc_generated_files\system\src\interrupt.c
+ e27867b94747dfcde0538b371a10abd3f95c1516a59d4180fc07d5ccf28697a4
+
+
+ mcc_generated_files\system\src\pins.c
+ 3cfd1d61e1d694a5c57b129cb368eab8061a3614a895d109e46b483daaef0e35
+
+
+ mcc_generated_files\system\src\protected_io.S
+ 4b140dbb376219b5a3da75f0eb4d64e14c8baef82193b7b562ad74cfed7d3348
+
+
+ mcc_generated_files\system\src\system.c
+ 7ec1ba179d9e866aa7ec5c242df4667903d9e9cfacb38b157e535969e92840a7
+
+
+ mcc_generated_files\system\system.h
+ d024b1816588238869dcbbafffa667f0d46215c13d079a5e1cfcf90c1d4641de
+
+
+ mcc_generated_files\system\utils\assembler.h
+ ef3dab91390b4a198c234566994c23272765931378bb3d0aa94670e39e6e0d26
+
+
+ mcc_generated_files\system\utils\assembler\gas.h
+ 667f6ffee6461d9ad79483b20b02a35dfc4ad60bf0418e2ecbd19df4991dc38d
+
+
+ mcc_generated_files\system\utils\assembler\iar.h
+ 53c9ca51da473f3a6ae6e42f4056df249a058f10ece6f749e5bdd1ea3ed7a385
+
+
+ mcc_generated_files\system\utils\atomic.h
+ 19307b79f5a6af4e7cc53b21a4736a674bc97bdaa5b381d8f0bdfd008bd48b9a
+
+
+ mcc_generated_files\system\utils\compiler.h
+ 7b9b32dc17152d0780506dc95a87e10ba2f9238d1f2e9d7ad8f7493000036fc0
+
+
+ mcc_generated_files\system\utils\interrupt_avr8.h
+ e4084c0e62035baf526b13eb8e403cde7b00331045cd04839520c845bb0707a6
+
+
+ mcc_generated_files\system\utils\utils.h
+ 1c920a9d95628ccae7945d16093b8d2407f5a5f27dc63c6256b9c52d3ec363f2
+
+
+ mcc_generated_files\system\utils\utils_assert.h
+ d347e0636652e48c7fb7c186ae4336f343801e0acdca339cc724db0807b4fff3
+
+
+ mcc_generated_files\timer\rtc.h
+ 30de4216e54591b4ce33fa8b85e391383b5612c6040cabae2de0dd78b7a2160e
+
+
+ mcc_generated_files\timer\src\rtc.c
+ 8306e8e939cd5445e08215704a3738c4d52084a12ab6b19f0d89add90d79386e
+
+
+ mcc_generated_files\timer\src\tcb0.c
+ cee852845480c8d90f838e23532e7b6058e717fc70e062fb71916779af420776
+
+
+ mcc_generated_files\timer\src\tcb1.c
+ 81c562f8f043f9648e8844fc8b485964b979a58be45985955bb94f93b103db00
+
+
+ mcc_generated_files\timer\tcb0.h
+ 7a1288fc46858406f1c51ae2f96e5853335aca54d6a69ba94fd1c4d7fe553a73
+
+
+ mcc_generated_files\timer\tcb0_deprecated.h
+ 694cb27180c8eefa7d095e8398ca24bf46b04b63a96cb3d13ffc5df87af08e9e
+
+
+ mcc_generated_files\timer\tcb1.h
+ fcee68e8303016d74505dc8d89515bd6562365c9e1416cf08a13b8f7dfe5e933
+
+
+ mcc_generated_files\timer\tcb1_deprecated.h
+ 7f72627208907e46457461ba1aa1514f055bfb43aec861be0d4c8362663c7766
+
+
+ mcc_generated_files\uart\src\usart3.c
+ 50b378761bf7037897f4212befb6d1ac88bdafd88d3cfddb712b3de22b66b91c
+
+
+ mcc_generated_files\uart\uart_drv_interface.h
+ ad5aaf8976724442bdcbffa3c53527147f62a3745058de17e68c8ef5c3204e6e
+
+
+ mcc_generated_files\uart\uart_types.h
+ b7d15f2c3333652fa797c51b4abb616deaa4fff2224347f096c4b40b39963aaa
+
+
+ mcc_generated_files\uart\usart3.h
+ a0408604af9d136ef752a2b7d35f8bc7ee8c385f66f2051433e88799dad7700b
+
+
+ mcc_generated_files\vref\src\vref.c
+ 52d1bf2631a676c72c50988e6db10fb708f758c997f71e6b4cc601cd1eb9b898
+
+
+ mcc_generated_files\vref\vref.h
+ 45d7853bf4d55b39db01525bd3e376e180f317ac74992a5e49ca9436865cbc50
+
+
+
\ No newline at end of file
diff --git a/voltage-follower.X/MyConfig.mc3 b/voltage-follower.X/MyConfig.mc3
deleted file mode 100644
index 0a17755..0000000
--- a/voltage-follower.X/MyConfig.mc3
+++ /dev/null
@@ -1,11636 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Negative input pin for OPn
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 68
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 14
-
-
-
- TCB0
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- enabled
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
-
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- true
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- -0.040%
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 142857
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 68
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
-
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- 23
-
-
-
- false
-
-
-
- 127
-
-
-
- Output Driver Off
-
-
-
- RTC Clock / 32
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampSingle
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 128
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- OFF
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnEventDriven
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- VREF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN2
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- enabled
-
-
-
- enabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 1.024V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 128
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Positive input pin for OPn
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 7
-
-
-
- 5
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- Full Input Range
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 7
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 127
-
-
-
- 0
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 12
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 16
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- 3
-
-
-
- opVoltFollow
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 128
-
-
-
- 65
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- Positive input pin for OPn
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- INP
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opVoltFollow
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
-
-
-
-
- INT
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- 1
-
-
-
- ISR_RTC_PIT
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1.024
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- enabled
-
-
-
- 2000000
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- opVoltFollow
-
-
-
- enabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 1
-
-
-
- 41
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- false
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- true
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opVoltFollow
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- alternate
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 34
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.3
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\include\pin_manager.h
- 3f9734f382bf621e08a9303e8a91f6a3f21bb3810d6c1cdce5133930836c0832
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- f99940ca5c1f1a476aefb94b0ae0350fe7965e6ce033776a7cdb494d2116b482
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\pin_manager.c
- eda02020bf5cc096696230f36bba30491a38d7a422c40f3d3203753df6acb901
-
-
- mcc_generated_files\include\tcb1.h
- 48affc128bd0298e52e46a4e619fbcf1a699d041c2fc6d057e81a28ef6f2f95c
-
-
- mcc_generated_files\src\tcb1.c
- 3f164851af42f06ca7274eccb115b5e055054f3c754f625691c8e7260aea65ac
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\src\tcb0.c
- eb14c823736ca31b0bc3d1a7690505ac49bac351927d50250767f748557af01a
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- b516cde371e7d21c5557b3fce53d804baaa6777d33ec56ce3c8381f15296acf0
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\mcc.h
- 06b890a182d1c7bfef8e2622b8aafc06b513845dbee21949255430689e956b6a
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- mcc_generated_files\src\adc0.c
- 9650fb685485e198db2b65e85b77f04e0c03ae172e47624dc97f202318f6e787
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- 3ff69dbc2cd9907593088060ebc3087887b342d3c4ac859bbf2c145d7fd9ed15
-
-
- mcc_generated_files\include\opamp.h
- dcc643c0e8e8ca9da116865c5f6ffbfe232800231a639abf46ac458d8580d59d
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\src\opamp.c
- 3107078948b74b6be78991a3dacad62cf53bda3bbc00fdfe842a5e4cef29d667
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/voltage-follower.X/MyConfig.mc3.bak b/voltage-follower.X/MyConfig.mc3.bak
deleted file mode 100644
index 0dad30b..0000000
--- a/voltage-follower.X/MyConfig.mc3.bak
+++ /dev/null
@@ -1,11640 +0,0 @@
-
-
-
- RTC
- class com.microchip.mcc.mcu8.modules.rtc.tiny_mega_init.RTC
-
-
- CPUINT
- class com.microchip.mcc.mcu8.interruptManager.cpuint.CPUINT
-
-
- WDT
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.wdt.WDT
-
-
- Pin Module
- class com.microchip.mcc.mcu8.pinManager.PinManager
-
-
- CPU
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.cpu.CPU
-
-
- ADC0
- class com.microchip.mcc.mcu8.modules.adc.tiny_mega_init.ADC
-
-
- System Module
- class com.microchip.mcc.mcu8.systemManager.SystemManager
-
-
- USART3
- class com.microchip.mcc.mcu8.modules.usart.tiny_mega_init.USART
-
-
- DAC0
- class com.microchip.mcc.mcu8.modules.dac.avr_db.DAC
-
-
- VREF
- class com.microchip.mcc.mcu8.modules.vref.avr_da.VREF
-
-
- BOD
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.bod.BOD
-
-
- TCB1
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- TCB0
- class com.microchip.mcc.mcu8.modules.tcb.tiny_mega_init.TCB
-
-
- OPAMP
- class com.microchip.mcc.mcu8.modules.opamp.avr8x.OPAMP
-
-
- RSTCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.rstctrl.RSTCTRL
-
-
- SLPCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.slpctrl.SLPCTRL
-
-
- CLKCTRL
- class com.microchip.mcc.mcu8.systemManager.tiny_mega_init.clkctrl.CLKCTRL
-
-
- Interrupt Manager
- class com.microchip.mcc.mcu8.interruptManager.InterruptManager
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- Negative input pin for OPn
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 68
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 14
-
-
-
- TCB0
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
-
-
-
-
- 3
-
-
-
- 2
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- false
-
-
-
- enabled
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- AUTO
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Disabled
-
-
-
- 6
-
-
-
- 7
-
-
-
- 3
-
-
-
- INP
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- 9
-
-
-
- 0
-
-
-
- 3
-
-
-
- 72
-
-
-
- 0
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- BOD disabled
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC output
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
- 2
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 10
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- disabled
-
-
-
- DIV32
-
-
-
- 1
-
-
-
- 2000000
-
-
-
- DIV1
-
-
-
- INTDISABLE
-
-
-
- 3.3
-
-
-
- DIV1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- -0.040%
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 142857
-
-
-
- 8M
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- AIN0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- OSCHF
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 127
-
-
-
- WIP0
-
-
-
- 4
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 69
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- XDIR_DEF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- 0
-
-
-
- 1 s
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1.25ms
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 68
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DLY0
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 5
-
-
-
- disabled
-
-
-
- true
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 1
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 5
-
-
-
- 5
-
-
-
-
-
-
-
- 23
-
-
-
- 0
-
-
-
- OPn output (unity gain)
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 12
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- DEFAULT
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- Off
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- CRC32
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- false
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- DLY0
-
-
-
- false
-
-
-
- 4
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- 1
-
-
-
- 23
-
-
-
- false
-
-
-
- 127
-
-
-
- RTC Clock / 32
-
-
-
- Output Driver Off
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- INTDISABLE
-
-
-
- 7
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 36
-
-
-
- disabled
-
-
-
- 127
-
-
-
- 4
-
-
-
- 11
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- OSC32K
-
-
-
- 8
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 1
-
-
-
- DIS
-
-
-
- opampSingle
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- TXD_DEF
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 128
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 4
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- OFF
-
-
-
- true
-
-
-
- 0
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- Internal high-frequency oscillator
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- opSwEnEventDriven
-
-
-
- 1
-
-
-
- 12
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- NORMAL
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 6
-
-
-
- 2
-
-
-
- INTDISABLE
-
-
-
- RXD_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 6
-
-
-
- 68
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 2
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_WCMP
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
-
-
-
-
- 1
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- enabled
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- OFF
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 3
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- GPIO
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- opDirect
-
-
-
- 0
-
-
-
- 12
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
-
-
-
-
- 5
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1
-
-
-
-
-
-
-
- 0
-
-
-
-
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24M
-
-
-
- 13
-
-
-
- 0
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- VREF
-
-
-
- disabled
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 10
-
-
-
- 14
-
-
-
- 4
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- AIN2
-
-
-
- 4
-
-
-
- 4
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- LED0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- false
-
-
-
- 2
-
-
-
- 3
-
-
-
-
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 2
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- disabled
-
-
-
-
-
-
-
- alternate
-
-
-
- true
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 12
-
-
-
- QFN48
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- opIAGain4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 23
-
-
-
- CLKMAIN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 20
-
-
-
- 12
-
-
-
- 0
-
-
-
- 13
-
-
-
- 10
-
-
-
- 1
-
-
-
- 11
-
-
-
- false
-
-
-
- 16
-
-
-
- 0
-
-
-
- 17
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- 14
-
-
-
- 15
-
-
-
- 18
-
-
-
- 19
-
-
-
- alternate
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1 Stop bit
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 5
-
-
-
- 6
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- Internal 1.024V reference
-
-
-
- 21
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 10
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Sample frequency is 128 Hz
-
-
-
- 8 results accumulated
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 128
-
-
-
- {"type":"tableDynamicControls","key":"interruptVectorTable","dataArray": [{"Module": {"id":"Module_rowCount_0","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_0","data":{"text":"ABE","value":"ABE"}},"Enable": {"id":"Enable_rowCount_0","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_1","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_1","data":{"text":"DRE","value":"DRE"}},"Enable": {"id":"Enable_rowCount_1","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_2","data":{"text":"BOD","value":"BOD"}},"Interrupt": {"id":"Interrupt_rowCount_2","data":{"text":"VLM","value":"VLM"}},"Enable": {"id":"Enable_rowCount_2","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_3","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_3","data":{"text":"RESRDY","value":"RESRDY"}},"Enable": {"id":"Enable_rowCount_3","data":{"text":"true","value":"true"}}},{"Module": {"id":"Module_rowCount_4","data":{"text":"ADC0","value":"ADC0"}},"Interrupt": {"id":"Interrupt_rowCount_4","data":{"text":"WCMP","value":"WCMP"}},"Enable": {"id":"Enable_rowCount_4","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_5","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_5","data":{"text":"PIT","value":"PIT"}},"Enable": {"id":"Enable_rowCount_5","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_6","data":{"text":"RTC","value":"RTC"}},"Interrupt": {"id":"Interrupt_rowCount_6","data":{"text":"CMPI","value":"CMPI"}},"Enable": {"id":"Enable_rowCount_6","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_7","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_7","data":{"text":"RXC","value":"RXC"}},"Enable": {"id":"Enable_rowCount_7","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_8","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_8","data":{"text":"RXS","value":"RXS"}},"Enable": {"id":"Enable_rowCount_8","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_9","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_9","data":{"text":"OVF","value":"OVF"}},"Enable": {"id":"Enable_rowCount_9","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_10","data":{"text":"USART3","value":"USART3"}},"Interrupt": {"id":"Interrupt_rowCount_10","data":{"text":"TXC","value":"TXC"}},"Enable": {"id":"Enable_rowCount_10","data":{"text":"false","value":"false"}}},{"Module": {"id":"Module_rowCount_11","data":{"text":"TCB0","value":"TCB0"}},"Interrupt": {"id":"Interrupt_rowCount_11","data":{"text":"INT","value":"INT"}},"Enable": {"id":"Enable_rowCount_11","data":{"text":"true","value":"true"}}}] }
-
-
-
- 128
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 1
-
-
-
- DISABLED
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DISABLE
-
-
-
- 1
-
-
-
- ISR_ADC0_RESRDY
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_USART3_RXC
-
-
-
- disabled
-
-
-
- 128HZ
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- ISR_USART3_DRE
-
-
-
- INPUT_DISABLE
-
-
-
- 3
-
-
-
- Async Mode
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 9
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 72
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 128Hz
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1023
-
-
-
- 0
-
-
-
- 1
-
-
-
- Off
-
-
-
- 1
-
-
-
- disabled
-
-
-
- true
-
-
-
- 127
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 3
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Positive input pin for OPn
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- opIAGain4
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1K
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- ISR_TCB0_INT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 65
-
-
-
- 0
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- 7
-
-
-
- 5
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6
-
-
-
- 5
-
-
-
- 430us
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- SPM
-
-
-
- 0
-
-
-
- 128
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 8BIT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- INT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- ISR_RTC_CMPI
-
-
-
- INTDISABLE
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 128
-
-
-
- true
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 0
-
-
-
- Negative input pin for OPn
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- Internal 32.768 kHz oscillator
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- false
-
-
-
- 3
-
-
-
- true
-
-
-
- false
-
-
-
- 3
-
-
-
- 1
-
-
-
- true
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- ISR_TCB1_INT
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- PORTA
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- CLK_PEP
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 8
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0 s
-
-
-
- 0
-
-
-
- 5
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 3
-
-
-
- OP0OUT
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- XCK_DEF
-
-
-
- PORTB
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- VDD falls below VLM threshold
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- Full Input Range
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- ISR_BOD_VLM
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- opSwEnEventDriven
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
-
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 16
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 64 s
-
-
-
- disabled
-
-
-
- Multiplexer off
-
-
-
- 1
-
-
-
- 6
-
-
-
- 0
-
-
-
- 5
-
-
-
- 4
-
-
-
- 3
-
-
-
- 9
-
-
-
- 8
-
-
-
- 7
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- Output Driver Off
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 127
-
-
-
- 3
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- opDualSet1
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- true
-
-
-
- false
-
-
-
- true
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- false
-
-
-
- false
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 7
-
-
-
- false
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- false
-
-
-
- 1.0
-
-
-
- false
-
-
-
- false
-
-
-
- VLM Disabled
-
-
-
- false
-
-
-
- opInstAmp
-
-
-
- 2
-
-
-
- 6
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 3
-
-
-
- OUT
-
-
-
- 1
-
-
-
- 5
-
-
-
- false
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- INPUT_DISABLE
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- Periodic Interrupt
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 12
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- opTripleSet1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 15
-
-
-
- 0
-
-
-
- 14
-
-
-
- 11
-
-
-
- 0
-
-
-
- 10
-
-
-
- 13
-
-
-
- 12
-
-
-
- 0
-
-
-
- 7
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- NOCRC
-
-
-
- 0
-
-
-
- 3
-
-
-
- ISR_USART3_RXS
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- Periodic Interrupt
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- OFF
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- none
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- 2
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 13
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 11
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 833
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 0
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- USART3
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- none
-
-
-
- none
-
-
-
- 3
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- 1
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- ISR_TCB0_OVF
-
-
-
- {"type":"table","key":"selectedChannels","dataArray": [{"Pin":"Internal Channel","Channel":"VDDIO2/10","Custom Name":"channel_VDDIO2/10"},{"Pin":"Internal Channel","Channel":"VDD/10","Custom Name":"channel_VDD/10"},{"Pin":"Internal Channel","Channel":"Temperature_sensor","Custom Name":"channel_Temperature sensor"},{"Pin":"Internal Channel","Channel":"DAC0","Custom Name":"channel_DAC0"},{"Pin":"Internal Channel","Channel":"Ground","Custom Name":"channel_Ground"}] }
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 13
-
-
-
- none
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- none
-
-
-
- none
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- Output Driver in Normal Mode
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 6
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 10
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- 3
-
-
-
- opVoltFollow
-
-
-
- 1
-
-
-
- true
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 65
-
-
-
- 128
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
-
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- disabled
-
-
-
- 216
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 127
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- true
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2.731 ms
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- 7
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 5
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- OFF
-
-
-
- 1
-
-
-
- enabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- INPUT_DISABLE
-
-
-
- false
-
-
-
- true
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 4
-
-
-
- 0 s
-
-
-
- 3
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- enabled
-
-
-
- 83.3 ns
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 4
-
-
-
- NORMAL
-
-
-
- 1.25 ms
-
-
-
- 0
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 153846
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 32000
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- Positive input pin for OPn
-
-
-
- 0
-
-
-
- 3
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- 83.3 ns
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- WO0_DEF
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- INP
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 2
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 430 us
-
-
-
- 4
-
-
-
- 1
-
-
-
- 4
-
-
-
- ISR_USART3_ABE
-
-
-
- 2
-
-
-
- 3
-
-
-
- 4
-
-
-
- 0
-
-
-
- 2
-
-
-
- 4
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1.0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 0
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 8
-
-
-
- 4
-
-
-
- WIP0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- CRYSTAL
-
-
-
- 7
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- false
-
-
-
- 3
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ADC0
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 0
-
-
-
- 4
-
-
-
- 24000000
-
-
-
- enabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- true
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1.9V
-
-
-
- 2
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- Off
-
-
-
- 0
-
-
-
- 9
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- DIV12
-
-
-
- 5
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- false
-
-
-
- disabled
-
-
-
- 5
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- opVoltFollow
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- INN
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 10
-
-
-
- disabled
-
-
-
- 0
-
-
-
-
-
-
-
- 128
-
-
-
- 3
-
-
-
- INT
-
-
-
- 0
-
-
-
- INT
-
-
-
-
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- No Window Comparison
-
-
-
- 11
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 11
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- OUT0
-
-
-
- ISR_RTC_PIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- false
-
-
-
- WDW0
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- 1.024
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 0
-
-
-
- OFF
-
-
-
- opBlockA
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 15
-
-
-
- disabled
-
-
-
- 0
-
-
-
- R1 = 15R, R2 = 1R, R2/R1 = 0.07
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- DIS
-
-
-
- 0
-
-
-
- 0MS
-
-
-
- 0.00
-
-
-
- 9
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 5
-
-
-
- 0
-
-
-
- 11
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- OFF
-
-
-
- disabled
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- 2000000
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 24000000
-
-
-
- 1024
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1.0
-
-
-
- false
-
-
-
- enabled
-
-
-
- INPUT_DISABLE
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 128
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 0
-
-
-
- 3
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 10
-
-
-
- 0
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- Internal 1.024V reference
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DAC
-
-
-
- OFF
-
-
-
- 8
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- enabled
-
-
-
- opVoltFollow
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- ISR_RTC_OVF
-
-
-
- 64 s
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- FALLING
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 3
-
-
-
- false
-
-
-
- 3
-
-
-
- 4
-
-
-
- true
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- ABOVE
-
-
-
- RTC
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- opIAGain4
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 8
-
-
-
- 0
-
-
-
- 0
-
-
-
- DAC0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 8
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 2
-
-
-
- ISR_USART3_TXC
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24 MHz system clock
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 9
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 192
-
-
-
- 1
-
-
-
- 41
-
-
-
- 2
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- 9
-
-
-
- 0
-
-
-
- 4
-
-
-
- FULL
-
-
-
- 5
-
-
-
- disabled
-
-
-
- enabled
-
-
-
- false
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- true
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- IDLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- true
-
-
-
- 3
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 7
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- No Parity
-
-
-
- 0
-
-
-
- 1
-
-
-
- 2
-
-
-
- 6
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- ACC8
-
-
-
- disabled
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 45454
-
-
-
- 3
-
-
-
- 0
-
-
-
- 6X
-
-
-
- 0
-
-
-
- 1
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 6
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 8
-
-
-
- disabled
-
-
-
- 157
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 115200
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- opVoltFollow
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1000000
-
-
-
- alternate
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 127
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- NONE
-
-
-
- 4
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 5
-
-
-
- 2
-
-
-
- 3
-
-
-
- 7
-
-
-
- 1
-
-
-
- 0
-
-
-
- false
-
-
-
- 3
-
-
-
- INTDISABLE
-
-
-
-
-
-
-
-
-
-
-
- 0
-
-
-
- 2
-
-
-
- 2
-
-
-
- enabled
-
-
-
- 1
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 127
-
-
-
- enabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- enabled
-
-
-
- alternate
-
-
-
- 1
-
-
-
- INTDISABLE
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 3
-
-
-
- 1V024
-
-
-
- 1
-
-
-
- 0
-
-
-
- OFF
-
-
-
- 5
-
-
-
- 0
-
-
-
- 4
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 2
-
-
-
- disabled
-
-
-
- BODLEVEL0
-
-
-
- opSwEnAlwaysOn
-
-
-
- 1
-
-
-
- 1-32MHz internal oscillator
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 7
-
-
-
- 1
-
-
-
- 1
-
-
-
- 0
-
-
-
- Multiplexer off
-
-
-
- 8
-
-
-
- 66
-
-
-
- 6
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- false
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 6X
-
-
-
- INTDISABLE
-
-
-
- 0
-
-
-
- 157
-
-
-
- DEFAULT
-
-
-
- 5
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- BODLEVEL0
-
-
-
- 4
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1 s
-
-
-
- disabled
-
-
-
- opDiffAmp
-
-
-
- 1
-
-
-
- 0
-
-
-
- ISR_TCB1_OVF
-
-
-
- 9
-
-
-
- 0
-
-
-
- disabled
-
-
-
- false
-
-
-
- 24000000
-
-
-
- 1
-
-
-
- 2
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 6
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 4
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- INPUT_DISABLE
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 64
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 1
-
-
-
- 2
-
-
-
- 4
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 256
-
-
-
- 0
-
-
-
- 0
-
-
-
- 5
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- opDirect
-
-
-
- 3
-
-
-
- 7
-
-
-
- 0
-
-
-
- DISABLE
-
-
-
- 32
-
-
-
- 5
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 2
-
-
-
- 0
-
-
-
- 0
-
-
-
- 4
-
-
-
- 2
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 4
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 5
-
-
-
- DUAL
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 2
-
-
-
- OSCHF
-
-
-
- 2
-
-
-
- 1
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 1
-
-
-
- 1
-
-
-
- 4
-
-
-
- 2
-
-
-
- 3
-
-
-
- 1
-
-
-
- false
-
-
-
- 1
-
-
-
- 4
-
-
-
- 5
-
-
-
- 6
-
-
-
- 3
-
-
-
- 7
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 4
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 2
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- output
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- Character size: 8 bit
-
-
-
- 10319
-
-
-
- 29999
-
-
-
- 0
-
-
-
- 2
-
-
-
- 1
-
-
-
- 10-bit mode
-
-
-
- disabled
-
-
-
- INTDISABLE
-
-
-
- OFF
-
-
-
- 0
-
-
-
- 3
-
-
-
- 0
-
-
-
- 0
-
-
-
- 24000000
-
-
-
- 2
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 0
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 1
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 34
-
-
-
- disabled
-
-
-
- false
-
-
-
- 4
-
-
-
- disabled
-
-
-
- ASYNCHRONOUS
-
-
-
- 0
-
-
-
- DEFAULT
-
-
-
- 0
-
-
-
- 0
-
-
-
- 0
-
-
-
- WIP0
-
-
-
- 1BIT
-
-
-
- 1
-
-
-
- 0
-
-
-
- disabled
-
-
-
- 1
-
-
-
- 0
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3.3
-
-
-
- OPAMP
-
-
-
- 0
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 0
-
-
-
- INTDISABLE
-
-
-
- 5
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 0
-
-
-
- 1
-
-
-
- 1
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 11
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- disabled
-
-
-
- 5
-
-
-
- disabled
-
-
-
- 10BIT
-
-
-
- 2
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- disabled
-
-
-
- 3
-
-
-
- 1
-
-
-
- 1
-
-
-
- 3
-
-
-
- 0
-
-
-
- TCB1
-
-
-
-
-
-
-
- disabled
-
-
-
- DEFAULT
-
-
-
- 3
-
-
-
-
- mcc_generated_files\src\protected_io.S
- 69d7d2c54bccf38027e4950b66dadc2d9c0be7a2523ffbe4648ec79e87f33522
-
-
- mcc_generated_files\include\pin_manager.h
- 3f9734f382bf621e08a9303e8a91f6a3f21bb3810d6c1cdce5133930836c0832
-
-
- mcc_generated_files\utils\compiler.h
- 3f2d7b47b12f2ecbd4c3971644ea7ecd10d2562fc8605a4495bd597eb0f59750
-
-
- mcc_generated_files\src\dac0.c
- 500d249985834f5ad3d463320edc0e223d52d103a920202fabfada2d881a6823
-
-
- mcc_generated_files\include\tcb0.h
- f99940ca5c1f1a476aefb94b0ae0350fe7965e6ce033776a7cdb494d2116b482
-
-
- mcc_generated_files\utils\atomic.h
- 80e018fe02cd0c54394bb9a54dcf927d346410567dc6dded62bea9b49e322acf
-
-
- mcc_generated_files\src\pin_manager.c
- eda02020bf5cc096696230f36bba30491a38d7a422c40f3d3203753df6acb901
-
-
- mcc_generated_files\include\tcb1.h
- 48affc128bd0298e52e46a4e619fbcf1a699d041c2fc6d057e81a28ef6f2f95c
-
-
- mcc_generated_files\src\tcb1.c
- 3f164851af42f06ca7274eccb115b5e055054f3c754f625691c8e7260aea65ac
-
-
- mcc_generated_files\utils\interrupt_avr8.h
- 98adc596175f2e76d4d918685cf050032a3efb605901edb6be0a35dda05a57e9
-
-
- mcc_generated_files\src\tcb0.c
- eb14c823736ca31b0bc3d1a7690505ac49bac351927d50250767f748557af01a
-
-
- mcc_generated_files\src\cpuint.c
- f9b05fddddeabf0ade976e485b8adaddad2516e86dfa428741fd8ea920e07f2f
-
-
- mcc_generated_files\include\rtc.h
- e0715b92214f2cc43344afb4bfa84d0f9b960a8c9839b42c4e647fc9b3c49093
-
-
- mcc_generated_files\include\dac0.h
- bf003e1bfc2851570803e1999c4b00fb97a9825897c16f279a734638bb3399a7
-
-
- mcc_generated_files\src\rtc.c
- 084817163bb260f554c41e7e7c5c48a828e099d66cd0838f1e83d94914d3f00c
-
-
- mcc_generated_files\include\ccp.h
- 60059cb974788916ec20d13197b009f4436b347f7eed014aa44aaebf6c516ff1
-
-
- mcc_generated_files\include\protected_io.h
- 1dd02ce5af5c0f4624172e0ef0bb52d6c8bacb87beabf9d7129d684def52db23
-
-
- mcc_generated_files\mcc.c
- accdb1b5212d3bda2265749688e6fc871aa0579b5f58ca970e12d3da8c4bb581
-
-
- mcc_generated_files\src\usart3.c
- b516cde371e7d21c5557b3fce53d804baaa6777d33ec56ce3c8381f15296acf0
-
-
- mcc_generated_files\utils\assembler\iar.h
- 02efe91f6b4b8b31e5d6141c604f6f918f641f26433ffc12de9de3106df36a2e
-
-
- mcc_generated_files\include\adc0.h
- 513ed51a4196fef51c58a7d6c9169730ac3c39abab7fba88e3eb2529e475ea8a
-
-
- mcc_generated_files\mcc.h
- 06b890a182d1c7bfef8e2622b8aafc06b513845dbee21949255430689e956b6a
-
-
- mcc_generated_files\include\port.h
- 2cbca36d0ae0501333b71a678a15eb5f30b7d2829c091e5b0331a8d8350bed79
-
-
- mcc_generated_files\include\vref.h
- 389dba0d2c3742412468f16ca23fd4e026f2f841b0dd3011cbf7d3f68bf48c6d
-
-
- mcc_generated_files\src\adc0.c
- 9650fb685485e198db2b65e85b77f04e0c03ae172e47624dc97f202318f6e787
-
-
- main.c
- ad6433d2c98b42e7128f2ebaca15eb375df8a83f923bb0a884d7b0373577396a
-
-
- mcc_generated_files\device_config.c
- 369c4c01683f8dcffc187987662824b25f3302ed82a2428288e1cadaddf78f3d
-
-
- mcc_generated_files\utils\utils.h
- 38ff19ccdabdd432c321983f3c9190d1767c6e2ac0dc1bba384fc36c62989559
-
-
- mcc_generated_files\utils\assembler.h
- 90b346ff1c59de9e2d44827ebdb0d696965fdfc8a741bc69a880a8ebc2bf61cc
-
-
- mcc_generated_files\utils\utils_assert.h
- 002db199835943a5e634d5e9904119d0f50eb94af5300454791a93c81c5353b7
-
-
- mcc_generated_files\src\vref.c
- 3ff69dbc2cd9907593088060ebc3087887b342d3c4ac859bbf2c145d7fd9ed15
-
-
- mcc_generated_files\include\opamp.h
- dcc643c0e8e8ca9da116865c5f6ffbfe232800231a639abf46ac458d8580d59d
-
-
- mcc_generated_files\include\rstctrl.h
- 3aaf94dcc7f4f51ce811c4b290f1dbcd29748fb231cb4d3e7f27f49586651c83
-
-
- mcc_generated_files\src\opamp.c
- 3107078948b74b6be78991a3dacad62cf53bda3bbc00fdfe842a5e4cef29d667
-
-
- mcc_generated_files\include\cpuint.h
- 802591ef9a8f76d82a9ebdd96dac4c62c9a3c56d991188efaebd5ec3ca4228e2
-
-
- mcc_generated_files\config\clock_config.h
- 04b6e55dcba9f9bed703717cfb1f99994506fdd1a72546e3debf8e4b072d0a46
-
-
- mcc_generated_files\include\usart3.h
- 4e2789c6800103235131ca1a12b1507d9c14ddd0dfc240a3bd440a6bf92ff388
-
-
- mcc_generated_files\utils\assembler\gas.h
- a866545cef7518629f24cbd3ca0494f523bf2d19d9b486b2a1c57be653f54d63
-
-
-
-
\ No newline at end of file
diff --git a/voltage-follower.X/data_stream.c b/voltage-follower.X/data_stream.c
deleted file mode 100644
index 3d91b80..0000000
--- a/voltage-follower.X/data_stream.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "data_stream.h"
-#include "mcc_generated_files/include/usart3.h"
-#include
-
-char TX_buffer[sizeof(data_stream)];
-
-void DS_sendData(void) {
- memcpy(TX_buffer, &data_stream, sizeof(data_stream));
-
- USART3.CTRLA = USART_DREIE_bm; /* Enable Transmit Complete interrupt*/
- USART3.TXDATAL = data_stream.start_token; /* Send the first byte of the buffer*/
- /* once the first byte is transmitted the ISR will kick in*/
-}
-
-void myUSART_3_ISR(void)
-{
- volatile static uint8_t tx_count = 1;
-
- if (data_stream.data_available) {
-
- if (tx_count < (sizeof(TX_buffer) - 1)) {
- USART3.TXDATAL = TX_buffer[tx_count];
- tx_count++;
- }
- else{
-
- tx_count = 1;
- data_stream.data_available = 0;
- USART3.CTRLA &= ~USART_DREIE_bm; /* Disable Transmit Complete interrupt*/
- /* No more bytes available*/
- }
- }
-}
\ No newline at end of file
diff --git a/voltage-follower.X/data_stream.h b/voltage-follower.X/data_stream.h
deleted file mode 100644
index d167bb0..0000000
--- a/voltage-follower.X/data_stream.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef DATA_STREAM_H_
-#define DATA_STREAM_H_
-
-#include
-
-#define START_TOKEN 0x55
-
-typedef struct {
- uint8_t start_token;
- uint16_t dacVal;
- uint16_t opampVal;
- uint8_t end_token;
- uint8_t data_available;
-}data_visualizer;
-
-data_visualizer data_stream;
-
-void DS_sendData(void);
-
-void myUSART_3_ISR(void);
-
-
-#endif /* DATA_STREAM_H_ */
\ No newline at end of file
diff --git a/voltage-follower.X/main.c b/voltage-follower.X/main.c
index dc648f1..5cde4ea 100644
--- a/voltage-follower.X/main.c
+++ b/voltage-follower.X/main.c
@@ -1,28 +1,27 @@
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
+ (c) 2018 Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip software and any
+ derivatives exclusively with Microchip products. It is your responsibility to comply with third party
+ license terms applicable to your use of third party software (including open source software) that
may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
+
+ THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
+ EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
+ IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
+
+ IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
+ WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
+ HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
+ THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
+ CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
+ OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
SOFTWARE.
-*/
+ */
-#include "mcc_generated_files/mcc.h"
-#include "data_stream.h"
+#include "mcc_generated_files/system/system.h"
#include
#define DEGREE 0.0245 //2pi /256 = 6.28/ 256.
@@ -36,7 +35,7 @@
#define SINE_WAVE_AMPLITUDE_VOLTS (0.128)
/*Offset Volts*/
#define SINE_DC_OFFSET_VOLTS (0.256)
-
+
/*DAC Voltage Reference*/
#define DAC_VOLTAGE_REF (1.024)
/* Number of steps for a sine wave period */
@@ -55,73 +54,77 @@ uint16_t sine_wave[SINE_WAVE_STEPS];
void myRTCISR(void);
void myTCB0ISR(void);
-void myTCB1ISR (void);
+void myTCB1ISR(void);
void sine_wave_table_init(void);
+void adc_resrdy(void);
/*
Main application
-*/
+ */
int main(void)
{
/* Initializes MCU, drivers and middleware */
SYSTEM_Initialize();
+
+ DataStreamer.dacVal = 0;
+ DataStreamer.opampVal = 0;
+
sine_wave_table_init();
-
+
+ ADC0_RegisterResrdyCallback(adc_resrdy);
RTC_SetOVFIsrCallback(myRTCISR);
- TCB0_SetCaptIsrCallback(myTCB0ISR);
- USART3_SetTXISRCb(myUSART_3_ISR);
- data_stream.start_token = START_TOKEN;
- data_stream.end_token = (~START_TOKEN);
- TCB1_SetCaptIsrCallback(myTCB1ISR);
+ TCB0_CaptureCallbackRegister(myTCB0ISR);
+ TCB1_CaptureCallbackRegister(myTCB1ISR);
/* Replace with your application code */
- while (1){
+ while (1)
+ {
}
}
-void myRTCISR(void){
+void myRTCISR(void)
+{
LED0_Toggle(); //Control LED
}
-void myTCB0ISR(void){
-
+void myTCB0ISR(void)
+{
+
volatile static uint16_t sine_wave_index = 0;
-
+
DAC0_SetOutput(sine_wave[sine_wave_index]); //Control LED
- data_stream.dacVal = sine_wave[sine_wave_index];
+ DataStreamer.dacVal = sine_wave[sine_wave_index];
sine_wave_index++;
sine_wave_index = sine_wave_index % SINE_WAVE_STEPS;
}
void sine_wave_table_init(void)
{
- for(uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
- {
- sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
- }
-
+ for (uint16_t i = 0; i < SINE_WAVE_STEPS; i++)
+ {
+ sine_wave[i] = SINE_DC_OFFSET + SINE_AMPLITUDE * sin(i * M_2PI / SINE_WAVE_STEPS);
+ }
+
}
-void myTCB1ISR (void){
- if (data_stream.data_available == 0) {
+void myTCB1ISR(void)
+{
+ if (USART3_IsTxReady())
+ {
/* Start ADC conversion */
ADC0.COMMAND = ADC_STCONV_bm;
}
-
/* Clear interrupt flag */
- TCB1.INTFLAGS = 0xFF;
}
-ISR (ADC0_RESRDY_vect)
+void adc_resrdy(void)
{
- data_stream.data_available = 1;
- data_stream.opampVal = (ADC0.RES >> 3);
- DS_sendData();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
+ DataStreamer.opampVal = (ADC0.RES >> 3);
+ WriteFrame();
}
/**
End of File
-*/
\ No newline at end of file
+ */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/adc/adc0.h b/voltage-follower.X/mcc_generated_files/adc/adc0.h
new file mode 100644
index 0000000..0b930f1
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/adc/adc0.h
@@ -0,0 +1,231 @@
+/**
+ * ADC0 Generated Driver API Header File
+ *
+ * @file adc0.h
+ *
+ * @defgroup adc0 ADC0
+ *
+ * @brief API prototypes and other datatypes for the ADC0 module driver.
+ *
+ * @version ADC0 Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ADC0_H_INCLUDED
+#define ADC0_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup adc0
+ * @enum ADC0_window_mode_t
+ * @brief Window Comparator Modes
+ */
+typedef enum {
+ ADC0_window_disabled, /**
+#include
+
+/**
+ * @def Data Streamer Start Byte Macro.
+ * Macro that represents the byte that is sent to signify the beginning of the Data Streamer frame.
+ */
+#define DATA_STREAMER_START_BYTE 3
+
+/**
+ * @def Data Streamer End Byte Macro.
+ * Macro that represents the byte that is sent to signify the end of the Data Streamer frame.
+ */
+#define DATA_STREAMER_END_BYTE (255 - DATA_STREAMER_START_BYTE)
+
+/**
+ * @ingroup datastreamer
+ * @struct DATA_STREAMER_STRUCT
+ * @brief Structure containing the initial Data Streamer variables.
+ */
+struct __attribute__((packed)) DATA_STREAMER_STRUCT
+{
+ uint16_t dacVal;
+ uint16_t opampVal;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct PACKAGE_STRUCT
+ * @brief Structure containing a pointer assigned to a custom data package and its size which are set by the user.
+ */
+struct PACKAGE_STRUCT
+{
+ void * varStruct;
+ size_t length;
+};
+
+/**
+ * @ingroup datastreamer
+ * @struct DataStreamer
+ * @brief An instance of the DATA_STREAMER_STRUCT.
+ */
+extern struct DATA_STREAMER_STRUCT DataStreamer;
+
+/**
+ @ingroup datastreamer
+ @struct DATA_STREAMER_PACKAGE
+ @brief An instance of the PACKAGE_STRUCT.
+ */
+extern struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+/**
+ * @def Data Streamer Write Frame Macro.
+ * Macro used to write the frame to the Data Streamer.
+ */
+#define WriteFrame() DataStreamer_FrameSend(DATA_STREAMER_PACKAGE.varStruct,DATA_STREAMER_PACKAGE.length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Initializes the Data Streamer.
+ * @param None.
+ * @return None.
+ */
+void DataStreamer_Initialize(void);
+
+/**
+ * @ingroup datastreamer
+ * @brief Writes the frame to the Data Streamer.
+ * @param void * package - Pointer to the DATA_STREAMER_PACKAGE structure containing the variables to be sent.
+ * @param size_t length - Size of the DATA_STREAMER_PACKAGE structure in bytes.
+ * @return None.
+ */
+void DataStreamer_FrameSend(void * package, size_t length);
+
+/**
+ * @ingroup datastreamer
+ * @brief Sets the package containing the variables to be sent by the Data Streamer.
+ * @param void * customStructHandler - Pointer to the user-defined structure containing the variables to be sent to the Data Streamer.
+ * @param size_t customlength - Size of the user-defined structure in bytes.
+ * @return None.
+ */
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength);
+
+#endif /* DATA_STREAMER_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/data_streamer/src/data_streamer.c b/voltage-follower.X/mcc_generated_files/data_streamer/src/data_streamer.c
new file mode 100644
index 0000000..3b57f3c
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/data_streamer/src/data_streamer.c
@@ -0,0 +1,69 @@
+/**
+ * DATASTREAMER Generated Driver API Source File.
+ *
+ * @file data_streamer.c
+ *
+ * @ingroup datastreamer
+ *
+ * @brief This file contains the implementation for the Data Streamer driver APIs.
+ *
+ * @version Data Streamer Driver Version 1.2.1
+ */
+ /*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../data_streamer.h"
+#include "../../uart/usart3.h"
+
+static const uart_drv_interface_t *DS_UART = &UART3;
+
+
+struct DATA_STREAMER_STRUCT DataStreamer;
+struct PACKAGE_STRUCT DATA_STREAMER_PACKAGE;
+
+void DataStreamer_Initialize(void)
+{
+ DataStreamer_PackageSet(&DataStreamer, sizeof (DataStreamer));
+}
+
+static void DataStreamer_VariableWrite(char var)
+{
+ while (!(DS_UART->IsTxReady()));
+ DS_UART->Write(var);
+};
+
+void DataStreamer_FrameSend(void * package, size_t length)
+{
+ char * dp = package;
+ DataStreamer_VariableWrite(DATA_STREAMER_START_BYTE);
+ while (length--)
+ {
+ DataStreamer_VariableWrite(*dp++);
+ }
+ DataStreamer_VariableWrite(DATA_STREAMER_END_BYTE);
+ while (!(DS_UART->IsTxDone()));
+};
+
+void DataStreamer_PackageSet(void * customStructHandler, size_t customlength)
+{
+ DATA_STREAMER_PACKAGE.varStruct = customStructHandler;
+ DATA_STREAMER_PACKAGE.length = customlength;
+};
diff --git a/voltage-follower.X/mcc_generated_files/device_config.c b/voltage-follower.X/mcc_generated_files/device_config.c
deleted file mode 100644
index 829d080..0000000
--- a/voltage-follower.X/mcc_generated_files/device_config.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include
-
-/**
- * \Configures Fuse bits
- */
-
-FUSES =
-{
- .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
- .BOOTSIZE = 0,
- .CODESIZE = 0,
- .OSCCFG = CLKSEL_OSCHF_gc,
- .SYSCFG0 = CRCSEL_CRC32_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
- .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
- .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
-};
diff --git a/voltage-follower.X/mcc_generated_files/include/adc0.h b/voltage-follower.X/mcc_generated_files/include/adc0.h
deleted file mode 100644
index 37ac63f..0000000
--- a/voltage-follower.X/mcc_generated_files/include/adc0.h
+++ /dev/null
@@ -1,219 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ADC0_H_INCLUDED
-#define ADC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- adc0_window_disabled,
- adc0_window_below,
- adc0_window_above,
- adc0_window_inside,
- adc0_window_outside
-} adc0_window_mode_t;
-
-/** Function pointer to callback function called by IRQ.
- NULL=default value: No callback function is to be used.
-*/
-typedef void (*adc_irq_cb_t)(void);
-
-/** Datatype for the result of the ADC conversion */
-typedef uint16_t adc_result_t;
-typedef int16_t diff_adc_result_t;
-
-//* Analog channel selection */
-typedef ADC_MUXPOS_t adc_0_channel_t;
-typedef ADC_MUXNEG_t adc_0_muxneg_channel_t;
-
-/**
- * \brief Initialize ADC interface
- * If module is configured to disabled state, the clock to the ADC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the ADC init was successful
- * \retval 1 the ADC init was not successful
- */
-int8_t ADC0_Initialize();
-
-/**
- * \brief Enable ADC0
- * 1. If supported by the clock system, enables the clock to the ADC
- * 2. Enables the ADC module by setting the enable-bit in the ADC control register
- *
- * \return Nothing
- */
-void ADC0_Enable();
-
-/**
- * \brief Disable ADC0
- * 1. Disables the ADC module by clearing the enable-bit in the ADC control register
- * 2. If supported by the clock system, disables the clock to the ADC
- *
- * \return Nothing
- */
-void ADC0_Disable();
-
-/**
- * \brief Enable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_EnableAutoTrigger();
-
-/**
- * \brief Disable conversion auto-trigger
- *
- * \return Nothing
- */
-void ADC0_DisableAutoTrigger();
-
-/**
- * \brief Set conversion window comparator high threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowHigh(adc_result_t high);
-
-/**
- * \brief Set conversion window comparator low threshold
- *
- * \return Nothing
- */
-void ADC0_SetWindowLow(adc_result_t low);
-
-/**
- * \brief Set conversion window mode
- *
- * \return Nothing
- */
-void ADC0_SetWindowMode(adc0_window_mode_t mode);
-
-/**
- * \brief Set ADC channel to be used for windowed conversion mode
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_SetWindowChannel(adc_0_channel_t channel);
-
-/**
- * \brief Start a conversion on ADC0
- *
- * \param[in] channel The ADC channel to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion on ADC0
- *
- * \param[in] channel,channel1 The ADC channels to start conversion on
- *
- * \return Nothing
- */
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Stop a conversion on ADC0
- *
- * \return Nothing
- */
-void ADC0_StopConversion();
-
-/**
- * \brief Check if the ADC conversion is done
- *
- * \return The status of ADC converison done check
- * \retval true The ADC conversion is done
- * \retval false The ADC converison is not done
- */
-bool ADC0_IsConversionDone();
-
-/**
- * \brief Read a conversion result from ADC0
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversionResult(void);
-
-/**
- * \brief Read the conversion window result from ADC0
- *
- * \return Returns true when a comparison results in a trigger condition, false otherwise.
- */
-bool ADC0_GetWindowResult(void);
-
-/**
- * \brief Start a conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel);
-
-/**
- * \brief Start a differential conversion, wait until ready, and return the conversion result
- *
- * \return Conversion result read from the ADC0 ADC module
- */
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1);
-
-/**
- * \brief Return the number of bits in the ADC conversion result
- *
- * \return The number of bits in the ADC conversion result
- */
-uint8_t ADC0_GetResolution();
-
-/**
- * \brief Register a callback function to be called if conversion satisfies window criteria.
- *
- * \param[in] f Pointer to function to be called
- *
- * \return Nothing.
- */
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ADC0_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/ccp.h b/voltage-follower.X/mcc_generated_files/include/ccp.h
deleted file mode 100644
index 9f416a0..0000000
--- a/voltage-follower.X/mcc_generated_files/include/ccp.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPU_CCP_H
-#define CPU_CCP_H
-
-#include "../utils/compiler.h"
-#include "../include/protected_io.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Write to a CCP-protected 8-bit I/O register
- *
- * \param addr Address of the I/O register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_io(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_IOREG_gc, value);
-}
-
-/** @} */
-
-/**
- * \brief Write to CCP-protected 8-bit SPM register
- *
- * \param addr Address of the SPM register
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-static inline void ccp_write_spm(void *addr, uint8_t value)
-{
- protected_write_io(addr, CCP_SPM_gc, value);
-}
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPU_CCP_H */
diff --git a/voltage-follower.X/mcc_generated_files/include/cpuint.h b/voltage-follower.X/mcc_generated_files/include/cpuint.h
deleted file mode 100644
index 67c012c..0000000
--- a/voltage-follower.X/mcc_generated_files/include/cpuint.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef CPUINT_H_INCLUDED
-#define CPUINT_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include "ccp.h"
-#include "../utils/atomic.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif /** \
- * \brief Initialize cpuint interface \
- * \
- * \return Initialization status \
- */
-int8_t CPUINT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CPUINT_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/dac0.h b/voltage-follower.X/mcc_generated_files/include/dac0.h
deleted file mode 100644
index 70239d9..0000000
--- a/voltage-follower.X/mcc_generated_files/include/dac0.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef DAC0_H_INCLUDED
-#define DAC0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** Datatype for the resolution of the DAC */
-typedef uint16_t dac_resolution_t;
-
-/**
- * \brief Initialize DAC interface
- * If module is configured to disabled state, the clock to the DAC is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the DAC init was successful
- * \retval 1 the DAC init was not successful
- */
-int8_t DAC0_Initialize();
-
-/**
- * \brief Enable DAC0
- * 1. If supported by the clock system, enables the clock to the DAC
- * 2. Enables the DAC module by setting the enable-bit in the DAC control register
- *
- * \return Nothing
- */
-void DAC0_Enable();
-
-/**
- * \brief Disable DAC0
- * 1. Disables the DAC module by clearing the enable-bit in the DAC control register
- * 2. If supported by the clock system, disables the clock to the DAC
- *
- * \return Nothing
- */
-void DAC0_Disable();
-
-/**
- * \brief Start a conversion on DAC0
- *
- * \param[in] value The digital value to be converted to analogue voltage by the DAC
- *
- * \return Nothing
- */
-void DAC0_SetOutput(dac_resolution_t value);
-
-/**
- * \brief Return the number of bits in the DAC resolution
- *
- * \return The number of bits in the DAC resolution
- */
-uint8_t DAC0_GetResolution();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* DAC0_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/opamp.h b/voltage-follower.X/mcc_generated_files/include/opamp.h
deleted file mode 100644
index e215e59..0000000
--- a/voltage-follower.X/mcc_generated_files/include/opamp.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef OPAMP_H_INCLUDED
-#define OPAMP_H_INCLUDED
-
-#include "../utils/compiler.h"
-#include
-
-#define OPAMP_TIMEBASE_VALUE (23)
-
-/**
- @Summary
- Initializes the OPAMP_Initialize.
-
- @Description
- This routine initializes the OPAMP_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- OPAMP_Initialize();
-
-*/
-void OPAMP_Initialize();
-
-/**
- * @brief Enables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_EnableSystem(void);
-
-/**
- * @brief Disables the OPAMP System
- * @return None
- * @param None
- */
-void OPAMP_DisableSystem(void);
-
-//OP0 Voltage Follower APIs
-
-/**
- * @brief Sets OP0's positive input as per user selection
- * @return None
- * @param [in] Desired positive input
- For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
- */
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
-
-/**
- * @brief Sets OP0's settle time
- * @return None
- * @param [in] Desired settle time of 0 to 127 in us
- */
-void OPAMP_SetOP0SettleTime(uint8_t settleTime);
-
-/**
- * @brief Checks if OP0's settling time is finished
- * @return boolean
- * @param None
- */
-bool OPAMP_IsOP0Settled(void);
-
-/**
- * @brief Sets OP0's offset calibration
- * @return None
- * @param [in] Desired offset
- */
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
-
-#endif /* OPAMP_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/pin_manager.h b/voltage-follower.X/mcc_generated_files/include/pin_manager.h
deleted file mode 100644
index f30b239..0000000
--- a/voltage-follower.X/mcc_generated_files/include/pin_manager.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#ifndef PINS_H_INCLUDED
-#define PINS_H_INCLUDED
-
-#include
-#include "port.h"
-
-//get/set LED0 aliases
-#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
-#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
-#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
-#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
-#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
-#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
-#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA2 aliases
-#define PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
-#define PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
-#define PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
-#define PA2_GetValue() (VPORTA.IN & (0x1 << 2))
-#define PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
-#define PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
-#define PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PA3 aliases
-#define PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
-#define PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
-#define PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
-#define PA3_GetValue() (VPORTA.IN & (0x1 << 3))
-#define PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
-#define PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
-#define PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
-#define PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD6 aliases
-#define PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
-#define PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
-#define PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
-#define PD6_GetValue() (VPORTD.IN & (0x1 << 6))
-#define PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
-#define PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
-#define PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
-#define PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB1 aliases
-#define PB1_SetHigh() do { PORTB_OUTSET = 0x2; } while(0)
-#define PB1_SetLow() do { PORTB_OUTCLR = 0x2; } while(0)
-#define PB1_Toggle() do { PORTB_OUTTGL = 0x2; } while(0)
-#define PB1_GetValue() (VPORTB.IN & (0x1 << 1))
-#define PB1_SetDigitalInput() do { PORTB_DIRCLR = 0x2; } while(0)
-#define PB1_SetDigitalOutput() do { PORTB_DIRSET = 0x2; } while(0)
-#define PB1_SetPullUp() do { PORTB_PIN1CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB1_ResetPullUp() do { PORTB_PIN1CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB1_SetInverted() do { PORTB_PIN1CTRL |= PORT_INVEN_bm; } while(0)
-#define PB1_ResetInverted() do { PORTB_PIN1CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB1_DisableInterruptOnChange() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB1_EnableInterruptForBothEdges() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB1_EnableInterruptForRisingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB1_EnableInterruptForFallingEdge() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB1_DisableDigitalInputBuffer() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB1_EnableInterruptForLowLevelSensing() do { PORTB.PIN1CTRL = (PORTB.PIN1CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PB0 aliases
-#define PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
-#define PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
-#define PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
-#define PB0_GetValue() (VPORTB.IN & (0x1 << 0))
-#define PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
-#define PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
-#define PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
-#define PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-//get/set PD2 aliases
-#define PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
-#define PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
-#define PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
-#define PD2_GetValue() (VPORTD.IN & (0x1 << 2))
-#define PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
-#define PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
-#define PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
-#define PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
-#define PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
-#define PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
-#define PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
-#define PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
-#define PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
-#define PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
-#define PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
-#define PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
-
-void PIN_MANAGER_Initialize();
-void PORTB_LED0_DefaultInterruptHandler(void);
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA2_DefaultInterruptHandler(void);
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTA_PA3_DefaultInterruptHandler(void);
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD6_DefaultInterruptHandler(void);
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB1_DefaultInterruptHandler(void);
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTB_PB0_DefaultInterruptHandler(void);
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
-void PORTD_PD2_DefaultInterruptHandler(void);
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
-#endif /* PINS_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/include/port.h b/voltage-follower.X/mcc_generated_files/include/port.h
deleted file mode 100644
index 6a314fd..0000000
--- a/voltage-follower.X/mcc_generated_files/include/port.h
+++ /dev/null
@@ -1,1383 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef PORT_INCLUDED
-#define PORT_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "../utils/compiler.h"
-
-enum port_pull_mode {
- PORT_PULL_OFF,
- PORT_PULL_UP,
-};
-
-enum port_dir {
- PORT_DIR_IN,
- PORT_DIR_OUT,
- PORT_DIR_OFF,
-};
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTE.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTE.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= mask;
- } else {
- VPORTE.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTE.OUT |= (1 << pin);
- } else {
- VPORTE.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTE_toggle_port_level(const uint8_t mask)
-{
- PORTE.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTE_toggle_pin_level(const uint8_t pin)
-{
- PORTE.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTE_get_port_level()
-{
- return VPORTE.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTE_get_pin_level(const uint8_t pin)
-{
- return VPORTE.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTE_write_port(const uint8_t value)
-{
- VPORTE.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTF.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTF.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= mask;
- } else {
- VPORTF.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTF.OUT |= (1 << pin);
- } else {
- VPORTF.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTF_toggle_port_level(const uint8_t mask)
-{
- PORTF.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTF_toggle_pin_level(const uint8_t pin)
-{
- PORTF.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTF_get_port_level()
-{
- return VPORTF.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTF_get_pin_level(const uint8_t pin)
-{
- return VPORTF.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTF_write_port(const uint8_t value)
-{
- VPORTF.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTA.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTA.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= mask;
- } else {
- VPORTA.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTA.OUT |= (1 << pin);
- } else {
- VPORTA.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTA_toggle_port_level(const uint8_t mask)
-{
- PORTA.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTA_toggle_pin_level(const uint8_t pin)
-{
- PORTA.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTA_get_port_level()
-{
- return VPORTA.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTA_get_pin_level(const uint8_t pin)
-{
- return VPORTA.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTA_write_port(const uint8_t value)
-{
- VPORTA.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTB.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTB.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= mask;
- } else {
- VPORTB.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTB.OUT |= (1 << pin);
- } else {
- VPORTB.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTB_toggle_port_level(const uint8_t mask)
-{
- PORTB.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTB_toggle_pin_level(const uint8_t pin)
-{
- PORTB.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTB_get_port_level()
-{
- return VPORTB.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTB_get_pin_level(const uint8_t pin)
-{
- return VPORTB.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTB_write_port(const uint8_t value)
-{
- VPORTB.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTC.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTC.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= mask;
- } else {
- VPORTC.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTC.OUT |= (1 << pin);
- } else {
- VPORTC.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTC_toggle_port_level(const uint8_t mask)
-{
- PORTC.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTC_toggle_pin_level(const uint8_t pin)
-{
- PORTC.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTC_get_port_level()
-{
- return VPORTC.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTC_get_pin_level(const uint8_t pin)
-{
- return VPORTC.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTC_write_port(const uint8_t value)
-{
- VPORTC.OUT = value;
-}
-/**
- * \brief Set port pin pull mode
- *
- * Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used
- *
- * \param[in] pin The pin number within port
- * \param[in] pull_mode Pin pull mode
- */
-static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (pull_mode == PORT_PULL_UP) {
- *port_pin_ctrl |= PORT_PULLUPEN_bm;
- } else if (pull_mode == PORT_PULL_OFF) {
- *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
- }
-}
-
-/**
- * \brief Set port pin inverted mode
- *
- * Configure pin invert I/O or not
- *
- * \param[in] pin The pin number within port
- * \param[in] inverted Pin inverted mode
- */
-static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- if (inverted) {
- *port_pin_ctrl |= PORT_INVEN_bm;
- } else {
- *port_pin_ctrl &= ~PORT_INVEN_bm;
- }
-}
-
-/**
- * \brief Set port pin input/sense configuration
- *
- * Enable/disable digital input buffer and pin change interrupt,
- * select pin interrupt edge/level sensing mode
- *
- * \param[in] pin pin number within port
- * \param[in] isc PORT_ISC_INTDISABLE_gc = Interrupt disabled but input buffer enabled
- * PORT_ISC_BOTHEDGES_gc = Sense Both Edges
- * PORT_ISC_RISING_gc = Sense Rising Edge
- * PORT_ISC_FALLING_gc = Sense Falling Edge
- * PORT_ISC_INPUT_DISABLE_gc = Digital Input Buffer disabled
- * PORT_ISC_LEVEL_gc = Sense low Level
- *
- */
-static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
-{
- volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
-
- *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
-}
-
-/**
- * \brief Set port data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] mask Bit mask where 1 means apply direction setting to the
- * corresponding pin
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~mask;
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= mask;
- break;
- case PORT_DIR_OFF:
- /*/ should activate the pullup for power saving
- but a bit costly to do it here */
- {
- for (uint8_t i = 0; i < 8; i++) {
- if (mask & 1 << i) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
- }
- }
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port pin data direction
- *
- * Select if the pin data direction is input, output or disabled.
- * If disabled state is not possible, this function throws an assert.
- *
- * \param[in] pin The pin number within port
- * \param[in] dir PORT_DIR_IN = Data direction in
- * PORT_DIR_OUT = Data direction out
- * PORT_DIR_OFF = Disables the pin
- * (low power state)
- */
-static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
-{
- switch (dir) {
- case PORT_DIR_IN:
- VPORTD.DIR &= ~(1 << pin);
- break;
- case PORT_DIR_OUT:
- VPORTD.DIR |= (1 << pin);
- break;
- case PORT_DIR_OFF:
- *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
- break;
- default:
- break;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on the pins defined by the bit mask
- *
- * \param[in] mask Bit mask where 1 means apply port level to the corresponding
- * pin
- * \param[in] level true = Pin levels set to "high" state
- * false = Pin levels set to "low" state
- */
-static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= mask;
- } else {
- VPORTD.OUT &= ~mask;
- }
-}
-
-/**
- * \brief Set port level
- *
- * Sets output level on a pin
- *
- * \param[in] pin The pin number within port
- * \param[in] level true = Pin level set to "high" state
- * false = Pin level set to "low" state
- */
-static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
-{
- if (level == true) {
- VPORTD.OUT |= (1 << pin);
- } else {
- VPORTD.OUT &= ~(1 << pin);
- }
-}
-
-/**
- * \brief Toggle out level on pins
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] mask Bit mask where 1 means toggle pin level to the corresponding
- * pin
- */
-static inline void PORTD_toggle_port_level(const uint8_t mask)
-{
- PORTD.OUTTGL = mask;
-}
-
-/**
- * \brief Toggle output level on pin
- *
- * Toggle the pin levels on pins defined by bit mask
- *
- * \param[in] pin The pin number within port
- */
-static inline void PORTD_toggle_pin_level(const uint8_t pin)
-{
- PORTD.OUTTGL = 1 << pin;
-}
-
-/**
- * \brief Get input level on pins
- *
- * Read the input level on pins connected to a port
- *
- */
-static inline uint8_t PORTD_get_port_level()
-{
- return VPORTD.IN;
-}
-
-/**
- * \brief Get level on pin
- *
- * Reads the level on pins connected to a port
- */
-static inline bool PORTD_get_pin_level(const uint8_t pin)
-{
- return VPORTD.IN & (1 << pin);
-}
-
-/**
- * \brief Write value to Port
- *
- * Write directly to the port OUT register
- *
- * \param[in] value Value to write to the port register
- */
-static inline void PORTD_write_port(const uint8_t value)
-{
- VPORTD.OUT = value;
-}
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/protected_io.h b/voltage-follower.X/mcc_generated_files/include/protected_io.h
deleted file mode 100644
index ec8fcc3..0000000
--- a/voltage-follower.X/mcc_generated_files/include/protected_io.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_system_protected_io Protected IO
- * \ingroup doc_driver_system
- *
- * \section doc_driver_protected_io_rev Revision History
- * - v0.0.0.1 Initial Commit
- *
- *@{
- */
-
-#ifndef PROTECTED_IO_H
-#define PROTECTED_IO_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if defined(__DOXYGEN__)
-//! \name IAR Memory Model defines.
-//@{
-
-/**
- * \def CONFIG_MEMORY_MODEL_TINY
- * \brief Configuration symbol to enable 8 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_TINY
-
-/**
- * \def CONFIG_MEMORY_MODEL_SMALL
- * \brief Configuration symbol to enable 16 bit pointers.
- * \note If no memory model is defined, SMALL is default.
- *
- */
-#define CONFIG_MEMORY_MODEL_SMALL
-
-/**
- * \def CONFIG_MEMORY_MODEL_LARGE
- * \brief Configuration symbol to enable 24 bit pointers.
- *
- */
-#define CONFIG_MEMORY_MODEL_LARGE
-
-//@}
-#endif
-
-/**
- * \brief Write to am 8-bit I/O register protected by CCP or a protection bit
- *
- * \param addr Address of the I/O register
- * \param magic CCP magic value or Mask for protection bit
- * \param value Value to be written
- *
- * \note Using IAR Embedded workbench, the choice of memory model has an impact
- * on calling convention. The memory model is not visible to the
- * preprocessor, so it must be defined in the Assembler preprocessor directives.
- */
-extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
-
-/** @} */
-
-#endif /* PROTECTED_IO_H */
diff --git a/voltage-follower.X/mcc_generated_files/include/rstctrl.h b/voltage-follower.X/mcc_generated_files/include/rstctrl.h
deleted file mode 100644
index 538084b..0000000
--- a/voltage-follower.X/mcc_generated_files/include/rstctrl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RSTCTRL_INCLUDED
-#define RSTCTRL_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ccp.h"
-
-static inline void RSTCTRL_reset(void)
-{
- /* SWRR is protected with CCP */
- ccp_write_io((void *)&RSTCTRL.SWRR, 0x0);
-
-}
-
-static inline uint8_t RSTCTRL_get_reset_cause(void)
-{
- return RSTCTRL.RSTFR;
-}
-
-static inline void RSTCTRL_clear_reset_cause(void)
-{
- RSTCTRL.RSTFR
- = RSTCTRL_UPDIRF_bm | RSTCTRL_SWRF_bm | RSTCTRL_WDRF_bm | RSTCTRL_EXTRF_bm | RSTCTRL_BORF_bm | RSTCTRL_PORF_bm;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* RSTCTRL_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/rtc.h b/voltage-follower.X/mcc_generated_files/include/rtc.h
deleted file mode 100644
index 978d393..0000000
--- a/voltage-follower.X/mcc_generated_files/include/rtc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef RTCDRIVER_H
-#define RTCDRIVER_H
-
-#include "../utils/compiler.h"
-#include
-#include
-
-/** Datatype used to hold the number of ticks until a timer expires */
-
-typedef void (*RTC_cb_t)(void);
-void RTC_SetOVFIsrCallback(RTC_cb_t cb);
-void RTC_SetCMPIsrCallback(RTC_cb_t cb);
-void RTC_SetPITIsrCallback(RTC_cb_t cb);
-int8_t RTC_Initialize();
-void RTC_WriteCounter(uint16_t timerVal);
-void RTC_WritePeroid(uint16_t timerVal);
-uint16_t RTC_ReadCounter();
-uint16_t RTC_ReadPeriod();
-void RTC_EnableCMPInterrupt();
-void RTC_DisableCMPInterrupt();
-void RTC_EnableOVFInterrupt();
-void RTC_DisableOVFInterrupt();
-void RTC_EnablePITInterrupt();
-void RTC_DisablePITInterrupt();
-void RTC_ClearOVFInterruptFlag();
-bool RTC_IsOVFInterruptEnabled();
-
-
-#endif /* RTCDRIVER_H */
-
-/** @}*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/tcb0.h b/voltage-follower.X/mcc_generated_files/include/tcb0.h
deleted file mode 100644
index 37faf8c..0000000
--- a/voltage-follower.X/mcc_generated_files/include/tcb0.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB0_H_INCLUDED
-#define TCB0_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB0_cb_t)(void);
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb);
-void TCB0_SetOvfIsrCallback(TCB0_cb_t cb);
-
-int8_t TCB0_Initialize();
-void TCB0_EnableCaptInterrupt(void);
-void TCB0_DisableCaptInterrupt(void);
-uint16_t TCB0_ReadTimer(void);
-void TCB0_WriteTimer(uint16_t timerVal);
-void TCB0_ClearCaptInterruptFlag(void);
-bool TCB0_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/tcb1.h b/voltage-follower.X/mcc_generated_files/include/tcb1.h
deleted file mode 100644
index 4266cdc..0000000
--- a/voltage-follower.X/mcc_generated_files/include/tcb1.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef TCB1_H_INCLUDED
-#define TCB1_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*TCB1_cb_t)(void);
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb);
-void TCB1_SetOvfIsrCallback(TCB1_cb_t cb);
-
-int8_t TCB1_Initialize();
-void TCB1_EnableCaptInterrupt(void);
-void TCB1_DisableCaptInterrupt(void);
-uint16_t TCB1_ReadTimer(void);
-void TCB1_WriteTimer(uint16_t timerVal);
-void TCB1_ClearCaptInterruptFlag(void);
-bool TCB1_IsCaptInterruptEnabled();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/usart3.h b/voltage-follower.X/mcc_generated_files/include/usart3.h
deleted file mode 100644
index b1b355f..0000000
--- a/voltage-follower.X/mcc_generated_files/include/usart3.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef USART3_H_INCLUDED
-#define USART3_H_INCLUDED
-
-#include
-#include
-#include "../utils/compiler.h"
-#include "../utils/atomic.h"
-#include "../config/clock_config.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Normal Mode, Baud register value */
-#define USART3_BAUD_RATE(BAUD_RATE) (((float)24000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
-
-/* USART3 Ringbuffer */
-
-#define USART3_RX_BUFFER_SIZE 8
-#define USART3_TX_BUFFER_SIZE 8
-#define USART3_RX_BUFFER_MASK (USART3_RX_BUFFER_SIZE - 1)
-#define USART3_TX_BUFFER_MASK (USART3_TX_BUFFER_SIZE - 1)
-
-typedef enum { USART3_RX_CB = 1, USART3_TX_CB } usart3_cb_t;
-typedef void (*usart_callback)(void);
-
-/**
- * \brief Initialize USART interface
- * If module is configured to disabled state, the clock to the USART is disabled
- * if this is supported by the device's clock system.
- *
- * \return Initialization status.
- * \retval 0 the USART init was successful
- * \retval 1 the USART init was not successful
- */
-void USART3_Initialize();
-
-/**
- * \brief Enable RX and TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX and TX enable-bits in the USART control register
- *
- * \return Nothing
- */
-void USART3_Enable();
-
-/**
- * \brief Enable RX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the RX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableRx();
-
-/**
- * \brief Enable TX in USART3
- * 1. If supported by the clock system, enables the clock to the USART
- * 2. Enables the USART module by setting the TX enable-bit in the USART control register
- *
- * \return Nothing
- */
-void USART3_EnableTx();
-
-/**
- * \brief Disable USART3
- * 1. Disables the USART module by clearing the enable-bit(s) in the USART control register
- * 2. If supported by the clock system, disables the clock to the USART
- *
- * \return Nothing
- */
-void USART3_Disable();
-
-/**
- * \brief Get recieved data from USART3
- *
- * \return Data register from USART3 module
- */
-uint8_t USART3_GetData();
-
-/**
- * \brief Check if the usart can accept data to be transmitted
- *
- * \return The status of USART TX data ready check
- * \retval false The USART can not receive data to be transmitted
- * \retval true The USART can receive data to be transmitted
- */
-bool USART3_IsTxReady();
-
-/**
- * \brief Check if the USART has received data
- *
- * \return The status of USART RX data ready check
- * \retval true The USART has received data
- * \retval false The USART has not received data
- */
-bool USART3_IsRxReady();
-
-/**
- * \brief Check if USART3 data is transmitted
- *
- * \return Receiver ready status
- * \retval true Data is not completely shifted out of the shift register
- * \retval false Data completely shifted out if the USART shift register
- */
-bool USART3_IsTxBusy();
-
-
-
-bool USART3_IsTxDone();
-/**
- * \brief Read one character from USART3
- *
- * Function will block if a character is not available.
- *
- * \return Data read from the USART3 module
- */
-uint8_t USART3_Read(void);
-
-/**
- * \brief Write one character to USART3
- *
- * Function will block until a character can be accepted.
- *
- * \param[in] data The character to write to the USART
- *
- * \return Nothing
- */
-void USART3_Write(const uint8_t data);
-
-/**
- * \brief Set call back function for USART3
- *
- * \param[in] cb The call back function to set
- *
- * \param[in] type The type of ISR to be set
- *
- * \return Nothing
- */
-
-void USART3_DefaultRxIsrCb(void);
-
-void USART3_DefaultTxIsrCb(void);
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type);
-
-void USART3_SetRXISRCb(usart_callback cb);
-
-void USART3_SetTXISRCb(usart_callback cb);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* USART3_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/include/vref.h b/voltage-follower.X/mcc_generated_files/include/vref.h
deleted file mode 100644
index 9002df4..0000000
--- a/voltage-follower.X/mcc_generated_files/include/vref.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef VREF_H_INCLUDED
-#define VREF_H_INCLUDED
-
-#include "../utils/compiler.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- @Summary
- Initializes the VREF_Initialize.
-
- @Description
- This routine initializes the VREF_Initialize.
- This routine should only be called once during system initialization.
-
- @Preconditions
- None
-
- @Param
- None
-
- @Example
-
- VREF_Initialize();
-
-*/
-int8_t VREF_Initialize(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* CCL_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/mcc.c b/voltage-follower.X/mcc_generated_files/mcc.c
deleted file mode 100644
index e77c74d..0000000
--- a/voltage-follower.X/mcc_generated_files/mcc.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "mcc.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void)
-{
- PIN_MANAGER_Initialize();
- //CPU_Initialize();
- BOD_Initialize();
- WDT_Initialize();
- CLKCTRL_Initialize();
- SLPCTRL_Initialize();
- OPAMP_Initialize();
- ADC0_Initialize();
- DAC0_Initialize();
- RTC_Initialize();
- TCB0_Initialize();
- USART3_Initialize();
- VREF_Initialize();
- CPUINT_Initialize();
- TCB1_Initialize();
-}
-
-/**
- * \brief Initialize bod interface
- */
-int8_t BOD_Initialize()
-{
- //SLEEP DIS;
- ccp_write_io((void*)&(BOD.CTRLA),0x00);
-
- //VLMCFG FALLING; VLMIE disabled;
- BOD.INTCTRL = 0x00;
-
- //VLMLVL OFF;
- BOD.VLMCTRLA = 0x00;
-
- return 0;
-}
-
-ISR(BOD_VLM_vect)
-{
- /* Insert your AC interrupt handling code here */
-
- /* The interrupt flag has to be cleared manually */
- BOD.INTFLAGS = BOD_VLMIE_bm;
-}
-
-/**
- * \brief Initialize clkctrl interface
- */
-int8_t CLKCTRL_Initialize()
-{
- //RUNSTDBY disabled;
- ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),0x00);
-
- //RUNSTDBY disabled; CSUT 1K; SEL disabled; LPMODE disabled; ENABLE disabled;
- ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),0x00);
-
- //PDIV 6X; PEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),0x10);
-
- //CFDSRC CLKMAIN; CFDTST disabled; CFDEN disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),0x00);
-
- //INTTYPE INT; CFD disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),0x00);
-
- //CLKOUT disabled; CLKSEL OSCHF;
- ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),0x00);
-
- //PLLS disabled; EXTS disabled; XOSC32KS disabled; OSC32KS disabled; OSCHFS disabled; SOSC disabled;
- ccp_write_io((void*)&(CLKCTRL.MCLKSTATUS),0x00);
-
- //RUNSTDBY disabled; FREQSEL 24M; AUTOTUNE disabled;
- ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),0x24);
-
- return 0;
-}
-
-/**
- * \brief Initialize slpctrl interface
- */
-int8_t SLPCTRL_Initialize()
-{
- //SMODE IDLE; SEN disabled;
- ccp_write_io((void*)&(SLPCTRL.CTRLA),0x00);
-
- return 0;
-}
-
-/**
- * \brief Initialize wdt interface
- */
-
-int8_t WDT_Initialize()
-{
- //WINDOW OFF; PERIOD OFF;
- ccp_write_io((void*)&(WDT.CTRLA),0x00);
-
- return 0;
-}
-/*TODO comment will remove once complier support will be available.
-int8_t CPU_Initialize()
-{
- return 0;
-
-}
-*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/mcc.h b/voltage-follower.X/mcc_generated_files/mcc.h
deleted file mode 100644
index 486f447..0000000
--- a/voltage-follower.X/mcc_generated_files/mcc.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef MCC_H
-#define MCC_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "utils/compiler.h"
-#include "include/pin_manager.h"
-#include "include/usart3.h"
-#include "include/vref.h"
-#include "include/opamp.h"
-#include "include/rtc.h"
-#include "include/tcb1.h"
-#include "include/tcb0.h"
-#include "include/cpuint.h"
-#include "include/adc0.h"
-#include "include/dac0.h"
-#include "config/clock_config.h"
-
-/**
- * Initializes MCU, drivers and middleware in the project
-**/
-void SYSTEM_Initialize(void);
-int8_t BOD_Initialize();
-int8_t CLKCTRL_Initialize();
-int8_t SLPCTRL_Initialize();
-int8_t WDT_Initialize();
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* MCC_H */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/opamp/opamp.h b/voltage-follower.X/mcc_generated_files/opamp/opamp.h
new file mode 100644
index 0000000..d9fb0ff
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/opamp/opamp.h
@@ -0,0 +1,101 @@
+/**
+ * OPAMP Generated Driver API Header File
+ *
+ * @file opamp.h
+ *
+ * @defgroup opamp OPAMP
+ *
+ * @brief This file contains API prototypes and other datatypes for the OPAMP module.
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef OPAMP_H_INCLUDED
+#define OPAMP_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+#include
+
+#define OPAMP_TIMEBASE_VALUE (3)
+
+/**
+ * @ingroup opamp
+ * @brief This routine initializes the OPAMP and must be called before any other OPAMP routine is called.
+ * This routine should only be called once during system initialization.
+ * @param void
+ * @return void
+ */
+void OPAMP_Initialize(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine enables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_EnableSystem(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine disables the OPAMP System
+ * @param void
+ * @return void
+ */
+void OPAMP_DisableSystem(void);
+
+//OP0 Voltage Follower APIs
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's positive input as per user selection
+ * @param value - desired positive input. For the available positive inputs, refer to OPAMP_MUXPOS_t enum from the device header file
+ * @return void
+ */
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's settle time
+ * @param settleTime - desired settle time of 0 to 127 in us
+ * @return void
+ */
+void OPAMP_SetOP0SettleTime(uint8_t settleTime);
+
+/**
+ * @ingroup opamp
+ * @brief This routine checks if OP0's settling time is finished
+ * @param void
+ * @retval true - if the allowed settling time is finished
+ * @retval false - if the OP0 is waiting for settling, related to enabling or configuration changes
+ */
+bool OPAMP_IsOP0Settled(void);
+
+/**
+ * @ingroup opamp
+ * @brief This routine sets OP0's offset calibration
+ * @param calValue - desired offset
+ * @return void
+ */
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue);
+
+#endif /* OPAMP_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/opamp/src/opamp.c b/voltage-follower.X/mcc_generated_files/opamp/src/opamp.c
new file mode 100644
index 0000000..8cc19a5
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/opamp/src/opamp.c
@@ -0,0 +1,127 @@
+/**
+ * OPAMP Generated Driver File
+ *
+ * @file opamp.c
+ *
+ * @ingroup opamp
+ *
+ * @brief This is the generated driver implementation file for the OPAMP driver using AVR MCUs
+ *
+ * @version OPAMP Driver Version v1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../opamp.h"
+
+void OPAMP_Initialize(void)
+{
+ OPAMP_DisableSystem();
+
+ //TIMEBASE 3;
+ OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
+
+ //DBGRUN disabled;
+ OPAMP.DBGCTRL = 0x0;
+
+ //IRSEL FULL;
+ OPAMP.PWRCTRL = 0x0;
+
+ //OP0 Configuration : Voltage Follower
+ //OP0 Gain : 1
+
+ //MUXNEG OPn output (unity gain); MUXPOS DAC output;
+ OPAMP.OP0INMUX = 0x22;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP0RESMUX = 0x0;
+
+ //ALWAYSON enabled; EVENTEN disabled; OUTMODE Output Driver in Normal Mode; RUNSTBY disabled;
+ OPAMP.OP0CTRLA = 0x5;
+
+ //SETTLE 127;
+ OPAMP.OP0SETTLE = 0x7F;
+
+ //OP1 Configuration : Connected Directly to Pins
+
+ //MUXNEG Negative input pin for OPn; MUXPOS Positive input pin for OPn;
+ OPAMP.OP1INMUX = 0x0;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP1RESMUX = 0x0;
+
+ //ALWAYSON disabled; EVENTEN enabled; OUTMODE Output Driver Off; RUNSTBY disabled;
+ OPAMP.OP1CTRLA = 0x2;
+
+ //SETTLE 127;
+ OPAMP.OP1SETTLE = 0x7F;
+
+ //OP2 Configuration : Connected Directly to Pins
+
+ //MUXNEG Negative input pin for OPn; MUXPOS Positive input pin for OPn;
+ OPAMP.OP2INMUX = 0x0;
+
+ //MUXBOT Multiplexer off; MUXTOP Multiplexer off; MUXWIP R1 = 15R, R2 = 1R, R2/R1 = 0.07;
+ OPAMP.OP2RESMUX = 0x0;
+
+ //ALWAYSON disabled; EVENTEN enabled; OUTMODE Output Driver Off; RUNSTBY disabled;
+ OPAMP.OP2CTRLA = 0x2;
+
+ //SETTLE 127;
+ OPAMP.OP2SETTLE = 0x7F;
+
+ OPAMP_EnableSystem();
+}
+
+void OPAMP_EnableSystem(void)
+{
+ OPAMP.CTRLA |= OPAMP_ENABLE_bm;
+}
+
+void OPAMP_DisableSystem(void)
+{
+ OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
+}
+
+//OP0 Voltage Follower APIs
+
+void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
+{
+ OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
+}
+
+void OPAMP_SetOP0SettleTime(uint8_t settleTime)
+{
+ if (settleTime > 127) {
+ settleTime = 127;
+ }
+ OPAMP.OP0SETTLE = settleTime;
+}
+
+bool OPAMP_IsOP0Settled(void)
+{
+ return OPAMP.OP0STATUS > 0;
+}
+
+void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
+{
+ OPAMP.OP0CAL = calValue;
+}
diff --git a/voltage-follower.X/mcc_generated_files/src/adc0.c b/voltage-follower.X/mcc_generated_files/src/adc0.c
deleted file mode 100644
index e7ea879..0000000
--- a/voltage-follower.X/mcc_generated_files/src/adc0.c
+++ /dev/null
@@ -1,213 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/adc0.h"
-
-adc_irq_cb_t ADC0_window_cb = NULL;
-
-/**
- * \brief Initialize ADC interface
- */
-int8_t ADC0_Initialize()
-{
-
- //SAMPNUM ACC8;
- ADC0.CTRLB = 0x03;
-
- //PRESC DIV12;
- ADC0.CTRLC = 0x03;
-
- //INITDLY DLY0; SAMPDLY 0;
- ADC0.CTRLD = 0x00;
-
- //WINCM NONE;
- ADC0.CTRLE = 0x00;
-
- //DBGRUN disabled;
- ADC0.DBGCTRL = 0x00;
-
- //STARTEI disabled;
- ADC0.EVCTRL = 0x00;
-
- //WCMP disabled; RESRDY enabled;
- ADC0.INTCTRL = 0x01;
-
- //MUXPOS AIN2;
- ADC0.MUXPOS = 0x02;
-
- //MUXNEG AIN0;
- ADC0.MUXNEG = 0x00;
-
- //SAMPLEN 1;
- ADC0.SAMPCTRL = 0x01;
-
- // Window comparator high threshold
- ADC0.WINHT = 0x00;
-
- // Window comparator low threshold
- ADC0.WINLT = 0x00;
-
- //RUNSTBY disabled; CONVMODE disabled; LEFTADJ disabled; RESSEL 10BIT; FREERUN disabled; ENABLE enabled;
- ADC0.CTRLA = 0x05;
-
-
- return 0;
-}
-
-void ADC0_Enable()
-{
- ADC0.CTRLA |= ADC_ENABLE_bm;
-}
-
-void ADC0_Disable()
-{
- ADC0.CTRLA &= ~ADC_ENABLE_bm;
-}
-
-void ADC0_EnableAutoTrigger()
-{
- ADC0.EVCTRL |= ADC_STARTEI_bm;
-}
-
-void ADC0_DisableAutoTrigger()
-{
- ADC0.EVCTRL &= ~ADC_STARTEI_bm;
-}
-
-void ADC0_SetWindowHigh(adc_result_t high)
-{
- ADC0.WINHT = high;
-}
-
-void ADC0_SetWindowLow(adc_result_t low)
-{
- ADC0.WINLT = low;
-}
-
-void ADC0_SetWindowMode(adc0_window_mode_t mode)
-{
- ADC0.CTRLE = mode;
-}
-
-void ADC0_SetWindowChannel(adc_0_channel_t channel)
-{
- ADC0.MUXPOS = channel;
-}
-
-void ADC0_StartConversion(adc_0_channel_t channel)
-{
- ADC0.CTRLA &= ~ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StartDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- ADC0.CTRLA |= ADC_CONVMODE_bm;
- ADC0.MUXPOS = channel;
- ADC0.MUXNEG = channel1;
- ADC0.COMMAND = ADC_STCONV_bm;
-}
-
-void ADC0_StopConversion()
-{
- ADC0.COMMAND = ADC_SPCONV_bm;
-}
-
-bool ADC0_IsConversionDone()
-{
- return (ADC0.INTFLAGS & ADC_RESRDY_bm);
-}
-
-adc_result_t ADC0_GetConversionResult(void)
-{
- return (ADC0.RES);
-}
-
-bool ADC0_GetWindowResult(void)
-{
- bool temp = (ADC0.INTFLAGS & ADC_WCMP_bm);
- ADC0.INTFLAGS = ADC_WCMP_bm; // Clear intflag if set
- return temp;
-}
-
-adc_result_t ADC0_GetConversion(adc_0_channel_t channel)
-{
- adc_result_t res;
-
- ADC0_StartConversion(channel);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS = ADC_RESRDY_bm;
- return res;
-}
-
-diff_adc_result_t ADC0_GetDiffConversion(adc_0_channel_t channel, adc_0_muxneg_channel_t channel1)
-{
- diff_adc_result_t res;
-
- ADC0_StartDiffConversion(channel, channel1);
- while (!ADC0_IsConversionDone());
- res = ADC0_GetConversionResult();
- ADC0.INTFLAGS |= ADC_RESRDY_bm;
- return res;
-}
-
-uint8_t ADC0_GetResolution()
-{
- return (ADC0.CTRLA & ADC_RESSEL0_bm) ? 10 : 12;
-}
-
-void ADC0_RegisterWindowCallback(adc_irq_cb_t f)
-{
- ADC0_window_cb = f;
-}
-
-ISR(ADC0_WCMP_vect)
-{
-
- if (ADC0_window_cb != NULL) {
- ADC0_window_cb();
- }
-
- // Clear the interrupt flag
- ADC0.INTFLAGS = ADC_WCMP_bm;
-}
-
-//ISR(ADC0_RESRDY_vect)
-//{
-// /* Insert your ADC result ready interrupt handling code here *///
-//
-// /* The interrupt flag has to be cleared manually */
-// ADC0.INTFLAGS = ADC_RESRDY_bm;
-//}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/src/cpuint.c b/voltage-follower.X/mcc_generated_files/src/cpuint.c
deleted file mode 100644
index ea41199..0000000
--- a/voltage-follower.X/mcc_generated_files/src/cpuint.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/cpuint.h"
-
-/**
- * \brief Initialize cpuint interface
- */
-int8_t CPUINT_Initialize()
-{
- /* IVSEL and CVT are Configuration Change Protected */
-
- //IVSEL disabled; CVT disabled; LVL0RR disabled;
- ccp_write_io((void*)&(CPUINT.CTRLA),0x00);
-
- //LVL0PRI 0;
- CPUINT.LVL0PRI = 0x00;
-
- //LVL1VEC 0;
- CPUINT.LVL1VEC = 0x00;
-
- ENABLE_INTERRUPTS();
-
- return 0;
-}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/src/dac0.c b/voltage-follower.X/mcc_generated_files/src/dac0.c
deleted file mode 100644
index 1aba646..0000000
--- a/voltage-follower.X/mcc_generated_files/src/dac0.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-
-#include "../include/dac0.h"
-/**
- * \brief Initialize DAC interface
- */
-int8_t DAC0_Initialize()
-{
- //RUNSTDBY disabled; OUTEN enabled; ENABLE enabled;
- DAC0.CTRLA = 0x41;
-
- //DATA 0;
- DAC0.DATA = 0x00;
-
- return 0;
-}
-
-void DAC0_Enable()
-{
- DAC0.CTRLA |= DAC_ENABLE_bm;
-}
-
-void DAC0_Disable()
-{
- DAC0.CTRLA &= ~DAC_ENABLE_bm;
-}
-
-void DAC0_SetOutput(dac_resolution_t value)
-{
- value = value << DAC_DATA_gp;
- value = value & 0xFFC0;
- DAC0.DATA = value;
-}
-
-uint8_t DAC0_GetResolution()
-{
- return 10;
-}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/src/opamp.c b/voltage-follower.X/mcc_generated_files/src/opamp.c
deleted file mode 100644
index edc86b2..0000000
--- a/voltage-follower.X/mcc_generated_files/src/opamp.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-#include "../include/opamp.h"
-
-void OPAMP_Initialize()
-{
- OPAMP_DisableSystem();
-
- //TIMEBASE 23;
- OPAMP.TIMEBASE = OPAMP_TIMEBASE_VALUE << OPAMP_TIMEBASE_gp;
-
- //DBGRUN disabled;
- OPAMP.DBGCTRL = 0x00;
-
- //IRSEL FULL;
- OPAMP.PWRCTRL = 0x00;
-
- //OP0 Configuration : Voltage Follower
- //OP0 Gain : 1
-
- //MUXNEG OUT; MUXPOS DAC;
- OPAMP.OP0INMUX = 0x22;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP0RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE NORMAL; EVENTEN disabled; ALWAYSON enabled;
- OPAMP.OP0CTRLA = 0x05;
-
- //SETTLE 127;
- OPAMP.OP0SETTLE = 0x7F;
-
- //OP1 Configuration : Connected Directly to Pins
-
- //MUXNEG INN; MUXPOS INP;
- OPAMP.OP1INMUX = 0x00;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP1RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE OFF; EVENTEN enabled; ALWAYSON disabled;
- OPAMP.OP1CTRLA = 0x02;
-
- //SETTLE 127;
- OPAMP.OP1SETTLE = 0x7F;
-
- //OP2 Configuration : Connected Directly to Pins
-
- //MUXNEG INN; MUXPOS INP;
- OPAMP.OP2INMUX = 0x00;
-
- //MUXWIP WIP0; MUXBOT OFF; MUXTOP OFF;
- OPAMP.OP2RESMUX = 0x00;
-
- //RUNSTBY disabled; OUTMODE OFF; EVENTEN enabled; ALWAYSON disabled;
- OPAMP.OP2CTRLA = 0x02;
-
- //SETTLE 127;
- OPAMP.OP2SETTLE = 0x7F;
-
- OPAMP_EnableSystem();
-}
-
-void OPAMP_EnableSystem(void)
-{
- OPAMP.CTRLA |= OPAMP_ENABLE_bm;
-}
-
-void OPAMP_DisableSystem(void)
-{
- OPAMP.CTRLA &= ~OPAMP_ENABLE_bm;
-}
-
-//OP0 Voltage Follower APIs
-
-void OPAMP_SetOP0PositiveInMux(OPAMP_OP0INMUX_MUXPOS_t value)
-{
- OPAMP.OP0INMUX = (OPAMP.OP0INMUX & ~OPAMP_MUXPOS_gm) | value;
-}
-
-void OPAMP_SetOP0SettleTime(uint8_t settleTime)
-{
- if (settleTime > 127) {
- settleTime = 127;
- }
- OPAMP.OP0SETTLE = settleTime;
-}
-
-bool OPAMP_IsOP0Settled(void)
-{
- return OPAMP.OP0STATUS > 0;
-}
-
-void OPAMP_SetOP0OffsetCalibration(uint8_t calValue)
-{
- OPAMP.OP0CAL = calValue;
-}
diff --git a/voltage-follower.X/mcc_generated_files/src/pin_manager.c b/voltage-follower.X/mcc_generated_files/src/pin_manager.c
deleted file mode 100644
index 29c1217..0000000
--- a/voltage-follower.X/mcc_generated_files/src/pin_manager.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/pin_manager.h"
-static void (*PORTB_LED0_InterruptHandler)(void);
-static void (*PORTA_PA2_InterruptHandler)(void);
-static void (*PORTA_PA3_InterruptHandler)(void);
-static void (*PORTD_PD6_InterruptHandler)(void);
-static void (*PORTB_PB1_InterruptHandler)(void);
-static void (*PORTB_PB0_InterruptHandler)(void);
-static void (*PORTD_PD2_InterruptHandler)(void);
-
-void PORT_Initialize(void);
-
-void PIN_MANAGER_Initialize()
-{
- PORT_Initialize();
-
- /* DIR Registers Initialization */
- PORTA.DIR = 0x0C;
- PORTB.DIR = 0x09;
- PORTC.DIR = 0x00;
- PORTD.DIR = 0x44;
- PORTE.DIR = 0x00;
- PORTF.DIR = 0x00;
-
- /* OUT Registers Initialization */
- PORTA.OUT = 0x00;
- PORTB.OUT = 0x00;
- PORTC.OUT = 0x00;
- PORTD.OUT = 0x00;
- PORTE.OUT = 0x00;
- PORTF.OUT = 0x00;
-
- /* PINxCTRL registers Initialization */
- PORTA.PIN0CTRL = 0x00;
- PORTA.PIN1CTRL = 0x00;
- PORTA.PIN2CTRL = 0x00;
- PORTA.PIN3CTRL = 0x00;
- PORTA.PIN4CTRL = 0x00;
- PORTA.PIN5CTRL = 0x00;
- PORTA.PIN6CTRL = 0x00;
- PORTA.PIN7CTRL = 0x00;
- PORTB.PIN0CTRL = 0x00;
- PORTB.PIN1CTRL = 0x00;
- PORTB.PIN2CTRL = 0x00;
- PORTB.PIN3CTRL = 0x00;
- PORTB.PIN4CTRL = 0x00;
- PORTB.PIN5CTRL = 0x00;
- PORTB.PIN6CTRL = 0x00;
- PORTB.PIN7CTRL = 0x00;
- PORTC.PIN0CTRL = 0x00;
- PORTC.PIN1CTRL = 0x00;
- PORTC.PIN2CTRL = 0x00;
- PORTC.PIN3CTRL = 0x00;
- PORTC.PIN4CTRL = 0x00;
- PORTC.PIN5CTRL = 0x00;
- PORTC.PIN6CTRL = 0x00;
- PORTC.PIN7CTRL = 0x00;
- PORTD.PIN0CTRL = 0x00;
- PORTD.PIN1CTRL = 0x04;
- PORTD.PIN2CTRL = 0x04;
- PORTD.PIN3CTRL = 0x04;
- PORTD.PIN4CTRL = 0x04;
- PORTD.PIN5CTRL = 0x00;
- PORTD.PIN6CTRL = 0x04;
- PORTD.PIN7CTRL = 0x04;
- PORTE.PIN0CTRL = 0x00;
- PORTE.PIN1CTRL = 0x04;
- PORTE.PIN2CTRL = 0x00;
- PORTE.PIN3CTRL = 0x04;
- PORTE.PIN4CTRL = 0x00;
- PORTE.PIN5CTRL = 0x00;
- PORTE.PIN6CTRL = 0x00;
- PORTE.PIN7CTRL = 0x00;
- PORTF.PIN0CTRL = 0x00;
- PORTF.PIN1CTRL = 0x00;
- PORTF.PIN2CTRL = 0x00;
- PORTF.PIN3CTRL = 0x00;
- PORTF.PIN4CTRL = 0x00;
- PORTF.PIN5CTRL = 0x00;
- PORTF.PIN6CTRL = 0x00;
- PORTF.PIN7CTRL = 0x00;
-
- /* Multi-pin Config registers Initialization */
- PORTA.PINCONFIG = 0x00;
- PORTA.PINCTRLCLR = 0x00;
- PORTA.PINCTRLSET = 0x00;
- PORTA.PINCTRLUPD = 0x00;
- PORTB.PINCONFIG = 0x00;
- PORTB.PINCTRLCLR = 0x00;
- PORTB.PINCTRLSET = 0x00;
- PORTB.PINCTRLUPD = 0x00;
- PORTC.PINCONFIG = 0x00;
- PORTC.PINCTRLCLR = 0x00;
- PORTC.PINCTRLSET = 0x00;
- PORTC.PINCTRLUPD = 0x00;
- PORTD.PINCONFIG = 0x00;
- PORTD.PINCTRLCLR = 0x00;
- PORTD.PINCTRLSET = 0x00;
- PORTD.PINCTRLUPD = 0x00;
- PORTE.PINCONFIG = 0x00;
- PORTE.PINCTRLCLR = 0x00;
- PORTE.PINCTRLSET = 0x00;
- PORTE.PINCTRLUPD = 0x00;
- PORTF.PINCONFIG = 0x00;
- PORTF.PINCTRLCLR = 0x00;
- PORTF.PINCTRLSET = 0x00;
- PORTF.PINCTRLUPD = 0x00;
-
- /* PORTMUX Initialization */
- PORTMUX.ACROUTEA = 0x00;
- PORTMUX.CCLROUTEA = 0x00;
- PORTMUX.EVSYSROUTEA = 0x00;
- PORTMUX.SPIROUTEA = 0x00;
- PORTMUX.TCAROUTEA = 0x00;
- PORTMUX.TCBROUTEA = 0x00;
- PORTMUX.TCDROUTEA = 0x00;
- PORTMUX.TWIROUTEA = 0x00;
- PORTMUX.USARTROUTEA = 0x00;
- PORTMUX.USARTROUTEB = 0x00;
- PORTMUX.ZCDROUTEA = 0x00;
-
- // register default ISC callback functions at runtime; use these methods to register a custom function
- PORTB_LED0_SetInterruptHandler(PORTB_LED0_DefaultInterruptHandler);
- PORTA_PA2_SetInterruptHandler(PORTA_PA2_DefaultInterruptHandler);
- PORTA_PA3_SetInterruptHandler(PORTA_PA3_DefaultInterruptHandler);
- PORTD_PD6_SetInterruptHandler(PORTD_PD6_DefaultInterruptHandler);
- PORTB_PB1_SetInterruptHandler(PORTB_PB1_DefaultInterruptHandler);
- PORTB_PB0_SetInterruptHandler(PORTB_PB0_DefaultInterruptHandler);
- PORTD_PD2_SetInterruptHandler(PORTD_PD2_DefaultInterruptHandler);
-}
-
-void PORT_Initialize(void)
-{
- /* On AVR devices all peripherals are enable from power on reset, this
- * disables all peripherals to save power. Driver shall enable
- * peripheral if used */
-
- /* Set all pins to low power mode */
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
- for (uint8_t i = 0; i < 8; i++) {
- *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
- }
-
-}
-
-/**
- Allows selecting an interrupt handler for PORTB_LED0 at application runtime
-*/
-void PORTB_LED0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_LED0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_LED0_DefaultInterruptHandler(void)
-{
- // add your PORTB_LED0 interrupt custom code
- // or set custom function using PORTB_LED0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA2 at application runtime
-*/
-void PORTA_PA2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA2_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA2_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA2 interrupt custom code
- // or set custom function using PORTA_PA2_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTA_PA3 at application runtime
-*/
-void PORTA_PA3_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTA_PA3_InterruptHandler = interruptHandler;
-}
-
-void PORTA_PA3_DefaultInterruptHandler(void)
-{
- // add your PORTA_PA3 interrupt custom code
- // or set custom function using PORTA_PA3_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD6 at application runtime
-*/
-void PORTD_PD6_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD6_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD6_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD6 interrupt custom code
- // or set custom function using PORTD_PD6_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB1 at application runtime
-*/
-void PORTB_PB1_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB1_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB1_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB1 interrupt custom code
- // or set custom function using PORTB_PB1_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTB_PB0 at application runtime
-*/
-void PORTB_PB0_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTB_PB0_InterruptHandler = interruptHandler;
-}
-
-void PORTB_PB0_DefaultInterruptHandler(void)
-{
- // add your PORTB_PB0 interrupt custom code
- // or set custom function using PORTB_PB0_SetInterruptHandler()
-}
-/**
- Allows selecting an interrupt handler for PORTD_PD2 at application runtime
-*/
-void PORTD_PD2_SetInterruptHandler(void (* interruptHandler)(void))
-{
- PORTD_PD2_InterruptHandler = interruptHandler;
-}
-
-void PORTD_PD2_DefaultInterruptHandler(void)
-{
- // add your PORTD_PD2 interrupt custom code
- // or set custom function using PORTD_PD2_SetInterruptHandler()
-}
diff --git a/voltage-follower.X/mcc_generated_files/src/rtc.c b/voltage-follower.X/mcc_generated_files/src/rtc.c
deleted file mode 100644
index 11771a9..0000000
--- a/voltage-follower.X/mcc_generated_files/src/rtc.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 2.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/rtc.h"
-
-/**
- * \brief Initialize rtc interface
- *
- * \return Initialization status.
- */
-
-void (*RTC_OVF_isr_cb)(void) = NULL;
-void (*RTC_CMP_isr_cb)(void) = NULL;
-void (*RTC_PIT_isr_cb)(void) = NULL;
-
-/**
- * \brief Initialize RTC interface
- */
-int8_t RTC_Initialize()
-{
- while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
- }
- //Compare
- RTC.CMP = 0x00;
-
- //Count
- RTC.CNT = 0x00;
-
- //Period
- RTC.PER = 0x3FF;
-
- //Clock selection
- RTC.CLKSEL = 0x00;
-
- //CMP disabled; OVF enabled;
- RTC.INTCTRL = 0x01;
-
- //RUNSTDBY disabled; PRESCALER DIV32; CORREN disabled; RTCEN enabled;
- RTC.CTRLA = 0x29;
-
- while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
- }
- //PI disabled;
- RTC.PITINTCTRL = 0x00;
-
-
- return 0;
-}
-
-void RTC_SetOVFIsrCallback(RTC_cb_t cb)
-{
- RTC_OVF_isr_cb = cb;
-}
-
-void RTC_SetCMPIsrCallback(RTC_cb_t cb)
-{
- RTC_CMP_isr_cb = cb;
-}
-
-void RTC_SetPITIsrCallback(RTC_cb_t cb)
-{
- RTC_PIT_isr_cb = cb;
-}
-
-ISR(RTC_CNT_vect)
-{
- if (RTC.INTFLAGS & RTC_OVF_bm )
- {
- if (RTC_OVF_isr_cb != NULL)
- {
- (*RTC_OVF_isr_cb)();
- }
- }
-
- if (RTC.INTFLAGS & RTC_CMP_bm )
- {
- if (RTC_CMP_isr_cb != NULL)
- {
- (*RTC_CMP_isr_cb)();
- }
- }
- RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
-}
-
-ISR(RTC_PIT_vect)
-{
- if (RTC_PIT_isr_cb != NULL)
- {
- (*RTC_PIT_isr_cb)();
- }
- RTC.PITINTFLAGS = RTC_PI_bm;
-}
-
-inline void RTC_WriteCounter(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_CNTBUSY_bm);
- RTC.CNT = timerVal;
-}
-
-inline uint16_t RTC_ReadCounter(void)
-{
- return RTC.CNT;
-}
-
-inline void RTC_WritePeroid(uint16_t timerVal)
-{
- while (RTC.STATUS & RTC_PERBUSY_bm);
- RTC.PER = timerVal;
-}
-
-inline uint16_t RTC_ReadPeriod(void)
-{
- return RTC.PER;
-}
-
-inline void RTC_EnableCMPInterrupt(void)
-{
- RTC.INTCTRL |= RTC_CMP_bm;
-}
-
-inline void RTC_DisableCMPInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_CMP_bm;
-}
-
-inline void RTC_EnableOVFInterrupt(void)
-{
- RTC.INTCTRL |= RTC_OVF_bm;
-}
-
-inline void RTC_DisableOVFInterrupt(void)
-{
- RTC.INTCTRL &= ~RTC_OVF_bm;
-}
-
-inline void RTC_EnablePITInterrupt(void)
-{
- RTC.PITINTCTRL |= RTC_PI_bm;
-}
-
-inline void RTC_DisablePITInterrupt(void)
-{
- RTC.PITINTCTRL &= ~RTC_PI_bm;
-}
-
-inline void RTC_ClearOVFInterruptFlag(void)
-{
- RTC.INTFLAGS &= ~RTC_OVF_bm;
-}
-
-inline bool RTC_IsOVFInterruptEnabled(void)
-{
- return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
-}
diff --git a/voltage-follower.X/mcc_generated_files/src/tcb0.c b/voltage-follower.X/mcc_generated_files/src/tcb0.c
deleted file mode 100644
index 8e91fba..0000000
--- a/voltage-follower.X/mcc_generated_files/src/tcb0.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb0.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-
-void (*TCB0_CAPT_isr_cb)(void) = NULL;
-
-void TCB0_SetCaptIsrCallback(TCB0_cb_t cb)
-{
- TCB0_CAPT_isr_cb = cb;
-}
-
-
-ISR(TCB0_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB0.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB0_CAPT_isr_cb != NULL)
- {
- (*TCB0_CAPT_isr_cb)();
- }
-
- TCB0.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB0_Initialize()
-{
- //Compare or Capture
- TCB0.CCMP = 0x284F;
-
- //Count
- TCB0.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN disabled; CNTMODE INT;
- TCB0.CTRLB = 0x00;
-
- //DBGRUN disabled;
- TCB0.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB0.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB0.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB0.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB0.TEMP = 0x00;
-
- //RUNSTDBY enabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB0.CTRLA = 0x41;
-
- return 0;
-}
-
-void TCB0_WriteTimer(uint16_t timerVal)
-{
- TCB0.CNT=timerVal;
-}
-
-uint16_t TCB0_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB0.CNT;
-
- return readVal;
-}
-
-void TCB0_EnableCaptInterrupt(void)
-{
- TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB0_DisableCaptInterrupt(void)
-{
- TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB0_ClearCaptInterruptFlag(void)
-{
- TCB0.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB0_IsCaptInterruptEnabled(void)
-{
- return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
diff --git a/voltage-follower.X/mcc_generated_files/src/tcb1.c b/voltage-follower.X/mcc_generated_files/src/tcb1.c
deleted file mode 100644
index 1b7dce9..0000000
--- a/voltage-follower.X/mcc_generated_files/src/tcb1.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/tcb1.h"
-
-/**
- * \brief Initialize tcb interface
- *
- * \return Initialization status.
- */
-
-void (*TCB1_CAPT_isr_cb)(void) = NULL;
-
-void TCB1_SetCaptIsrCallback(TCB1_cb_t cb)
-{
- TCB1_CAPT_isr_cb = cb;
-}
-
-
-ISR(TCB1_INT_vect)
-{
- /* Insert your TCB interrupt handling code */
-
- /**
- * The interrupt flag is cleared by writing 1 to it, or when the Capture register
- * is read in Capture mode
- */
- if(TCB1.INTFLAGS & TCB_CAPT_bm)
- {
- if (TCB1_CAPT_isr_cb != NULL)
- {
- (*TCB1_CAPT_isr_cb)();
- }
-
- TCB1.INTFLAGS = TCB_CAPT_bm;
- }
-
-}
-
-/**
- * \brief Initialize TCB interface
- */
-int8_t TCB1_Initialize()
-{
- //Compare or Capture
- TCB1.CCMP = 0x752F;
-
- //Count
- TCB1.CNT = 0x00;
-
- //ASYNC disabled; CCMPINIT disabled; CCMPEN disabled; CNTMODE INT;
- TCB1.CTRLB = 0x00;
-
- //DBGRUN disabled;
- TCB1.DBGCTRL = 0x00;
-
- //FILTER disabled; EDGE disabled; CAPTEI disabled;
- TCB1.EVCTRL = 0x00;
-
- //OVF disabled; CAPT enabled;
- TCB1.INTCTRL = 0x01;
-
- //OVF disabled; CAPT disabled;
- TCB1.INTFLAGS = 0x00;
-
- //Temporary Value
- TCB1.TEMP = 0x00;
-
- //RUNSTDBY disabled; CASCADE disabled; SYNCUPD disabled; CLKSEL DIV1; ENABLE enabled;
- TCB1.CTRLA = 0x01;
-
- return 0;
-}
-
-void TCB1_WriteTimer(uint16_t timerVal)
-{
- TCB1.CNT=timerVal;
-}
-
-uint16_t TCB1_ReadTimer(void)
-{
- uint16_t readVal;
-
- readVal = TCB1.CNT;
-
- return readVal;
-}
-
-void TCB1_EnableCaptInterrupt(void)
-{
- TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
-}
-
-void TCB1_DisableCaptInterrupt(void)
-{
- TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
-
-}
-
-inline void TCB1_ClearCaptInterruptFlag(void)
-{
- TCB1.INTFLAGS &= ~TCB_CAPT_bm;
-
-}
-
-inline bool TCB1_IsCaptInterruptEnabled(void)
-{
- return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
-}
-
diff --git a/voltage-follower.X/mcc_generated_files/src/usart3.c b/voltage-follower.X/mcc_generated_files/src/usart3.c
deleted file mode 100644
index 38ad054..0000000
--- a/voltage-follower.X/mcc_generated_files/src/usart3.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/usart3.h"
-
-#if defined(__GNUC__)
-
-int USART3_printCHAR(char character, FILE *stream)
-{
- USART3_Write(character);
- return 0;
-}
-
-FILE USART3_stream = FDEV_SETUP_STREAM(USART3_printCHAR, NULL, _FDEV_SETUP_WRITE);
-
-#elif defined(__ICCAVR__)
-
-int putchar(int outChar)
-{
- USART3_Write(outChar);
- return outChar;
-}
-#endif
-
-/* Static Variables holding the ringbuffer used in IRQ mode */
-static uint8_t USART3_rxbuf[USART3_RX_BUFFER_SIZE];
-static volatile uint8_t USART3_rx_head;
-static volatile uint8_t USART3_rx_tail;
-static volatile uint8_t USART3_rx_elements;
-static uint8_t USART3_txbuf[USART3_TX_BUFFER_SIZE];
-static volatile uint8_t USART3_tx_head;
-static volatile uint8_t USART3_tx_tail;
-static volatile uint8_t USART3_tx_elements;
-
-void (*USART3_rx_isr_cb)(void) = &USART3_DefaultRxIsrCb;
-
-void (*USART3_tx_isr_cb)(void) = &USART3_DefaultTxIsrCb;
-
-void USART3_DefaultRxIsrCb(void)
-{
- uint8_t data;
- uint8_t tmphead;
-
- /* Read the received data */
- data = USART3.RXDATAL;
- /* Calculate buffer index */
- tmphead = (USART3_rx_head + 1) & USART3_RX_BUFFER_MASK;
-
- if (tmphead == USART3_rx_tail) {
- /* ERROR! Receive buffer overflow */
- }else {
- /*Store new index*/
- USART3_rx_head = tmphead;
-
- /* Store received data in buffer */
- USART3_rxbuf[tmphead] = data;
- USART3_rx_elements++;
- }
-}
-
-void USART3_DefaultTxIsrCb(void)
-{
- uint8_t tmptail;
-
- /* Check if all data is transmitted */
- if (USART3_tx_elements != 0) {
- /* Calculate buffer index */
- tmptail = (USART3_tx_tail + 1) & USART3_TX_BUFFER_MASK;
- /* Store new index */
- USART3_tx_tail = tmptail;
- /* Start transmission */
- USART3.TXDATAL = USART3_txbuf[tmptail];
-
- USART3_tx_elements--;
- }
-
- if (USART3_tx_elements == 0) {
- /* Disable Tx interrupt */
- USART3.CTRLA &= ~(1 << USART_DREIE_bp);
- }
-}
-
-void USART3_SetISRCb(usart_callback cb, usart3_cb_t type)
-{
- switch (type) {
- case USART3_RX_CB:
- USART3_rx_isr_cb = cb;
- break;
- case USART3_TX_CB:
- USART3_tx_isr_cb = cb;
- break;
- default:
- // do nothing
- break;
- }
-}
-
-void USART3_SetRXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_RX_CB);
-}
-
-void USART3_SetTXISRCb(usart_callback cb)
-{
- USART3_SetISRCb(cb,USART3_TX_CB);
-}
-
-/* Interrupt service routine for RX complete */
-ISR(USART3_RXC_vect)
-{
- if (USART3_rx_isr_cb != NULL)
- {
- (*USART3_rx_isr_cb)();
- }
-}
-
-/* Interrupt service routine for Data Register Empty */
-ISR(USART3_DRE_vect)
-{
- if (USART3_tx_isr_cb != NULL)
- {
- (*USART3_tx_isr_cb)();
- }
-}
-
-ISR(USART3_TXC_vect)
-{
- USART3.STATUS |= USART_TXCIF_bm;
-}
-
-bool USART3_IsTxReady()
-{
- return (USART3_tx_elements != USART3_TX_BUFFER_SIZE);
-}
-
-bool USART3_IsRxReady()
-{
- return (USART3_rx_elements != 0);
-}
-
-bool USART3_IsTxBusy()
-{
- return (!(USART3.STATUS & USART_TXCIF_bm));
-}
-
-bool USART3_IsTxDone()
-{
- return (USART3.STATUS & USART_TXCIF_bm);
-}
-
-uint8_t USART3_Read(void)
-{
- uint8_t tmptail;
-
- /* Wait for incoming data */
- while (USART3_rx_elements == 0)
- ;
- /* Calculate buffer index */
- tmptail = (USART3_rx_tail + 1) & USART3_RX_BUFFER_MASK;
- /* Store new index */
- USART3_rx_tail = tmptail;
- ENTER_CRITICAL(R);
- USART3_rx_elements--;
- EXIT_CRITICAL(R);
-
- /* Return data */
- return USART3_rxbuf[tmptail];
-}
-
-void USART3_Write(const uint8_t data)
-{
- uint8_t tmphead;
-
- /* Calculate buffer index */
- tmphead = (USART3_tx_head + 1) & USART3_TX_BUFFER_MASK;
- /* Wait for free space in buffer */
- while (USART3_tx_elements == USART3_TX_BUFFER_SIZE)
- ;
- /* Store data in buffer */
- USART3_txbuf[tmphead] = data;
- /* Store new index */
- USART3_tx_head = tmphead;
- ENTER_CRITICAL(W);
- USART3_tx_elements++;
- EXIT_CRITICAL(W);
- /* Enable Tx interrupt */
- USART3.CTRLA |= (1 << USART_DREIE_bp);
-}
-
-void USART3_Initialize()
-{
- //set baud rate register
- USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
-
- //RXCIE disabled; TXCIE disabled; DREIE enabled; RXSIE disabled; LBME disabled; ABEIE disabled; RS485 OFF;
- USART3.CTRLA = 0x20;
-
- //RXEN disabled; TXEN enabled; SFDEN disabled; ODME disabled; RXMODE NORMAL; MPCM disabled;
- USART3.CTRLB = 0x40;
-
- //CMODE ASYNCHRONOUS; PMODE DISABLED; SBMODE 1BIT; CHSIZE 8BIT; UDORD disabled; UCPHA disabled;
- USART3.CTRLC = 0x03;
-
- //DBGCTRL_DBGRUN
- USART3.DBGCTRL = 0x00;
-
- //EVCTRL_IREI
- USART3.EVCTRL = 0x00;
-
- //RXPLCTRL_RXPL
- USART3.RXPLCTRL = 0x00;
-
- //TXPLCTRL_TXPL
- USART3.TXPLCTRL = 0x00;
-
-
- uint8_t x;
-
- /* Initialize ringbuffers */
- x = 0;
-
- USART3_rx_tail = x;
- USART3_rx_head = x;
- USART3_rx_elements = x;
- USART3_tx_tail = x;
- USART3_tx_head = x;
- USART3_tx_elements = x;
-
-#if defined(__GNUC__)
- stdout = &USART3_stream;
-#endif
-
-}
-
-void USART3_Enable()
-{
- USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
-}
-
-void USART3_EnableRx()
-{
- USART3.CTRLB |= USART_RXEN_bm;
-}
-
-void USART3_EnableTx()
-{
- USART3.CTRLB |= USART_TXEN_bm;
-}
-
-void USART3_Disable()
-{
- USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
-}
-
-uint8_t USART3_GetData()
-{
- return USART3.RXDATAL;
-}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/src/vref.c b/voltage-follower.X/mcc_generated_files/src/vref.c
deleted file mode 100644
index 36893ad..0000000
--- a/voltage-follower.X/mcc_generated_files/src/vref.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#include "../include/vref.h"
-
-int8_t VREF_Initialize()
-{
- //ALWAYSON disabled; REFSEL 1V024;
- VREF.ACREF = 0x00;
-
- //ALWAYSON enabled; REFSEL 1V024;
- VREF.ADC0REF = 0x80;
-
- //ALWAYSON enabled; REFSEL 1V024;
- VREF.DAC0REF = 0x80;
-
- return 0;
-}
diff --git a/voltage-follower.X/mcc_generated_files/system/ccp.h b/voltage-follower.X/mcc_generated_files/system/ccp.h
new file mode 100644
index 0000000..9fb8a16
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/ccp.h
@@ -0,0 +1,72 @@
+/**
+ * CCP Header File
+ *
+ * @file ccp.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the Configuration Change Protection (CCP) header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CPU_CCP_H
+#define CPU_CCP_H
+
+#include "../system/utils/compiler.h"
+#include "../system/protected_io.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Writes to a CCP-protected 8-bit I/O register.
+ * @param addr Address of the I/O register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_io(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_IOREG_gc, value);
+}
+
+/**
+ * @brief Writes to a CCP-protected 8-bit SPM register.
+ * @param addr Address of the SPM register.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impacton calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+static inline void ccp_write_spm(void *addr, uint8_t value)
+{
+ protected_write_io(addr, CCP_SPM_gc, value);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CPU_CCP_H */
diff --git a/voltage-follower.X/mcc_generated_files/system/clock.h b/voltage-follower.X/mcc_generated_files/system/clock.h
new file mode 100644
index 0000000..c769897
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/clock.h
@@ -0,0 +1,70 @@
+
+/**
+ * CLKCTRL Generated Driver API Header File
+ *
+ * @file clkctrl.h
+ *
+ * @defgroup clkctrl CLKCTRL
+ *
+ * @brief This header file provides APIs for the CLKCTRL driver.
+ *
+ * @version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef CLOCK_H
+#define CLOCK_H
+
+#ifndef F_CPU
+#define F_CPU 4000000UL
+#endif
+
+#include "ccp.h"
+
+/**
+ * @ingroup clkctrl
+ * @brief Initializes the CLKCTRL module.
+ * @param None.
+ * @return None.
+ */
+void CLOCK_Initialize(void);
+
+/**
+ * @ingroup clkctrl
+ * @brief Enables the Clock Failure Detection on the main clock.
+ * @param CLKCTRL_CFDSRC_t cfd_source - main clock source for CFD
+ * @return None.
+ */
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source);
+
+/**
+ * @ingroup clkctrl
+ * @brief Disables the Clock Failure Detection on the main clock.
+ * @param None.
+ * @return None.
+ */
+void CFD_Disable(void);
+
+#endif // CLOCK_H
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/config_bits.h b/voltage-follower.X/mcc_generated_files/system/config_bits.h
new file mode 100644
index 0000000..4a4e1b6
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/config_bits.h
@@ -0,0 +1,44 @@
+/**
+ * CONFIGURATION BITS Generated Driver Header File
+ *
+ * @file config_bits.h
+ *
+ * @defgroup config_bitsdriver CONFIGBITS Driver
+ *
+ * @brief This file contains the API Prototypes for the Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef CONFIG_BITS_H
+#define CONFIG_BITS_H
+
+#include "../system/clock.h"
+
+#endif //CONFIG_BITS_H
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/interrupt.h b/voltage-follower.X/mcc_generated_files/system/interrupt.h
new file mode 100644
index 0000000..d2a9281
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/interrupt.h
@@ -0,0 +1,57 @@
+/**
+ * Interrupt Manager Generated Driver API Header File.
+ *
+ * @file interrupt.h
+ *
+ * @defgroup interrupt INTERRUPT
+ *
+ * @brief This file contains the API prototype for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef INTERRUPT_H
+#define INTERRUPT_H
+
+#include "../system/utils/compiler.h"
+#include "ccp.h"
+#include "../system/utils/atomic.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup interrupt
+ * @brief Initializes the Interrupt module.
+ * @retval 0 - Initialization is successful.
+ */
+int8_t CPUINT_Initialize();
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* INTERRUPT_H */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/pins.h b/voltage-follower.X/mcc_generated_files/system/pins.h
new file mode 100644
index 0000000..9ec439f
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/pins.h
@@ -0,0 +1,288 @@
+/**
+ * Generated Pins header File
+ *
+ * @file pins.h
+ *
+ * @defgroup pinsdriver Pins Driver
+ *
+ * @brief This is generated driver header for pins.
+ * This header file provides APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PINS_H_INCLUDED
+#define PINS_H_INCLUDED
+
+#include
+#include "./port.h"
+
+//get/set IO_PB0 aliases
+#define IO_PB0_SetHigh() do { PORTB_OUTSET = 0x1; } while(0)
+#define IO_PB0_SetLow() do { PORTB_OUTCLR = 0x1; } while(0)
+#define IO_PB0_Toggle() do { PORTB_OUTTGL = 0x1; } while(0)
+#define IO_PB0_GetValue() (VPORTB.IN & (0x1 << 0))
+#define IO_PB0_SetDigitalInput() do { PORTB_DIRCLR = 0x1; } while(0)
+#define IO_PB0_SetDigitalOutput() do { PORTB_DIRSET = 0x1; } while(0)
+#define IO_PB0_SetPullUp() do { PORTB_PIN0CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_ResetPullUp() do { PORTB_PIN0CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PB0_SetInverted() do { PORTB_PIN0CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PB0_ResetInverted() do { PORTB_PIN0CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PB0_DisableInterruptOnChange() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PB0_EnableInterruptForBothEdges() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PB0_EnableInterruptForRisingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PB0_EnableInterruptForFallingEdge() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PB0_DisableDigitalInputBuffer() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PB0_EnableInterruptForLowLevelSensing() do { PORTB.PIN0CTRL = (PORTB.PIN0CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB0_SetInterruptHandler IO_PB0_SetInterruptHandler
+
+//get/set IO_PD2 aliases
+#define IO_PD2_SetHigh() do { PORTD_OUTSET = 0x4; } while(0)
+#define IO_PD2_SetLow() do { PORTD_OUTCLR = 0x4; } while(0)
+#define IO_PD2_Toggle() do { PORTD_OUTTGL = 0x4; } while(0)
+#define IO_PD2_GetValue() (VPORTD.IN & (0x1 << 2))
+#define IO_PD2_SetDigitalInput() do { PORTD_DIRCLR = 0x4; } while(0)
+#define IO_PD2_SetDigitalOutput() do { PORTD_DIRSET = 0x4; } while(0)
+#define IO_PD2_SetPullUp() do { PORTD_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_ResetPullUp() do { PORTD_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD2_SetInverted() do { PORTD_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD2_ResetInverted() do { PORTD_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD2_DisableInterruptOnChange() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD2_EnableInterruptForBothEdges() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD2_EnableInterruptForRisingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD2_EnableInterruptForFallingEdge() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD2_DisableDigitalInputBuffer() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD2_EnableInterruptForLowLevelSensing() do { PORTD.PIN2CTRL = (PORTD.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD2_SetInterruptHandler IO_PD2_SetInterruptHandler
+
+//get/set IO_PD6 aliases
+#define IO_PD6_SetHigh() do { PORTD_OUTSET = 0x40; } while(0)
+#define IO_PD6_SetLow() do { PORTD_OUTCLR = 0x40; } while(0)
+#define IO_PD6_Toggle() do { PORTD_OUTTGL = 0x40; } while(0)
+#define IO_PD6_GetValue() (VPORTD.IN & (0x1 << 6))
+#define IO_PD6_SetDigitalInput() do { PORTD_DIRCLR = 0x40; } while(0)
+#define IO_PD6_SetDigitalOutput() do { PORTD_DIRSET = 0x40; } while(0)
+#define IO_PD6_SetPullUp() do { PORTD_PIN6CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_ResetPullUp() do { PORTD_PIN6CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PD6_SetInverted() do { PORTD_PIN6CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PD6_ResetInverted() do { PORTD_PIN6CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PD6_DisableInterruptOnChange() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PD6_EnableInterruptForBothEdges() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PD6_EnableInterruptForRisingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PD6_EnableInterruptForFallingEdge() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PD6_DisableDigitalInputBuffer() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PD6_EnableInterruptForLowLevelSensing() do { PORTD.PIN6CTRL = (PORTD.PIN6CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PD6_SetInterruptHandler IO_PD6_SetInterruptHandler
+
+//get/set IO_PA3 aliases
+#define IO_PA3_SetHigh() do { PORTA_OUTSET = 0x8; } while(0)
+#define IO_PA3_SetLow() do { PORTA_OUTCLR = 0x8; } while(0)
+#define IO_PA3_Toggle() do { PORTA_OUTTGL = 0x8; } while(0)
+#define IO_PA3_GetValue() (VPORTA.IN & (0x1 << 3))
+#define IO_PA3_SetDigitalInput() do { PORTA_DIRCLR = 0x8; } while(0)
+#define IO_PA3_SetDigitalOutput() do { PORTA_DIRSET = 0x8; } while(0)
+#define IO_PA3_SetPullUp() do { PORTA_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_ResetPullUp() do { PORTA_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA3_SetInverted() do { PORTA_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA3_ResetInverted() do { PORTA_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA3_DisableInterruptOnChange() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA3_EnableInterruptForBothEdges() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA3_EnableInterruptForRisingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA3_EnableInterruptForFallingEdge() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA3_DisableDigitalInputBuffer() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA3_EnableInterruptForLowLevelSensing() do { PORTA.PIN3CTRL = (PORTA.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA3_SetInterruptHandler IO_PA3_SetInterruptHandler
+
+//get/set IO_PA2 aliases
+#define IO_PA2_SetHigh() do { PORTA_OUTSET = 0x4; } while(0)
+#define IO_PA2_SetLow() do { PORTA_OUTCLR = 0x4; } while(0)
+#define IO_PA2_Toggle() do { PORTA_OUTTGL = 0x4; } while(0)
+#define IO_PA2_GetValue() (VPORTA.IN & (0x1 << 2))
+#define IO_PA2_SetDigitalInput() do { PORTA_DIRCLR = 0x4; } while(0)
+#define IO_PA2_SetDigitalOutput() do { PORTA_DIRSET = 0x4; } while(0)
+#define IO_PA2_SetPullUp() do { PORTA_PIN2CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_ResetPullUp() do { PORTA_PIN2CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define IO_PA2_SetInverted() do { PORTA_PIN2CTRL |= PORT_INVEN_bm; } while(0)
+#define IO_PA2_ResetInverted() do { PORTA_PIN2CTRL &= ~PORT_INVEN_bm; } while(0)
+#define IO_PA2_DisableInterruptOnChange() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define IO_PA2_EnableInterruptForBothEdges() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define IO_PA2_EnableInterruptForRisingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define IO_PA2_EnableInterruptForFallingEdge() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define IO_PA2_DisableDigitalInputBuffer() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define IO_PA2_EnableInterruptForLowLevelSensing() do { PORTA.PIN2CTRL = (PORTA.PIN2CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PA2_SetInterruptHandler IO_PA2_SetInterruptHandler
+
+//get/set LED0 aliases
+#define LED0_SetHigh() do { PORTB_OUTSET = 0x8; } while(0)
+#define LED0_SetLow() do { PORTB_OUTCLR = 0x8; } while(0)
+#define LED0_Toggle() do { PORTB_OUTTGL = 0x8; } while(0)
+#define LED0_GetValue() (VPORTB.IN & (0x1 << 3))
+#define LED0_SetDigitalInput() do { PORTB_DIRCLR = 0x8; } while(0)
+#define LED0_SetDigitalOutput() do { PORTB_DIRSET = 0x8; } while(0)
+#define LED0_SetPullUp() do { PORTB_PIN3CTRL |= PORT_PULLUPEN_bm; } while(0)
+#define LED0_ResetPullUp() do { PORTB_PIN3CTRL &= ~PORT_PULLUPEN_bm; } while(0)
+#define LED0_SetInverted() do { PORTB_PIN3CTRL |= PORT_INVEN_bm; } while(0)
+#define LED0_ResetInverted() do { PORTB_PIN3CTRL &= ~PORT_INVEN_bm; } while(0)
+#define LED0_DisableInterruptOnChange() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x0 ; } while(0)
+#define LED0_EnableInterruptForBothEdges() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x1 ; } while(0)
+#define LED0_EnableInterruptForRisingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x2 ; } while(0)
+#define LED0_EnableInterruptForFallingEdge() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x3 ; } while(0)
+#define LED0_DisableDigitalInputBuffer() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x4 ; } while(0)
+#define LED0_EnableInterruptForLowLevelSensing() do { PORTB.PIN3CTRL = (PORTB.PIN3CTRL & ~PORT_ISC_gm) | 0x5 ; } while(0)
+#define PB3_SetInterruptHandler LED0_SetInterruptHandler
+
+/**
+ * @ingroup pinsdriver
+ * @brief GPIO and peripheral I/O initialization
+ * @param none
+ * @return none
+ */
+void PIN_MANAGER_Initialize();
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PB0 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PB0_SetInterruptHandler() method.
+ * This handler is called every time the IO_PB0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PB0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PB0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PB0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PD6 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PD6_SetInterruptHandler() method.
+ * This handler is called every time the IO_PD6 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PD6_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PD6 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PD6 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA3 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA3_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA3 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA3_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA3 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA3 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for IO_PA2 pin.
+ * This is a predefined interrupt handler to be used together with the IO_PA2_SetInterruptHandler() method.
+ * This handler is called every time the IO_PA2 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void IO_PA2_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for IO_PA2 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for IO_PA2 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void)) ;
+
+/**
+ * @ingroup pinsdriver
+ * @brief Default Interrupt Handler for LED0 pin.
+ * This is a predefined interrupt handler to be used together with the LED0_SetInterruptHandler() method.
+ * This handler is called every time the LED0 ISR is executed.
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param none
+ * @return none
+ */
+void LED0_DefaultInterruptHandler(void);
+
+/**
+ * @ingroup pinsdriver
+ * @brief Interrupt Handler Setter for LED0 pin input-sense-config functionality.
+ * Allows selecting an interrupt handler for LED0 at application runtime
+ * @pre PIN_MANAGER_Initialize() has been called at least once
+ * @param InterruptHandler function pointer.
+ * @return none
+ */
+void LED0_SetInterruptHandler(void (* interruptHandler)(void)) ;
+#endif /* PINS_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/system/port.h b/voltage-follower.X/mcc_generated_files/system/port.h
new file mode 100644
index 0000000..0272de1
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/port.h
@@ -0,0 +1,1320 @@
+/**
+ * Generated Ports header File
+ *
+ * @file port.h
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This Source file provides APIs.
+ *
+ * @version Driver Version 1.0.1
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef PORT_INCLUDED
+#define PORT_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "utils/compiler.h"
+
+/* @ingroup pinsdriver
+ * @enum port_pull_mode
+ * Defines the pullup modes.
+ */
+enum port_pull_mode {
+ PORT_PULL_OFF,
+ PORT_PULL_UP,
+};
+
+/* @ingroup pinsdriver
+ * @enum port_dir
+ * Defines the port directions.
+ */
+enum port_dir {
+ PORT_DIR_IN,
+ PORT_DIR_OUT,
+ PORT_DIR_OFF,
+};
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTA_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTA_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTA_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTA + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTA + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTA_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTA.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTA.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTA + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTA_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= mask;
+ } else {
+ VPORTA.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTA_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTA.OUT |= (1 << pin);
+ } else {
+ VPORTA.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTA_toggle_port_level(const uint8_t mask)
+{
+ PORTA.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTA_toggle_pin_level(const uint8_t pin)
+{
+ PORTA.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTA_get_port_level()
+{
+ return VPORTA.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTA_get_pin_level(const uint8_t pin)
+{
+ return VPORTA.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTA_write_port(const uint8_t value)
+{
+ VPORTA.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTB_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTB_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTB_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTB + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTB + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTB_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTB.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTB.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTB + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTB_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= mask;
+ } else {
+ VPORTB.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTB_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTB.OUT |= (1 << pin);
+ } else {
+ VPORTB.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTB_toggle_port_level(const uint8_t mask)
+{
+ PORTB.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTB_toggle_pin_level(const uint8_t pin)
+{
+ PORTB.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTB_get_port_level()
+{
+ return VPORTB.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTB_get_pin_level(const uint8_t pin)
+{
+ return VPORTB.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTB_write_port(const uint8_t value)
+{
+ VPORTB.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTC_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTC_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTC_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTC + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTC + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTC_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTC.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTC.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTC + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTC_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= mask;
+ } else {
+ VPORTC.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTC_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTC.OUT |= (1 << pin);
+ } else {
+ VPORTC.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTC_toggle_port_level(const uint8_t mask)
+{
+ PORTC.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTC_toggle_pin_level(const uint8_t pin)
+{
+ PORTC.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTC_get_port_level()
+{
+ return VPORTC.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTC_get_pin_level(const uint8_t pin)
+{
+ return VPORTC.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTC_write_port(const uint8_t value)
+{
+ VPORTC.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTD_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTD_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTD_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTD + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTD + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTD_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTD.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTD.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTD + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTD_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= mask;
+ } else {
+ VPORTD.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTD_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTD.OUT |= (1 << pin);
+ } else {
+ VPORTD.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTD_toggle_port_level(const uint8_t mask)
+{
+ PORTD.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTD_toggle_pin_level(const uint8_t pin)
+{
+ PORTD.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTD_get_port_level()
+{
+ return VPORTD.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTD_get_pin_level(const uint8_t pin)
+{
+ return VPORTD.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTD_write_port(const uint8_t value)
+{
+ VPORTD.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTE_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTE_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTE_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTE + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTE + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTE_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTE.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTE.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTE + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTE_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= mask;
+ } else {
+ VPORTE.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTE_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTE.OUT |= (1 << pin);
+ } else {
+ VPORTE.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTE_toggle_port_level(const uint8_t mask)
+{
+ PORTE.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTE_toggle_pin_level(const uint8_t pin)
+{
+ PORTE.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTE_get_port_level()
+{
+ return VPORTE.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTE_get_pin_level(const uint8_t pin)
+{
+ return VPORTE.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTE_write_port(const uint8_t value)
+{
+ VPORTE.OUT = value;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin pull mode, Configure pin to pull up, down or disable pull mode, supported pull modes are defined by device used.
+ * @param pin The pin number within port
+ * @param pull_mode Pin pull mode
+ * @return none
+ */
+static inline void PORTF_set_pin_pull_mode(const uint8_t pin, const enum port_pull_mode pull_mode)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (pull_mode == PORT_PULL_UP) {
+ *port_pin_ctrl |= PORT_PULLUPEN_bm;
+ } else if (pull_mode == PORT_PULL_OFF) {
+ *port_pin_ctrl &= ~PORT_PULLUPEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin inverted mode, Configure pin invert I/O or not.
+ * @param pin The pin number within port
+ * @param inverted Pin inverted mode
+ * @return none
+ */
+static inline void PORTF_pin_set_inverted(const uint8_t pin, const bool inverted)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ if (inverted) {
+ *port_pin_ctrl |= PORT_INVEN_bm;
+ } else {
+ *port_pin_ctrl &= ~PORT_INVEN_bm;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin input/sense configuration, Enable/disable digital input buffer and pin change interrupt,
+ * select pin interrupt edge/level sensing mode
+ * @param The pin number within port
+ * @param isc PORT_ISC_t
+ * @return none
+ */
+static inline void PORTF_pin_set_isc(const uint8_t pin, const PORT_ISC_t isc)
+{
+ volatile uint8_t *port_pin_ctrl = ((uint8_t *)&PORTF + 0x10 + pin);
+
+ *port_pin_ctrl = (*port_pin_ctrl & ~PORT_ISC_gm) | isc;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param mask Bit mask where 1 means apply direction setting to the
+ * corresponding pin
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_port_dir(const uint8_t mask, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~mask;
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= mask;
+ break;
+ case PORT_DIR_OFF:
+ /*/ should activate the pullup for power saving
+ but a bit costly to do it here */
+ {
+ for (uint8_t i = 0; i < 8; i++) {
+ if (mask & 1 << i) {
+ *((uint8_t *)&PORTF + 0x10 + i) |= 1 << PORT_PULLUPEN_bp;
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port pin data direction, Select if the pin data direction is input, output or disabled.
+ * If disabled state is not possible, this function throws an assert.
+ *
+ * @param pin The pin number within port
+ * @param dir port_dir
+ * @return none
+ */
+static inline void PORTF_set_pin_dir(const uint8_t pin, const enum port_dir dir)
+{
+ switch (dir) {
+ case PORT_DIR_IN:
+ VPORTF.DIR &= ~(1 << pin);
+ break;
+ case PORT_DIR_OUT:
+ VPORTF.DIR |= (1 << pin);
+ break;
+ case PORT_DIR_OFF:
+ *((uint8_t *)&PORTF + 0x10 + pin) |= 1 << PORT_PULLUPEN_bp;
+ break;
+ default:
+ break;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on the pins defined by the bit mask.
+ *
+ * @param mask Bit mask where 1 means apply port level to the corresponding
+ * pin
+ * @param level -boolean value that defines the logic state of the pin level
+ * false = Pin levels set to "low" state
+ * @return none
+ */
+static inline void PORTF_set_port_level(const uint8_t mask, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= mask;
+ } else {
+ VPORTF.OUT &= ~mask;
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Set port level, Sets output level on a pin.
+ *
+ * @param pin The pin number within port
+ * @param level -boolean value that defines the logic state of the pin level
+ * @return none
+ */
+static inline void PORTF_set_pin_level(const uint8_t pin, const bool level)
+{
+ if (level == true) {
+ VPORTF.OUT |= (1 << pin);
+ } else {
+ VPORTF.OUT &= ~(1 << pin);
+ }
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle out level on pins, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param mask Bit mask where 1 means toggle pin level to the corresponding
+ * pin
+ * @return none
+ */
+static inline void PORTF_toggle_port_level(const uint8_t mask)
+{
+ PORTF.OUTTGL = mask;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Toggle output level on pin, Toggle the pin levels on pins defined by bit mask.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline void PORTF_toggle_pin_level(const uint8_t pin)
+{
+ PORTF.OUTTGL = 1 << pin;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get input level on pins, Read the input level on pins connected to a port.
+ *
+ * @param none
+ * @return none
+ */
+static inline uint8_t PORTF_get_port_level()
+{
+ return VPORTF.IN;
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Get level on pin, Reads the level on pins connected to a port.
+ *
+ * @param pin The pin number within port
+ * @return none
+ */
+static inline bool PORTF_get_pin_level(const uint8_t pin)
+{
+ return VPORTF.IN & (1 << pin);
+}
+
+/**
+ * @ingroup pinsdriver
+ * @brief Write value to Port, Write directly to the port OUT register.
+ *
+ * @param value Value to write to the port register
+ * @return none
+ */
+static inline void PORTF_write_port(const uint8_t value)
+{
+ VPORTF.OUT = value;
+}
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* PORT_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/protected_io.h b/voltage-follower.X/mcc_generated_files/system/protected_io.h
new file mode 100644
index 0000000..74e1fb5
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/protected_io.h
@@ -0,0 +1,80 @@
+/**
+ * protected_io Header File
+ *
+ * @file protected_io.h
+ *
+ * @defgroup doc_driver_system_protected_io Protected IO
+ *
+ * @brief This file contains the generated prtected_io header file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
+ *
+ *@{
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef PROTECTED_IO_H
+#define PROTECTED_IO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined(__DOXYGEN__)
+//! \name IAR Memory Model defines.
+//@{
+
+/**
+ * @def CONFIG_MEMORY_MODEL_TINY
+ * @brief Configuration symbol to enable 8 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_TINY
+
+/**
+ * @def CONFIG_MEMORY_MODEL_SMALL
+ * @brief Configuration symbol to enable 16 bit pointers.
+ * NOTE: If no memory model is defined, SMALL is default.
+ */
+#define CONFIG_MEMORY_MODEL_SMALL
+
+/**
+ * @def CONFIG_MEMORY_MODEL_LARGE
+ * @brief Configuration symbol to enable 24 bit pointers.
+ */
+#define CONFIG_MEMORY_MODEL_LARGE
+
+//@}
+#endif
+
+/**
+ * @brief Writes to an 8-bit I/O register protected by CCP or a protection bit.
+ * @param addr Address of the I/O register.
+ * @param magic CCP magic value or Mask for protection bit.
+ * @param value Value to be written.
+ * NOTE: Using IAR Embedded workbench, the choice of memory model has an impact on calling convention.
+ * Memory model must be defined in the Assembler preprocessor directives to be visible to the preprocessor.
+ */
+extern void protected_write_io(void *addr, uint8_t magic, uint8_t value);
+
+/** @} */
+
+#endif /* PROTECTED_IO_H */
diff --git a/voltage-follower.X/mcc_generated_files/system/src/clock.c b/voltage-follower.X/mcc_generated_files/system/src/clock.c
new file mode 100644
index 0000000..f0a30a7
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/src/clock.c
@@ -0,0 +1,104 @@
+
+
+/**
+ * CLKCTRL Generated Driver File
+ *
+ * @file clkctrl.c
+ *
+ * @ingroup clkctrl
+ *
+ * @brief This file contains the driver code for CLKCTRL module.
+ *
+ * version CLKCTRL Driver Version 1.1.4
+ *
+ * @version Package Version 2.0.10
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../clock.h"
+
+void CLOCK_Initialize(void)
+{
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLA),(0 << CLKCTRL_CLKOUT_bp) // CLKOUT disabled
+ | CLKCTRL_CLKSEL_OSCHF_gc // CLKSEL Internal high-frequency oscillator
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLB),CLKCTRL_PDIV_6X_gc // PDIV 6X
+ | (0 << CLKCTRL_PEN_bp) // PEN disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSC32KCTRLA),(0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFCTRLA),(0 << CLKCTRL_AUTOTUNE_bp) // AUTOTUNE disabled
+ | CLKCTRL_FRQSEL_4M_gc // FRQSEL 4 MHz system clock (default)
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.OSCHFTUNE),0x0 // TUNE 0x0
+ );
+ ccp_write_io((void*)&(CLKCTRL.PLLCTRLA),CLKCTRL_MULFAC_DISABLE_gc // MULFAC PLL is disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | CLKCTRL_SOURCE_OSCHF_gc // SOURCE OSCHF
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSC32KCTRLA),CLKCTRL_CSUT_1K_gc // CSUT 1k cycles
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | (0 << CLKCTRL_LPMODE_bp) // LPMODE disabled
+ | (0 << CLKCTRL_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << CLKCTRL_SEL_bp) // SEL disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKCTRLC),(0 << CLKCTRL_CFDEN_bp) // CFDEN disabled
+ | CLKCTRL_CFDSRC_CLKMAIN_gc // CFDSRC CLKMAIN
+ | (0 << CLKCTRL_CFDTST_bp) // CFDTST disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTCTRL),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ | CLKCTRL_INTTYPE_INT_gc // INTTYPE INT
+ );
+ ccp_write_io((void*)&(CLKCTRL.MCLKINTFLAGS),(0 << CLKCTRL_CFD_bp) // CFD disabled
+ );
+ ccp_write_io((void*)&(CLKCTRL.XOSCHFCTRLA),CLKCTRL_CSUTHF_256_gc // CSUTHF 256
+ | (0 << CLKCTRL_ENABLE_bp) // ENABLE disabled
+ | CLKCTRL_FRQRANGE_8M_gc // FRQRANGE 8M
+ | (0 << CLKCTRL_RUNSTBY_bp) // RUNSTBY disabled
+ | CLKCTRL_SELHF_XTAL_gc // SELHF XTAL
+ );
+
+ // System clock stability check by polling the status register.
+ while(!(CLKCTRL.MCLKSTATUS & CLKCTRL_OSCHFS_bm))
+ {
+ }
+
+}
+
+void CFD_Enable(CLKCTRL_CFDSRC_t cfd_source)
+{
+ /* Enable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, cfd_source | CLKCTRL_CFDEN_bm);
+}
+
+void CFD_Disable(void)
+{
+ /* Disable Clock Failure Detection on main clock */
+ ccp_write_io((uint8_t *) & CLKCTRL.MCLKCTRLC, CLKCTRL.MCLKCTRLC & ~CLKCTRL_CFDEN_bm);
+}
+
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/src/config_bits.c b/voltage-follower.X/mcc_generated_files/system/src/config_bits.c
new file mode 100644
index 0000000..f785fe7
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/src/config_bits.c
@@ -0,0 +1,49 @@
+/**
+ * CONFIGURATION BITS Generated Driver Source File
+ *
+ * @file config_bits.c
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the API implementation for the Device Configuration Bits driver.
+ *
+ * @version Driver Version 1.0.5
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include
+
+/**
+ * Configures the Fuse bits.
+ */
+FUSES =
+{
+ .BODCFG = ACTIVE_DISABLE_gc | LVL_BODLEVEL0_gc | SAMPFREQ_128Hz_gc | SLEEP_DISABLE_gc,
+ .BOOTSIZE = 0x0,
+ .CODESIZE = 0x0,
+ .OSCCFG = CLKSEL_OSCHF_gc,
+ .SYSCFG0 = CRCSEL_CRC16_gc | CRCSRC_NOCRC_gc | RSTPINCFG_GPIO_gc,
+ .SYSCFG1 = MVSYSCFG_DUAL_gc | SUT_0MS_gc,
+ .WDTCFG = PERIOD_OFF_gc | WINDOW_OFF_gc,
+};
diff --git a/voltage-follower.X/mcc_generated_files/system/src/interrupt.c b/voltage-follower.X/mcc_generated_files/system/src/interrupt.c
new file mode 100644
index 0000000..f5169f3
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/src/interrupt.c
@@ -0,0 +1,53 @@
+/**
+ * Interrupt Manager Generated Driver File.
+ *
+ * @file interrupt.c
+ *
+ * @ingroup interrupt
+ *
+ * @brief This file contains the API implementation for the Interrupt Manager.
+ *
+ * @version Interrupt Manager Driver Version 1.0.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../interrupt.h"
+
+int8_t CPUINT_Initialize()
+{
+ /* IVSEL and CVT are Configuration Change Protected */
+
+ //CVT disabled; IVSEL disabled; LVL0RR disabled;
+ ccp_write_io((void*)&(CPUINT.CTRLA),0x0);
+
+ //LVL0PRI 0;
+ CPUINT.LVL0PRI = 0x0;
+
+ //LVL1VEC 0;
+ CPUINT.LVL1VEC = 0x0;
+
+ ENABLE_INTERRUPTS();
+
+ return 0;
+}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/src/pins.c b/voltage-follower.X/mcc_generated_files/system/src/pins.c
new file mode 100644
index 0000000..058873d
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/src/pins.c
@@ -0,0 +1,278 @@
+/**
+ * Generated Driver File
+ *
+ * @file pins.c
+ *
+ * @ingroup pinsdriver
+ *
+ * @brief This is generated driver implementation for pins.
+ * This file provides implementations for pin APIs for all pins selected in the GUI.
+ *
+ * @version Driver Version 1.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../pins.h"
+
+static void (*IO_PB0_InterruptHandler)(void);
+static void (*IO_PD2_InterruptHandler)(void);
+static void (*IO_PD6_InterruptHandler)(void);
+static void (*IO_PA3_InterruptHandler)(void);
+static void (*IO_PA2_InterruptHandler)(void);
+static void (*LED0_InterruptHandler)(void);
+
+void PIN_MANAGER_Initialize()
+{
+
+ /* OUT Registers Initialization */
+ PORTA.OUT = 0x0;
+ PORTB.OUT = 0x1;
+ PORTC.OUT = 0x0;
+ PORTD.OUT = 0x0;
+ PORTE.OUT = 0x0;
+ PORTF.OUT = 0x0;
+
+ /* DIR Registers Initialization */
+ PORTA.DIR = 0xC;
+ PORTB.DIR = 0x9;
+ PORTC.DIR = 0x0;
+ PORTD.DIR = 0x40;
+ PORTE.DIR = 0x0;
+ PORTF.DIR = 0x0;
+
+ /* PINxCTRL registers Initialization */
+ PORTA.PIN0CTRL = 0x0;
+ PORTA.PIN1CTRL = 0x0;
+ PORTA.PIN2CTRL = 0x0;
+ PORTA.PIN3CTRL = 0x0;
+ PORTA.PIN4CTRL = 0x0;
+ PORTA.PIN5CTRL = 0x0;
+ PORTA.PIN6CTRL = 0x0;
+ PORTA.PIN7CTRL = 0x0;
+ PORTB.PIN0CTRL = 0x0;
+ PORTB.PIN1CTRL = 0x0;
+ PORTB.PIN2CTRL = 0x0;
+ PORTB.PIN3CTRL = 0x0;
+ PORTB.PIN4CTRL = 0x0;
+ PORTB.PIN5CTRL = 0x0;
+ PORTB.PIN6CTRL = 0x0;
+ PORTB.PIN7CTRL = 0x0;
+ PORTC.PIN0CTRL = 0x0;
+ PORTC.PIN1CTRL = 0x0;
+ PORTC.PIN2CTRL = 0x0;
+ PORTC.PIN3CTRL = 0x0;
+ PORTC.PIN4CTRL = 0x0;
+ PORTC.PIN5CTRL = 0x0;
+ PORTC.PIN6CTRL = 0x0;
+ PORTC.PIN7CTRL = 0x0;
+ PORTD.PIN0CTRL = 0x0;
+ PORTD.PIN1CTRL = 0x0;
+ PORTD.PIN2CTRL = 0x4;
+ PORTD.PIN3CTRL = 0x0;
+ PORTD.PIN4CTRL = 0x0;
+ PORTD.PIN5CTRL = 0x0;
+ PORTD.PIN6CTRL = 0x0;
+ PORTD.PIN7CTRL = 0x0;
+ PORTE.PIN0CTRL = 0x0;
+ PORTE.PIN1CTRL = 0x0;
+ PORTE.PIN2CTRL = 0x0;
+ PORTE.PIN3CTRL = 0x0;
+ PORTE.PIN4CTRL = 0x0;
+ PORTE.PIN5CTRL = 0x0;
+ PORTE.PIN6CTRL = 0x0;
+ PORTE.PIN7CTRL = 0x0;
+ PORTF.PIN0CTRL = 0x0;
+ PORTF.PIN1CTRL = 0x0;
+ PORTF.PIN2CTRL = 0x0;
+ PORTF.PIN3CTRL = 0x0;
+ PORTF.PIN4CTRL = 0x0;
+ PORTF.PIN5CTRL = 0x0;
+ PORTF.PIN6CTRL = 0x0;
+ PORTF.PIN7CTRL = 0x0;
+
+ /* PORTMUX Initialization */
+ PORTMUX.ACROUTEA = 0x0;
+ PORTMUX.CCLROUTEA = 0x0;
+ PORTMUX.EVSYSROUTEA = 0x0;
+ PORTMUX.SPIROUTEA = 0x0;
+ PORTMUX.TCAROUTEA = 0x0;
+ PORTMUX.TCBROUTEA = 0x0;
+ PORTMUX.TCDROUTEA = 0x0;
+ PORTMUX.TWIROUTEA = 0x0;
+ PORTMUX.USARTROUTEA = 0x0;
+ PORTMUX.USARTROUTEB = 0x0;
+ PORTMUX.ZCDROUTEA = 0x0;
+
+ // register default ISC callback functions at runtime; use these methods to register a custom function
+ IO_PB0_SetInterruptHandler(IO_PB0_DefaultInterruptHandler);
+ IO_PD2_SetInterruptHandler(IO_PD2_DefaultInterruptHandler);
+ IO_PD6_SetInterruptHandler(IO_PD6_DefaultInterruptHandler);
+ IO_PA3_SetInterruptHandler(IO_PA3_DefaultInterruptHandler);
+ IO_PA2_SetInterruptHandler(IO_PA2_DefaultInterruptHandler);
+ LED0_SetInterruptHandler(LED0_DefaultInterruptHandler);
+}
+
+/**
+ Allows selecting an interrupt handler for IO_PB0 at application runtime
+*/
+void IO_PB0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PB0_InterruptHandler = interruptHandler;
+}
+
+void IO_PB0_DefaultInterruptHandler(void)
+{
+ // add your IO_PB0 interrupt custom code
+ // or set custom function using IO_PB0_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD2 at application runtime
+*/
+void IO_PD2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD2_InterruptHandler = interruptHandler;
+}
+
+void IO_PD2_DefaultInterruptHandler(void)
+{
+ // add your IO_PD2 interrupt custom code
+ // or set custom function using IO_PD2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PD6 at application runtime
+*/
+void IO_PD6_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PD6_InterruptHandler = interruptHandler;
+}
+
+void IO_PD6_DefaultInterruptHandler(void)
+{
+ // add your IO_PD6 interrupt custom code
+ // or set custom function using IO_PD6_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA3 at application runtime
+*/
+void IO_PA3_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA3_InterruptHandler = interruptHandler;
+}
+
+void IO_PA3_DefaultInterruptHandler(void)
+{
+ // add your IO_PA3 interrupt custom code
+ // or set custom function using IO_PA3_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for IO_PA2 at application runtime
+*/
+void IO_PA2_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ IO_PA2_InterruptHandler = interruptHandler;
+}
+
+void IO_PA2_DefaultInterruptHandler(void)
+{
+ // add your IO_PA2 interrupt custom code
+ // or set custom function using IO_PA2_SetInterruptHandler()
+}
+/**
+ Allows selecting an interrupt handler for LED0 at application runtime
+*/
+void LED0_SetInterruptHandler(void (* interruptHandler)(void))
+{
+ LED0_InterruptHandler = interruptHandler;
+}
+
+void LED0_DefaultInterruptHandler(void)
+{
+ // add your LED0 interrupt custom code
+ // or set custom function using LED0_SetInterruptHandler()
+}
+ISR(PORTA_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTA.INTFLAGS & PORT_INT3_bm)
+ {
+ IO_PA3_InterruptHandler();
+ }
+ if(VPORTA.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PA2_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTA.INTFLAGS = 0xff;
+}
+
+ISR(PORTB_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTB.INTFLAGS & PORT_INT0_bm)
+ {
+ IO_PB0_InterruptHandler();
+ }
+ if(VPORTB.INTFLAGS & PORT_INT3_bm)
+ {
+ LED0_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTB.INTFLAGS = 0xff;
+}
+
+ISR(PORTC_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTC.INTFLAGS = 0xff;
+}
+
+ISR(PORTD_PORT_vect)
+{
+ // Call the interrupt handler for the callback registered at runtime
+ if(VPORTD.INTFLAGS & PORT_INT2_bm)
+ {
+ IO_PD2_InterruptHandler();
+ }
+ if(VPORTD.INTFLAGS & PORT_INT6_bm)
+ {
+ IO_PD6_InterruptHandler();
+ }
+ /* Clear interrupt flags */
+ VPORTD.INTFLAGS = 0xff;
+}
+
+ISR(PORTE_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTE.INTFLAGS = 0xff;
+}
+
+ISR(PORTF_PORT_vect)
+{
+ /* Clear interrupt flags */
+ VPORTF.INTFLAGS = 0xff;
+}
+
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/differential-amplifier.X/mcc_generated_files/src/protected_io.S b/voltage-follower.X/mcc_generated_files/system/src/protected_io.S
similarity index 62%
rename from differential-amplifier.X/mcc_generated_files/src/protected_io.S
rename to voltage-follower.X/mcc_generated_files/system/src/protected_io.S
index b93dd68..6aaf66e 100644
--- a/differential-amplifier.X/mcc_generated_files/src/protected_io.S
+++ b/voltage-follower.X/mcc_generated_files/system/src/protected_io.S
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * protected_io Source Code File
+ *
+ * @file protected_io.S
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated protected_io source code file for the CONFIGURATION BITS.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/voltage-follower.X/mcc_generated_files/system/src/system.c b/voltage-follower.X/mcc_generated_files/system/src/system.c
new file mode 100644
index 0000000..ffdd246
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/src/system.c
@@ -0,0 +1,52 @@
+/**
+ * System Driver Source File
+ *
+ * @file system.c
+ *
+ * @ingroup systemdriver
+ *
+ * @brief This file contains the API implementation for the System driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../system.h"
+
+void SYSTEM_Initialize(void)
+{
+ CLOCK_Initialize();
+ PIN_MANAGER_Initialize();
+ TCB0_Initialize();
+ TCB1_Initialize();
+ ADC0_Initialize();
+ DAC0_Initialize();
+ DataStreamer_Initialize();
+ OPAMP_Initialize();
+ RTC_Initialize();
+ USART3_Initialize();
+ VREF_Initialize();
+ CPUINT_Initialize();
+}
+
diff --git a/voltage-follower.X/mcc_generated_files/system/system.h b/voltage-follower.X/mcc_generated_files/system/system.h
new file mode 100644
index 0000000..dba0220
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/system.h
@@ -0,0 +1,71 @@
+/**
+ * System Driver Header File
+ *
+ * @file system.h
+ *
+ * @defgroup systemdriver System Driver
+ *
+ * @brief This file contains the API prototype for the System Driver.
+ *
+ * @version Driver Version 1.0.2
+ *
+ * @version Package Version 4.2.14
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef MCC_H
+#define MCC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../system/utils/compiler.h"
+#include "config_bits.h"
+#include "../system/pins.h"
+#include "../adc/adc0.h"
+#include "../dac/dac0.h"
+#include "../data_streamer/data_streamer.h"
+#include "../opamp/opamp.h"
+#include "../timer/rtc.h"
+#include "../uart/usart3.h"
+#include "../vref/vref.h"
+#include "../system/interrupt.h"
+#include "../system/clock.h"
+#include "../timer/tcb0.h"
+#include "../timer/tcb1.h"
+/**
+ * @ingroup systemdriver
+ * @brief Initializes the System module. This routine is called only once during system initialization, before calling any other API.
+ * @param None.
+ * @return None.
+*/
+void SYSTEM_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* MCC_H */
+/**
+ End of File
+*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/assembler.h b/voltage-follower.X/mcc_generated_files/system/utils/assembler.h
new file mode 100644
index 0000000..0c6484a
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/assembler.h
@@ -0,0 +1,49 @@
+/**
+ * Assembler Header File
+ *
+ * @file assembler.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the assembler header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ASSEMBLER_H_INCLUDED
+#define ASSEMBLER_H_INCLUDED
+
+#if !defined(__ASSEMBLER__) && !defined(__IAR_SYSTEMS_ASM__) && !defined(__DOXYGEN__)
+#error This file may only be included from assembly files
+#endif
+
+#if defined(__ASSEMBLER__)
+#include "assembler/gas.h"
+#include
+#elif defined(__IAR_SYSTEMS_ASM__)
+#include "assembler/iar.h"
+#include
+#endif
+
+#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/instrumentation-amplifier.X/mcc_generated_files/utils/assembler/gas.h b/voltage-follower.X/mcc_generated_files/system/utils/assembler/gas.h
similarity index 67%
rename from instrumentation-amplifier.X/mcc_generated_files/utils/assembler/gas.h
rename to voltage-follower.X/mcc_generated_files/system/utils/assembler/gas.h
index a164306..871a60a 100644
--- a/instrumentation-amplifier.X/mcc_generated_files/utils/assembler/gas.h
+++ b/voltage-follower.X/mcc_generated_files/system/utils/assembler/gas.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * GAS Header File
+ *
+ * @file gas.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated GAS header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
@@ -50,7 +50,11 @@
.if \is_public
.global \name
.endif
+ #ifdef __XC8
+ .section .text.\name, code
+ #else
.section .text.\name, "ax", @progbits
+ #endif
.type \name, @function
\name :
.endm
diff --git a/differential-amplifier.X/mcc_generated_files/utils/assembler/iar.h b/voltage-follower.X/mcc_generated_files/system/utils/assembler/iar.h
similarity index 61%
rename from differential-amplifier.X/mcc_generated_files/utils/assembler/iar.h
rename to voltage-follower.X/mcc_generated_files/system/utils/assembler/iar.h
index 69650d6..c52425f 100644
--- a/differential-amplifier.X/mcc_generated_files/utils/assembler/iar.h
+++ b/voltage-follower.X/mcc_generated_files/system/utils/assembler/iar.h
@@ -1,33 +1,33 @@
/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
+ * IAR Header File
+ *
+ * @file iar.h
+ *
+ * @ingroup config_bitsdriver
+ *
+ * @brief This file contains the generated IAR header file for the Configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
*/
/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
*/
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/atomic.h b/voltage-follower.X/mcc_generated_files/system/utils/atomic.h
new file mode 100644
index 0000000..2f71dc3
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/atomic.h
@@ -0,0 +1,87 @@
+/**
+ * CONFIGURATION BITS Generated Atomic Header File
+ *
+ * @file atomic.h
+ *
+ * @defgroup doc_driver_utils_atomic Atomic memory access and critical sections
+ *
+ * @brief This file contains the atomic memory access and critical sections header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef ATOMIC_H
+#define ATOMIC_H
+
+/* clang-format off */
+
+#if defined(__GNUC__) || defined (__DOXYGEN__)
+
+/**
+ * @brief Enters critical region. Saves the contents of the status register, including the Global Interrupt Enable bit, so that it can be restored upon leaving the critical region.
+ * Thereafter, clears the Global Interrupt Enable Bit.This macro takes a parameter P that is unused for the GCC compiler,but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler declares a variable with the name of the parameter forholding the SREG value.
+ * Compilation will fail when the variable declared in the macro is not unique within the scope that the critical region is declared within.
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG.
+ */
+
+#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "in __tmp_reg__, __SREG__" "\n\t" \
+ "cli" "\n\t" \
+ "push __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+/**
+ * @brief Exits a critical region. Restores the contents of the status register, including the Global Interrupt Enable bit, as it was when entering the critical region.
+ * This macro takes a parameter P that is unused for the GCC compiler, but necessary for code compatibility with the IAR compiler.
+ * The IAR compiler uses this parameter as the name of a variable that holds the SREG value.
+ * The parameter must be identical to the parameter used in the corresponding ENTER_CRITICAL().
+ * @param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
+ */
+
+#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
+ "pop __tmp_reg__" "\n\t" \
+ "out __SREG__, __tmp_reg__" "\n\t" \
+ ::: "memory" \
+ )
+
+#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
+#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
+
+#elif defined(__ICCAVR__)
+
+#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
+#define EXIT_CRITICAL(P) __restore_interrupt(P);
+
+#define DISABLE_INTERRUPTS() __disable_interrupt();
+#define ENABLE_INTERRUPTS() __enable_interrupt();
+
+#else
+# error Unsupported compiler.
+#endif
+
+/* clang-format on */
+
+#endif /* ATOMIC_H */
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/compiler.h b/voltage-follower.X/mcc_generated_files/system/utils/compiler.h
new file mode 100644
index 0000000..682900b
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/compiler.h
@@ -0,0 +1,72 @@
+/**
+ * Compiler Header File
+ *
+ * @file compiler.h
+ *
+ * @defgroup doc_driver_utils_compiler Compiler abstraction
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for 8-bit AVR. This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef UTILS_COMPILER_H
+#define UTILS_COMPILER_H
+
+#if defined(__GNUC__)
+#include
+#include
+#if defined(__XC8__)
+#include
+#endif
+#elif defined(__ICCAVR__)
+#define ENABLE_BIT_DEFINITIONS 1
+#include
+#include
+
+#ifndef CCP_IOREG_gc
+#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
+#endif
+#ifndef CCP_SPM_gc
+#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
+#endif
+
+#else
+#error Unsupported compiler.
+#endif
+
+#include
+#include
+#include
+#include
+
+#include "interrupt_avr8.h"
+
+/**
+ * @def UNUSED
+ * @brief Marking \a v as a unused parameter or value.
+ */
+#define UNUSED(v) (void)(v)
+
+#endif /* UTILS_COMPILER_H */
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/interrupt_avr8.h b/voltage-follower.X/mcc_generated_files/system/utils/interrupt_avr8.h
new file mode 100644
index 0000000..99068db
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/interrupt_avr8.h
@@ -0,0 +1,88 @@
+/**
+ * interrupt_avr8 Header File
+ *
+ * @file interrupt_avr8.h
+ *
+ * @defgroup doc_driver_utils_interrupts ISR abstraction
+ *
+ * @brief Interrupt-related functionality.
+ *
+ * @version Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_INTERRUPT_AVR8_H
+#define UTILS_INTERRUPT_AVR8_H
+
+/**
+ * \weakgroup interrupt_group
+ *
+ * @{
+ */
+
+#ifdef ISR_CUSTOM_H
+#include ISR_CUSTOM_H
+#else
+
+/**
+ * @def ISR
+ * @brief Define service routine for specified interrupt vector.
+ * @code
+ ISR(FOO_vect)
+ {
+ ...
+ }
+ * @endcode
+ *
+ * @param vect Interrupt vector name as found in the device header files.
+ */
+#if defined(__DOXYGEN__)
+#define ISR(vect)
+#elif defined(__GNUC__)
+#include
+#elif defined(__ICCAVR__)
+#define __ISR(x) _Pragma(#x)
+#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
+#endif
+#endif // ISR_CUSTOM_H
+
+#ifdef __GNUC__
+#define cpu_irq_enable() sei()
+#define cpu_irq_disable() cli()
+#else
+#define cpu_irq_enable() __enable_interrupt()
+#define cpu_irq_disable() __disable_interrupt()
+#endif
+
+//! @}
+
+/**
+ * \weakgroup interrupt_deprecated_group
+ * @{
+ */
+// Deprecated definitions.
+#define Enable_global_interrupt() cpu_irq_enable()
+#define Disable_global_interrupt() cpu_irq_disable()
+#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
+//! @}
+
+#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/utils.h b/voltage-follower.X/mcc_generated_files/system/utils/utils.h
new file mode 100644
index 0000000..a7b1b42
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/utils.h
@@ -0,0 +1,52 @@
+/**
+ * utils Header File
+ *
+ * @file system.h
+ *
+ * @defgroup doc_driver_utils AVR Code utility functions
+ *
+ * @brief This file contains the compiler abstraction layer and code utilities for AVR.This module provides various abstraction layers and utilities to make code compatible between different compilers.
+ *
+ * @version Driver Version 1.0.1
+ * \{
+ *
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UTILS_H_INCLUDED
+#define UTILS_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @brief Retrieve array size
+ */
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+/** @} */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UTILS_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/system/utils/utils_assert.h b/voltage-follower.X/mcc_generated_files/system/utils/utils_assert.h
new file mode 100644
index 0000000..b603f51
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/system/utils/utils_assert.h
@@ -0,0 +1,60 @@
+/**
+ * utils_assert Header File
+ *
+ * @file utils_assert.h
+ *
+ * @defgroup doc_driver_utils_assert Functionality for assert
+ *
+ * @brief This file contains the generated utils_assert header file for the configuration bits driver.
+ *
+ * @version Driver Version 1.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef _ASSERT_H_INCLUDED
+#define _ASSERT_H_INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include
+
+/**
+ * @brief Assert macro
+ * Macro used to throw asserts. It can be mapped to different function based on debug level.
+ * @param[in] condition A condition to be checked; assert is thrown if the given condition is false.
+ */
+
+#ifdef DEBUG
+#define ASSERT(condition) \
+ if (!(condition)) \
+ while (true) \
+ ;
+#else
+#define ASSERT(condition) ((void)0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* _ASSERT_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/timer/rtc.h b/voltage-follower.X/mcc_generated_files/timer/rtc.h
new file mode 100644
index 0000000..10a822f
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/rtc.h
@@ -0,0 +1,193 @@
+/**
+ * RTC Generated Driver API Header File.
+ *
+ * @file rtc.h
+ *
+ * @defgroup rtc RTC
+ *
+ * @brief This file contains the API prototypes of the RTC driver.
+ *
+ * @version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef RTCDRIVER_H
+#define RTCDRIVER_H
+
+#include "../system/utils/compiler.h"
+#include
+#include
+
+/**
+ * @ingroup rtc
+ * @typedef void RTC_cb_t
+ * @brief Function pointer to callback function called by the RTC. The default value is set to NULL which means that no callback function will be used.
+ */
+typedef void (*RTC_cb_t)(void);
+/**
+ * @ingroup rtc
+ * @brief Interrupt Service Routine (ISR) callback function to be called if Overflow (OVF) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on Overflow event.
+ * @return None.
+ */
+void RTC_SetOVFIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if Compare (CMP) match Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on compare match event.
+ * @return None.
+ */
+void RTC_SetCMPIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief ISR callback function to be called if the Periodic Interrupt Timer (PIT) Interrupt flag is set.
+ * @param RTC_cb_t cb - Callback function to be called on periodic interrupt event.
+ * @return None.
+ */
+void RTC_SetPITIsrCallback(RTC_cb_t cb);
+/**
+ * @ingroup rtc
+ * @brief Initializes the RTC module.
+ * @param None.
+ * @retval 0 - the RTC initialization is successful
+ * @retval 1 - the RTC initialization is not successful
+ */
+int8_t RTC_Initialize(void);
+/**
+ * @ingroup rtc
+ * @brief Starts the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Start(void);
+/**
+ * @ingroup rtc
+ * @brief Stops the counter register for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_Stop(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Counter register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Counter register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCounter(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the Period register of the RTC module.
+ * @param uint16_t timerVal - Value to be written to the Period register of the RTC.
+ * @return None.
+ */
+void RTC_WritePeriod(uint16_t timerVal);
+/**
+ * @ingroup rtc
+ * @brief Returns the counter value from the Counter register.
+ * @param None.
+ * @return uint16_t - Value of the Counter register.
+ */
+uint16_t RTC_ReadCounter(void);
+/**
+ * @ingroup rtc
+ * @brief Returns the value of the Period register.
+ * @param None.
+ * @return uint16_t - Value of the Period register.
+ */
+uint16_t RTC_ReadPeriod(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Compare (CMP) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the CMP Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableCMPInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Overflow (OVF) Interrupt.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the OVF Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisableOVFInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Enables the Periodic Interrupt Timer (PIT) interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_EnablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Disables the PIT Interrupt for the RTC module.
+ * @param None.
+ * @return None.
+ */
+void RTC_DisablePITInterrupt(void);
+/**
+ * @ingroup rtc
+ * @brief Clears the OVF Interrupt flag.
+ * @param None.
+ * @return None.
+ */
+void RTC_ClearOVFInterruptFlag(void);
+/**
+ * @ingroup rtc
+ * @brief Checks if Overflow interrupt has occurred.
+ * @param None.
+ * @retval True - Interrupt is enabled.
+ * @retval False - Interrupt is disabled.
+ */
+bool RTC_IsOVFInterruptEnabled(void);
+/**
+ * @ingroup rtc
+ * @brief Writes a value to the CMP register of the RTC module.
+ * @param uint16_t value - Value to be written to the CMP register of the RTC.
+ * @return None.
+ */
+void RTC_WriteCMPRegister(uint16_t value);
+/**
+ * @ingroup rtc
+ * @brief Returns the value from the CMP register.
+ * @param None.
+ * @return uint16_t - Value of the Compare register.
+ */
+uint16_t RTC_ReadCMPRegister(void);
+
+
+#endif /* RTCDRIVER_H */
+
+/** @}*/
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/timer/src/rtc.c b/voltage-follower.X/mcc_generated_files/timer/src/rtc.c
new file mode 100644
index 0000000..1d6c1eb
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/src/rtc.c
@@ -0,0 +1,202 @@
+/**
+ * RTC Generated Driver API Source File.
+ *
+ * @file rtc.c
+ *
+ * @ingroup rtc
+ *
+ * @brief This file contains the API implementations for the RTC driver.
+ *
+ * version RTC Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#include "../rtc.h"
+
+void (*RTC_OVF_isr_cb)(void) = NULL;
+void (*RTC_CMP_isr_cb)(void) = NULL;
+void (*RTC_PIT_isr_cb)(void) = NULL;
+
+int8_t RTC_Initialize(void)
+{
+ while (RTC.STATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ //Compare
+ RTC.CMP = 0x0;
+
+ //Count
+ RTC.CNT = 0x0;
+
+ //Period
+ RTC.PER = 0x3FF;
+
+ //Clock selection
+ RTC.CLKSEL = 0x0;
+
+
+ // CMP disabled; OVF enabled;
+ RTC.INTCTRL = 0x1;
+
+ // DBGRUN disabled;
+ RTC.DBGCTRL = 0x0;
+
+ // CORREN disabled; PRESCALER RTC Clock / 32; RTCEN enabled; RUNSTDBY disabled;
+ RTC.CTRLA = 0x29;
+
+
+ while (RTC.PITSTATUS > 0) { /* Wait for all register to be synchronized */
+ }
+ // PI disabled;
+ RTC.PITINTCTRL = 0x0;
+
+ // DBGRUN disabled;
+ RTC.PITDBGCTRL = 0x0;
+
+ return 0;
+}
+
+void RTC_Start(void)
+{
+ RTC.CTRLA |= RTC_RTCEN_bm;
+}
+
+void RTC_Stop(void)
+{
+ RTC.CTRLA &= ~RTC_RTCEN_bm;
+}
+
+void RTC_SetOVFIsrCallback(RTC_cb_t cb)
+{
+ RTC_OVF_isr_cb = cb;
+}
+
+void RTC_SetCMPIsrCallback(RTC_cb_t cb)
+{
+ RTC_CMP_isr_cb = cb;
+}
+
+void RTC_SetPITIsrCallback(RTC_cb_t cb)
+{
+ RTC_PIT_isr_cb = cb;
+}
+
+ISR(RTC_CNT_vect)
+{
+ if ( (RTC.INTCTRL & RTC_OVF_bm) && (RTC.INTFLAGS & RTC_OVF_bm) )
+ {
+ if (RTC_OVF_isr_cb != NULL)
+ {
+ (*RTC_OVF_isr_cb)();
+ }
+ }
+
+ if ( (RTC.INTCTRL & RTC_CMP_bm) && (RTC.INTFLAGS & RTC_CMP_bm) )
+ {
+ if (RTC_CMP_isr_cb != NULL)
+ {
+ (*RTC_CMP_isr_cb)();
+ }
+ }
+ RTC.INTFLAGS = (RTC_OVF_bm | RTC_CMP_bm);
+}
+
+ISR(RTC_PIT_vect)
+{
+ if (RTC_PIT_isr_cb != NULL)
+ {
+ (*RTC_PIT_isr_cb)();
+ }
+ RTC.PITINTFLAGS = RTC_PI_bm;
+}
+
+inline void RTC_WriteCounter(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_CNTBUSY_bm);
+ RTC.CNT = timerVal;
+}
+
+inline uint16_t RTC_ReadCounter(void)
+{
+ return RTC.CNT;
+}
+
+inline void RTC_WritePeriod(uint16_t timerVal)
+{
+ while (RTC.STATUS & RTC_PERBUSY_bm);
+ RTC.PER = timerVal;
+}
+
+inline uint16_t RTC_ReadPeriod(void)
+{
+ return RTC.PER;
+}
+
+inline void RTC_EnableCMPInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_CMP_bm;
+}
+
+inline void RTC_DisableCMPInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_CMP_bm;
+}
+
+inline void RTC_EnableOVFInterrupt(void)
+{
+ RTC.INTCTRL |= RTC_OVF_bm;
+}
+
+inline void RTC_DisableOVFInterrupt(void)
+{
+ RTC.INTCTRL &= ~RTC_OVF_bm;
+}
+
+inline void RTC_EnablePITInterrupt(void)
+{
+ RTC.PITINTCTRL |= RTC_PI_bm;
+}
+
+inline void RTC_DisablePITInterrupt(void)
+{
+ RTC.PITINTCTRL &= ~RTC_PI_bm;
+}
+
+inline void RTC_ClearOVFInterruptFlag(void)
+{
+ RTC.INTFLAGS = RTC_OVF_bm;
+}
+
+inline bool RTC_IsOVFInterruptEnabled(void)
+{
+ return ((RTC.INTCTRL & RTC_OVF_bm) > 0);
+}
+
+inline void RTC_WriteCMPRegister(uint16_t value)
+{
+ RTC.CMP = value;
+}
+
+inline uint16_t RTC_ReadCMPRegister(void)
+{
+ return RTC.CMP;
+}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/timer/src/tcb0.c b/voltage-follower.X/mcc_generated_files/timer/src/tcb0.c
new file mode 100644
index 0000000..cf0217c
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/src/tcb0.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB0 Generated Driver File
+ *
+ * @file tcb0.c
+ *
+ * @ingroup tcb0
+ *
+ * @brief This file contains the API implementation for the TCB0 module driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb0.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB0_OVF_isr_cb)(void);
+static void TCB0_DefaultOverflowCallback(void);
+static void (*TCB0_CAPT_isr_cb)(void);
+static void TCB0_DefaultCaptureCallback(void);
+
+void TCB0_Initialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB0.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB0.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB0.CCMP = 0x6B8U; // CCMP 0x6B8
+
+ TCB0.CNT = 0x0; // CNT 0xNAN
+
+ TCB0.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_OverflowCallbackRegister(TCB0_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB0_CaptureCallbackRegister(TCB0_DefaultCaptureCallback);
+
+ TCB0.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB0.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (1 << TCB_RUNSTDBY_bp) // RUNSTDBY enabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB0_Deinitialize(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB0.CCMP = 0x0;
+
+ TCB0.CNT = 0x0;
+
+ TCB0.CTRLB = 0x0;
+
+ TCB0.DBGCTRL = 0x0;
+
+ TCB0.EVCTRL = 0x0;
+
+ TCB0.INTCTRL = 0x0;
+
+ TCB0.TEMP = 0x0;
+
+ TCB0.CTRLA = 0x0;
+
+ TCB0.INTFLAGS = ~0x0;
+}
+
+void TCB0_Start(void)
+{
+ TCB0.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB0_Stop(void)
+{
+ TCB0.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB0_CounterSet(uint16_t timerVal)
+{
+ TCB0.CNT = timerVal;
+}
+
+uint16_t TCB0_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB0.CNT;
+
+ return readVal;
+}
+void TCB0_PeriodSet(uint16_t periodVal)
+{
+ TCB0.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB0_PeriodGet(void)
+{
+ return (uint16_t)TCB0.CCMP;
+}
+
+uint16_t TCB0_MaxCountGet(void)
+{
+ return TCB0_MAX_COUNT;
+}
+
+void TCB0_CAPTInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB0_CAPTInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB0_OVFInterruptEnable(void)
+{
+ TCB0.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB0_OVFInterruptDisable(void)
+{
+ TCB0.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB0_IsCaptInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB0_IsOvfInterruptEnabled(void)
+{
+ return ((TCB0.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB0_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB0_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB0_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB0_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB0_INT_vect)
+{
+ if (0U != (TCB0.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB0_CAPT_isr_cb != NULL)
+ {
+ (*TCB0_CAPT_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB0.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB0_OVF_isr_cb != NULL)
+ {
+ (*TCB0_OVF_isr_cb)();
+ }
+ TCB0.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/voltage-follower.X/mcc_generated_files/timer/src/tcb1.c b/voltage-follower.X/mcc_generated_files/timer/src/tcb1.c
new file mode 100644
index 0000000..e539285
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/src/tcb1.c
@@ -0,0 +1,223 @@
+
+/**
+ * TCB1 Generated Driver File
+ *
+ * @file tcb1.c
+ *
+ * @ingroup tcb1
+ *
+ * @brief This file contains the API implementation for the TCB1 module driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../tcb1.h"
+
+
+/**
+ * Section: Global Variables Definitions
+*/
+static void (*TCB1_OVF_isr_cb)(void);
+static void TCB1_DefaultOverflowCallback(void);
+static void (*TCB1_CAPT_isr_cb)(void);
+static void TCB1_DefaultCaptureCallback(void);
+
+void TCB1_Initialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CTRLB = (0 << TCB_ASYNC_bp) // ASYNC disabled
+ | (1 << TCB_CCMPEN_bp) // CCMPEN enabled
+ | (0 << TCB_CCMPINIT_bp) // CCMPINIT disabled
+ | (TCB_CNTMODE_INT_gc); // CNTMODE INT
+
+ TCB1.DBGCTRL = (0 << TCB_DBGRUN_bp); // DBGRUN disabled
+
+ TCB1.EVCTRL = (0 << TCB_CAPTEI_bp) // CAPTEI disabled
+ | (0 << TCB_EDGE_bp) // EDGE disabled
+ | (0 << TCB_FILTER_bp); // FILTER disabled
+
+ TCB1.CCMP = 0x1388U; // CCMP 0x1388
+
+ TCB1.CNT = 0x0; // CNT 0xNAN
+
+ TCB1.INTFLAGS = (0 << TCB_CAPT_bp) // CAPT disabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_OverflowCallbackRegister(TCB1_DefaultOverflowCallback);
+ /* cppcheck-suppress misra-c2012-8.7 */
+ TCB1_CaptureCallbackRegister(TCB1_DefaultCaptureCallback);
+
+ TCB1.INTCTRL = (1 << TCB_CAPT_bp) // CAPT enabled
+ | (0 << TCB_OVF_bp); // OVF disabled
+
+ TCB1.CTRLA = (0 << TCB_CASCADE_bp) // CASCADE disabled
+ | (TCB_CLKSEL_DIV1_gc) // CLKSEL DIV1
+ | (1 << TCB_ENABLE_bp) // ENABLE enabled
+ | (0 << TCB_RUNSTDBY_bp) // RUNSTDBY disabled
+ | (0 << TCB_SYNCUPD_bp); // SYNCUPD disabled
+}
+
+void TCB1_Deinitialize(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+
+ TCB1.CCMP = 0x0;
+
+ TCB1.CNT = 0x0;
+
+ TCB1.CTRLB = 0x0;
+
+ TCB1.DBGCTRL = 0x0;
+
+ TCB1.EVCTRL = 0x0;
+
+ TCB1.INTCTRL = 0x0;
+
+ TCB1.TEMP = 0x0;
+
+ TCB1.CTRLA = 0x0;
+
+ TCB1.INTFLAGS = ~0x0;
+}
+
+void TCB1_Start(void)
+{
+ TCB1.CTRLA |= TCB_ENABLE_bm; /* Start Timer */
+}
+
+void TCB1_Stop(void)
+{
+ TCB1.CTRLA &= ~TCB_ENABLE_bm; /* Stop Timer */
+}
+
+void TCB1_CounterSet(uint16_t timerVal)
+{
+ TCB1.CNT = timerVal;
+}
+
+uint16_t TCB1_CounterGet(void)
+{
+ uint16_t readVal;
+
+ readVal = TCB1.CNT;
+
+ return readVal;
+}
+void TCB1_PeriodSet(uint16_t periodVal)
+{
+ TCB1.CCMP = (uint16_t) periodVal;
+}
+
+uint16_t TCB1_PeriodGet(void)
+{
+ return (uint16_t)TCB1.CCMP;
+}
+
+uint16_t TCB1_MaxCountGet(void)
+{
+ return TCB1_MAX_COUNT;
+}
+
+void TCB1_CAPTInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_CAPT_bm; /* Capture or Timeout: enabled */
+}
+
+void TCB1_CAPTInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_CAPT_bm; /* Capture or Timeout: disabled */
+}
+
+void TCB1_OVFInterruptEnable(void)
+{
+ TCB1.INTCTRL |= TCB_OVF_bm; /* Overflow Interrupt: enabled */
+}
+
+void TCB1_OVFInterruptDisable(void)
+{
+ TCB1.INTCTRL &= ~TCB_OVF_bm; /* Overflow Interrupt: disabled */
+}
+
+
+bool TCB1_IsCaptInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_CAPT_bm) > 0);
+}
+
+bool TCB1_IsOvfInterruptEnabled(void)
+{
+ return ((TCB1.INTCTRL & TCB_OVF_bm) > 0);
+}
+
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_OVF_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultOverflowCallback(void)
+{
+ //Add your interrupt code here or
+ //Use TCB1_OverflowCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-8.7 */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void))
+{
+ TCB1_CAPT_isr_cb = CallbackHandler;
+}
+
+static void TCB1_DefaultCaptureCallback(void)
+{
+ //Add your Capture interrupt code here or
+ //Use TCB1_CaptureCallbackRegister function to use Custom ISR
+}
+
+/* cppcheck-suppress misra-c2012-2.7 */
+/* cppcheck-suppress misra-c2012-8.2 */
+/* cppcheck-suppress misra-c2012-8.4 */
+ISR(TCB1_INT_vect)
+{
+ if (0U != (TCB1.INTFLAGS & TCB_CAPT_bm))
+ {
+ if (TCB1_CAPT_isr_cb != NULL)
+ {
+ (*TCB1_CAPT_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_CAPT_bm;
+ }
+ if (0U != (TCB1.INTFLAGS & TCB_OVF_bm))
+ {
+ if (TCB1_OVF_isr_cb != NULL)
+ {
+ (*TCB1_OVF_isr_cb)();
+ }
+ TCB1.INTFLAGS = TCB_OVF_bm;
+ }
+}
+
diff --git a/voltage-follower.X/mcc_generated_files/timer/tcb0.h b/voltage-follower.X/mcc_generated_files/timer/tcb0.h
new file mode 100644
index 0000000..cdca1b9
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/tcb0.h
@@ -0,0 +1,205 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the API prototypes and other data types for TCB0.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_H_INCLUDED
+#define TCB0_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb0_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 maximum count value
+ */
+#define TCB0_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb0
+ * @brief Defines the TCB0 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB0_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB0_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb0
+ * @brief Initializes the TCB0 module
+ * @param None.
+ * @return None.
+ */
+void TCB0_Initialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Deinitializes the TCB0 module.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Deinitialize(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Starts the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Start(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Stops the TCB0 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB0_Stop(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB0_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb0
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB0_CounterGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB0_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB0 with TCB0_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB0_PeriodGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB0_MaxCountGet(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the capture interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Enables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb0
+ * @brief Disables the overflow interrupt for the TCB0.
+ * @param None.
+ * @return None.
+ */
+void TCB0_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb0
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB0_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB0_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/timer/tcb0_deprecated.h b/voltage-follower.X/mcc_generated_files/timer/tcb0_deprecated.h
new file mode 100644
index 0000000..bc8bb5a
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/tcb0_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB0 Generated Driver API Header File
+ *
+ * @file tcb0.h
+ *
+ * @defgroup tcb0 TCB0
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB0 driver.
+ *
+ * @version TCB0 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB0_DEPRECATED_H
+#define TCB0_DEPRECATED_H
+
+#warning "The tcb0_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterGet API.
+ * The TCB0_Read will be deprecated in the future release. Use TCB0_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Read TCB0_CounterGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_Write will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_Write TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptEnable API.
+ * The TCB0_EnableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableCaptInterrupt TCB0_CAPTInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CAPTInterruptDisable API.
+ * The TCB0_DisableCaptInterrupt will be deprecated in the future release. Use TCB0_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableCaptInterrupt TCB0_CAPTInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptEnable API.
+ * The TCB0_EnableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_EnableOvfInterrupt TCB0_OVFInterruptEnable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OVFInterruptDisable API.
+ * The TCB0_DisableOvfInterrupt will be deprecated in the future release. Use TCB0_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_DisableOvfInterrupt TCB0_OVFInterruptDisable
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusClear API.
+ * The TCB0_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearOvfInterruptFlag TCB0_OverflowStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusClear API.
+ * The TCB0_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_ClearCaptInterruptFlag TCB0_CaptureStatusClear
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_OverflowStatusGet API.
+ * The TCB0_IsOvfInterruptFlag will be deprecated in the future release. Use TCB0_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsOvfInterruptFlag TCB0_OverflowStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CaptureStatusGet API.
+ * The TCB0_IsCaptInterruptFlag will be deprecated in the future release. Use TCB0_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_IsCaptInterruptFlag TCB0_CaptureStatusGet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Start API.
+ * The TCB0_PWM_Enable will be deprecated in the future release. Use TCB0_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Enable TCB0_Start
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_Stop API.
+ * The TCB0_PWM_Disable will be deprecated in the future release. Use TCB0_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_PWM_Disable TCB0_Stop
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_CounterSet API.
+ * The TCB0_load_counter will be deprecated in the future release. Use TCB0_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_counter TCB0_CounterSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_PeriodSet API.
+ * The TCB0_load_top will be deprecated in the future release. Use TCB0_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_top TCB0_PeriodSet
+/**
+ * @ingroup tcb0
+ * @brief Defines the Custom Name for the \ref TCB0_DutyCycleSet API.
+ * The TCB0_load_duty_cycle will be deprecated in the future release. Use TCB0_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_load_duty_cycle TCB0_DutyCycleSet
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb0
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB0_pwm_register_t uint8_t
+
+#endif // TCB0_DEPRECATED_H
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/timer/tcb1.h b/voltage-follower.X/mcc_generated_files/timer/tcb1.h
new file mode 100644
index 0000000..d253414
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/tcb1.h
@@ -0,0 +1,205 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the API prototypes and other data types for TCB1.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_H_INCLUDED
+#define TCB1_H_INCLUDED
+
+#include
+#include
+#include "../system/utils/compiler.h"
+#include "tcb1_deprecated.h"
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 maximum count value
+ */
+#define TCB1_MAX_COUNT (65535U)
+/**
+ * @ingroup tcb1
+ * @brief Defines the TCB1 frequency in hertz.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_CLOCK_FREQ (4000000UL)
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during a capture event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+void TCB1_CaptureCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Registers a callback function to be called during an overflow event.
+ * @param void (* CallbackHandler)(void) - Pointer to the custom callback
+ * @return None.
+ */
+ void TCB1_OverflowCallbackRegister(void (* CallbackHandler)(void));
+
+/**
+ * @ingroup tcb1
+ * @brief Initializes the TCB1 module
+ * @param None.
+ * @return None.
+ */
+void TCB1_Initialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Deinitializes the TCB1 module.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Deinitialize(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Starts the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Start(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Stops the TCB1 counter.
+ * @param None.
+ * @return None.
+ */
+void TCB1_Stop(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Writes the counter value to the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param counterValue - Counter value to be written to the CNT register
+ * @return None.
+ */
+void TCB1_CounterSet(uint16_t counterValue);
+
+/**
+ * @ingroup tcb1
+ * @brief Reads the counter value from the CNT register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Counter value from the CNT register
+ */
+uint16_t TCB1_CounterGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Loads the period count value to the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param periodVal - Count value written to the CCMP register
+ * @return None.
+ */
+void TCB1_PeriodSet(uint16_t periodVal);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the current period value from the CCMP register.
+ * @pre Initialize TCB1 with TCB1_Initialize() before calling this API.
+ * @param None.
+ * @return Period value from the CCMP register
+ */
+uint16_t TCB1_PeriodGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Gets the maximum timer count value.
+ * @param None.
+ * @return Maximum count value
+ */
+uint16_t TCB1_MaxCountGet(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the capture interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_CAPTInterruptDisable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Enables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptEnable(void);
+
+/**
+ * @ingroup tcb1
+ * @brief Disables the overflow interrupt for the TCB1.
+ * @param None.
+ * @return None.
+ */
+void TCB1_OVFInterruptDisable(void);
+
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the capture interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsCaptInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+/**
+ * @ingroup tcb1
+ * @brief Checks if the overflow interrupt is enabled.
+ * @param None.
+ * @return None.
+ */
+bool TCB1_IsOvfInterruptEnabled(void) __attribute__((deprecated("This function will be deprecated in future")));
+
+
+
+
+#endif /* TCB1_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/timer/tcb1_deprecated.h b/voltage-follower.X/mcc_generated_files/timer/tcb1_deprecated.h
new file mode 100644
index 0000000..8c47aed
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/timer/tcb1_deprecated.h
@@ -0,0 +1,167 @@
+/**
+ * TCB1 Generated Driver API Header File
+ *
+ * @file tcb1.h
+ *
+ * @defgroup tcb1 TCB1
+ *
+ * @brief This file contains the deprecated macros or APIs for the TCB1 driver.
+ *
+ * @version TCB1 Driver Version 2.0.0
+ *
+ * @version Package Version 6.0.0
+ */
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef TCB1_DEPRECATED_H
+#define TCB1_DEPRECATED_H
+
+#warning "The tcb1_deprecated.h file contains the deprecated macros or functions. Replace the deprecated macro or functions with the recommended alternative."
+
+/**
+ * @misradeviation{@advisory,2.5}
+ * MCC Melody drivers provide macros that can be added to an application.
+ * It depends on the application whether a macro is used or not.
+ */
+
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterGet API.
+ * The TCB1_Read will be deprecated in the future release. Use TCB1_CounterGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Read TCB1_CounterGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_Write will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_Write TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptEnable API.
+ * The TCB1_EnableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableCaptInterrupt TCB1_CAPTInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CAPTInterruptDisable API.
+ * The TCB1_DisableCaptInterrupt will be deprecated in the future release. Use TCB1_CAPTInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableCaptInterrupt TCB1_CAPTInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptEnable API.
+ * The TCB1_EnableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptEnable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_EnableOvfInterrupt TCB1_OVFInterruptEnable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OVFInterruptDisable API.
+ * The TCB1_DisableOvfInterrupt will be deprecated in the future release. Use TCB1_OVFInterruptDisable instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_DisableOvfInterrupt TCB1_OVFInterruptDisable
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusClear API.
+ * The TCB1_ClearOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearOvfInterruptFlag TCB1_OverflowStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusClear API.
+ * The TCB1_ClearCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusClear instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_ClearCaptInterruptFlag TCB1_CaptureStatusClear
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_OverflowStatusGet API.
+ * The TCB1_IsOvfInterruptFlag will be deprecated in the future release. Use TCB1_OverflowStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsOvfInterruptFlag TCB1_OverflowStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CaptureStatusGet API.
+ * The TCB1_IsCaptInterruptFlag will be deprecated in the future release. Use TCB1_CaptureStatusGet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_IsCaptInterruptFlag TCB1_CaptureStatusGet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Start API.
+ * The TCB1_PWM_Enable will be deprecated in the future release. Use TCB1_Start instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Enable TCB1_Start
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_Stop API.
+ * The TCB1_PWM_Disable will be deprecated in the future release. Use TCB1_Stop instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_PWM_Disable TCB1_Stop
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_CounterSet API.
+ * The TCB1_load_counter will be deprecated in the future release. Use TCB1_CounterSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_counter TCB1_CounterSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_PeriodSet API.
+ * The TCB1_load_top will be deprecated in the future release. Use TCB1_PeriodSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_top TCB1_PeriodSet
+/**
+ * @ingroup tcb1
+ * @brief Defines the Custom Name for the \ref TCB1_DutyCycleSet API.
+ * The TCB1_load_duty_cycle will be deprecated in the future release. Use TCB1_DutyCycleSet instead.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_load_duty_cycle TCB1_DutyCycleSet
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+/**
+ * @ingroup tcb1
+ * @brief Defines a macro to handle deprecated custom data type.
+ * This macro will be deprecated in the future release.
+ */
+/* cppcheck-suppress misra-c2012-2.5 */
+#define TCB1_pwm_register_t uint8_t
+
+#endif // TCB1_DEPRECATED_H
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/uart/src/usart3.c b/voltage-follower.X/mcc_generated_files/uart/src/usart3.c
new file mode 100644
index 0000000..8ce1b02
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/uart/src/usart3.c
@@ -0,0 +1,309 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.c
+ *
+ * @ingroup usart3
+ *
+ * @brief This is the generated driver implementation file for the USART3 driver using
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+/**
+ Section: Included Files
+*/
+
+#include "../usart3.h"
+
+/**
+ Section: Macro Declarations
+*/
+
+
+
+/**
+ Section: Driver Interface
+ */
+
+const uart_drv_interface_t UART3 = {
+ .Initialize = &USART3_Initialize,
+ .Deinitialize = &USART3_Deinitialize,
+ .Read = &USART3_Read,
+ .Write = &USART3_Write,
+ .IsRxReady = &USART3_IsRxReady,
+ .IsTxReady = &USART3_IsTxReady,
+ .IsTxDone = &USART3_IsTxDone,
+ .TransmitEnable = &USART3_TransmitEnable,
+ .TransmitDisable = &USART3_TransmitDisable,
+ .AutoBaudSet = &USART3_AutoBaudSet,
+ .AutoBaudQuery = &USART3_AutoBaudQuery,
+ .BRGCountSet = NULL,
+ .BRGCountGet = NULL,
+ .BaudRateSet = NULL,
+ .BaudRateGet = NULL,
+ .AutoBaudEventEnableGet = NULL,
+ .ErrorGet = &USART3_ErrorGet,
+ .TxCompleteCallbackRegister = NULL,
+ .RxCompleteCallbackRegister = NULL,
+ .TxCollisionCallbackRegister = NULL,
+ .FramingErrorCallbackRegister = &USART3_FramingErrorCallbackRegister,
+ .OverrunErrorCallbackRegister = &USART3_OverrunErrorCallbackRegister,
+ .ParityErrorCallbackRegister = &USART3_ParityErrorCallbackRegister,
+ .EventCallbackRegister = NULL,
+};
+
+/**
+ Section: USART3 variables
+*/
+static volatile usart3_status_t usart3RxLastError;
+
+/**
+ Section: USART3 APIs
+*/
+void (*USART3_FramingErrorHandler)(void);
+void (*USART3_OverrunErrorHandler)(void);
+void (*USART3_ParityErrorHandler)(void);
+
+static void USART3_DefaultFramingErrorCallback(void);
+static void USART3_DefaultOverrunErrorCallback(void);
+static void USART3_DefaultParityErrorCallback(void);
+
+
+
+/**
+ Section: USART3 APIs
+*/
+
+void USART3_Initialize(void)
+{
+ // Set the USART3 module to the options selected in the user interface.
+
+ //BAUD 138;
+ USART3.BAUD = (uint16_t)USART3_BAUD_RATE(115200);
+
+ // ABEIE disabled; DREIE disabled; LBME disabled; RS485 DISABLE; RXCIE disabled; RXSIE disabled; TXCIE disabled;
+ USART3.CTRLA = 0x0;
+
+ // MPCM disabled; ODME disabled; RXEN disabled; RXMODE NORMAL; SFDEN disabled; TXEN enabled;
+ USART3.CTRLB = 0x40;
+
+ // CMODE Asynchronous Mode; UCPHA enabled; UDORD disabled; CHSIZE Character size: 8 bit; PMODE No Parity; SBMODE 1 stop bit;
+ USART3.CTRLC = 0x3;
+
+ //DBGRUN disabled;
+ USART3.DBGCTRL = 0x0;
+
+ //IREI disabled;
+ USART3.EVCTRL = 0x0;
+
+ //RXPL 0x0;
+ USART3.RXPLCTRL = 0x0;
+
+ //TXPL 0x0;
+ USART3.TXPLCTRL = 0x0;
+
+ USART3_FramingErrorCallbackRegister(USART3_DefaultFramingErrorCallback);
+ USART3_OverrunErrorCallbackRegister(USART3_DefaultOverrunErrorCallback);
+ USART3_ParityErrorCallbackRegister(USART3_DefaultParityErrorCallback);
+ usart3RxLastError.status = 0;
+}
+
+void USART3_Deinitialize(void)
+{
+ USART3.BAUD = 0x00;
+ USART3.CTRLA = 0x00;
+ USART3.CTRLB = 0x00;
+ USART3.CTRLC = 0x00;
+ USART3.DBGCTRL = 0x00;
+ USART3.EVCTRL = 0x00;
+ USART3.RXPLCTRL = 0x00;
+ USART3.TXPLCTRL = 0x00;
+}
+
+void USART3_Enable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm | USART_TXEN_bm;
+}
+
+void USART3_Disable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm | USART_TXEN_bm);
+}
+
+void USART3_TransmitEnable(void)
+{
+ USART3.CTRLB |= USART_TXEN_bm;
+}
+
+void USART3_TransmitDisable(void)
+{
+ USART3.CTRLB &= ~(USART_TXEN_bm);
+}
+
+void USART3_ReceiveEnable(void)
+{
+ USART3.CTRLB |= USART_RXEN_bm ;
+}
+
+void USART3_ReceiveDisable(void)
+{
+ USART3.CTRLB &= ~(USART_RXEN_bm);
+}
+
+void USART3_AutoBaudSet(bool enable)
+{
+ if(enable)
+ {
+ USART3.CTRLB |= USART_RXMODE_gm & (0x02 << USART_RXMODE_gp);
+ USART3.STATUS |= USART_WFB_bm ;
+ }
+ else
+ {
+ USART3.CTRLB &= ~(USART_RXMODE_gm);
+ USART3.STATUS &= ~(USART_BDF_bm);
+ }
+}
+
+bool USART3_AutoBaudQuery(void)
+{
+ return (bool)(USART3.STATUS & USART_BDF_bm) ;
+}
+
+bool USART3_IsAutoBaudDetectError(void)
+{
+ return (bool)(USART3.STATUS & USART_ISFIF_bm) ;
+}
+
+void USART3_AutoBaudDetectErrorReset(void)
+{
+ USART3.STATUS |= USART_ISFIF_bm ;
+ USART3_AutoBaudSet(false);
+ USART3_ReceiveDisable();
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ asm("nop");
+ USART3_ReceiveEnable();
+ USART3_AutoBaudSet(true);
+}
+
+bool USART3_IsRxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_RXCIF_bm);
+}
+
+bool USART3_IsTxReady(void)
+{
+ return (bool)(USART3.STATUS & USART_DREIF_bm);
+}
+
+bool USART3_IsTxDone(void)
+{
+ return (bool)(USART3.STATUS & USART_TXCIF_bm);
+}
+
+size_t USART3_ErrorGet(void)
+{
+ usart3RxLastError.status = 0;
+
+ if(USART3.RXDATAH & USART_FERR_bm)
+ {
+ usart3RxLastError.ferr = 1;
+ if(NULL != USART3_FramingErrorHandler)
+ {
+ USART3_FramingErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_PERR_bm)
+ {
+ usart3RxLastError.perr = 1;
+ if(NULL != USART3_ParityErrorHandler)
+ {
+ USART3_ParityErrorHandler();
+ }
+ }
+ if(USART3.RXDATAH & USART_BUFOVF_bm)
+ {
+ usart3RxLastError.oerr = 1;
+ if(NULL != USART3_OverrunErrorHandler)
+ {
+ USART3_OverrunErrorHandler();
+ }
+ }
+ return usart3RxLastError.status;
+}
+
+uint8_t USART3_Read(void)
+{
+ return USART3.RXDATAL;
+}
+
+
+void USART3_Write(uint8_t txData)
+{
+ USART3.TXDATAL = txData; // Write the data byte to the USART.
+}
+static void USART3_DefaultFramingErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultOverrunErrorCallback(void)
+{
+
+}
+
+static void USART3_DefaultParityErrorCallback(void)
+{
+
+}
+
+void USART3_FramingErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_FramingErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_OverrunErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_OverrunErrorHandler = callbackHandler;
+ }
+}
+
+void USART3_ParityErrorCallbackRegister(void (* callbackHandler)(void))
+{
+ if(NULL != callbackHandler)
+ {
+ USART3_ParityErrorHandler = callbackHandler;
+ }
+}
+
+
+
+
diff --git a/voltage-follower.X/mcc_generated_files/uart/uart_drv_interface.h b/voltage-follower.X/mcc_generated_files/uart/uart_drv_interface.h
new file mode 100644
index 0000000..3c4a04b
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/uart/uart_drv_interface.h
@@ -0,0 +1,90 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_drv_interface.h
+ *
+ * @defgroup uart_drv_interface UART_DRV_INTERFACE
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.1
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_DRV_INTERFACE_H
+#define UART_DRV_INTERFACE_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+#include "uart_types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+ @ingroup UART
+ @struct uart_drv_interface_t
+ @brief Structure containing the function pointers of UART driver.
+*/
+typedef struct {
+void (*Initialize)(void);
+void (*Deinitialize)(void);
+uint8_t (*Read)(void);
+void (*Write)(uint8_t);
+bool (*IsRxReady)(void);
+bool (*IsTxReady)(void);
+bool (*IsTxDone)(void);
+void (*TransmitEnable)(void);
+void (*TransmitDisable)(void);
+void (*AutoBaudSet)(bool enable);
+bool (*AutoBaudQuery)(void);
+bool (*AutoBaudEventEnableGet)(void);
+void (*BRGCountSet)(uint32_t brgValue);
+uint32_t (*BRGCountGet)(void);
+void (*BaudRateSet)(uint32_t baudRate);
+uint32_t (*BaudRateGet)(void);
+size_t (*ErrorGet)(void);
+void (*TxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*RxCompleteCallbackRegister)(void (*CallbackHandler) (void));
+void (*TxCollisionCallbackRegister)(void (*CallbackHandler) (void));
+void (*FramingErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*OverrunErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*ParityErrorCallbackRegister)(void (*CallbackHandler) (void));
+void (*EventCallbackRegister)(void (*CallbackHandler) (void));
+}uart_drv_interface_t;
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_DRV_INTERFACE_H */
+
diff --git a/voltage-follower.X/mcc_generated_files/uart/uart_types.h b/voltage-follower.X/mcc_generated_files/uart/uart_types.h
new file mode 100644
index 0000000..33de07b
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/uart/uart_types.h
@@ -0,0 +1,81 @@
+/**
+ * UART Generated Driver Interface Header File
+ *
+ * @file uart_types.h
+ *
+ * @defgroup uart_types UART_TYPES
+ *
+ * @brief This file contains APIs for UART module.
+ *
+ * @version UART Driver Version 2.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef UART_TYPES_H
+#define UART_TYPES_H
+
+/**
+ Section: Included Files
+*/
+#include
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ Section: Data Type Definitions
+*/
+
+/**
+@ingroup uartdriver
+@enum UART_STANDARD_BAUDS
+@brief This Enum can be used to set UART standard
+baud-rates using \ref UARTx_BRGSet function e.g. \ref UART1_BRGSet.
+*/
+enum UART_STANDARD_BAUDS{
+UART_110 = 0,
+UART_300 = 1,
+UART_600 = 2,
+UART_1200 = 3,
+UART_2400 = 4,
+UART_4800 = 5,
+UART_9600 = 6,
+UART_14400 = 7,
+UART_19200 = 8,
+UART_38400 = 9,
+UART_57600 = 10,
+UART_115200 = 11,
+UART_230400 = 12,
+UART_460800 = 13,
+UART_921600 = 14,
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* UART_TYPES_H */
+
diff --git a/voltage-follower.X/mcc_generated_files/uart/usart3.h b/voltage-follower.X/mcc_generated_files/uart/usart3.h
new file mode 100644
index 0000000..255742a
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/uart/usart3.h
@@ -0,0 +1,306 @@
+/**
+ * USART3 Generated Driver API Header File
+ *
+ * @file usart3.h
+ *
+ * @defgroup usart3 USART3
+ *
+ * @brief This file contains API prototypes and other datatypes for USART3 module.
+ *
+ * @version USART3 Driver Version 2.1.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#ifndef USART3_H
+#define USART3_H
+
+/**
+ Section: Included Files
+ */
+
+#include
+#include
+#include
+#include "../system/system.h"
+#include "uart_drv_interface.h"
+
+#ifdef __cplusplus // Provide C++ Compatibility
+
+ extern "C" {
+
+#endif
+
+/* Normal Mode, Baud register value */
+#define USART3_BAUD_RATE(BAUD_RATE) (((float)4000000 * 64 / (16 * (float)BAUD_RATE)) + 0.5)
+
+#define UART3_interface UART3
+
+
+#define UART3_Initialize USART3_Initialize
+#define UART3_Deinitialize USART3_Deinitialize
+#define UART3_Write USART3_Write
+#define UART3_Read USART3_Read
+#define UART3_IsRxReady USART3_IsRxReady
+#define UART3_IsTxReady USART3_IsTxReady
+#define UART3_IsTxDone USART3_IsTxDone
+
+#define UART3_TransmitEnable USART3_TransmitEnable
+#define UART3_TransmitDisable USART3_TransmitDisable
+#define UART3_AutoBaudSet USART3_AutoBaudSet
+#define UART3_AutoBaudQuery USART3_AutoBaudQuery
+#define UART3_IsAutoBaudDetectError USART3_IsAutoBaudDetectError
+#define UART3_AutoBaudDetectErrorReset USART3_AutoBaudDetectErrorReset
+#define UART3_BRGCountSet (NULL)
+#define UART3_BRGCountGet (NULL)
+#define UART3_BaudRateSet (NULL)
+#define UART3_BaudRateGet (NULL)
+#define UART3_AutoBaudEventEnableGet (NULL)
+#define UART3_ErrorGet USART3_ErrorGet
+
+#define UART3_TxCompleteCallbackRegister (NULL)
+#define UART3_RxCompleteCallbackRegister (NULL)
+#define UART3_TxCollisionCallbackRegister (NULL)
+#define UART3_FramingErrorCallbackRegister USART3_FramingErrorCallbackRegister
+#define UART3_OverrunErrorCallbackRegister USART3_OverrunErrorCallbackRegister
+#define UART3_ParityErrorCallbackRegister USART3_ParityErrorCallbackRegister
+#define UART3_EventCallbackRegister (NULL)
+
+
+/**
+ @ingroup usart3
+ @struct usart3_status_t
+ @breif This is an instance of USART3_STATUS for USART3 module
+ */
+typedef union {
+ struct {
+ uint8_t perr : 1; /**
-#elif defined(__IAR_SYSTEMS_ASM__)
-#include "assembler/iar.h"
-#include
-#endif
-
-#endif /* ASSEMBLER_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/utils/atomic.h b/voltage-follower.X/mcc_generated_files/utils/atomic.h
deleted file mode 100644
index 7b99064..0000000
--- a/voltage-follower.X/mcc_generated_files/utils/atomic.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef ATOMIC_H
-#define ATOMIC_H
-
-/**
- * \defgroup doc_driver_utils_atomic Atomic memory access and critical sections
- * \ingroup doc_driver_utils
- *
- * Atomic memory access and critical sections
- *
- * \{
- */
-
-/* clang-format off */
-
-#if defined(__GNUC__) || defined (__DOXYGEN__)
-
-/**
- * \brief Enter a critical region
- *
- * Saves the contents of the status register, including the Global
- * Interrupt Enable bit, so that it can be restored upon leaving the
- * critical region. Thereafter, clears the Global Interrupt Enable Bit.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler declares a variable with the name of the parameter for
- * holding the SREG value. Since a variable is declared in the macro,
- * this variable must have a name that is unique within the scope
- * that the critical region is declared within, otherwise compilation
- * will fail.
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define ENTER_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "in __tmp_reg__, __SREG__" "\n\t" \
- "cli" "\n\t" \
- "push __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-/**
- * \brief Exit a critical region
- *
- * Restores the contents of the status register, including the Global
- * Interrupt Enable bit, as it was when entering the critical region.
- * This macro takes a parameter P that is unused for the GCC compiler,
- * but necessary for code compatibility with the IAR compiler. The IAR
- * compiler uses this parameter as the name of a variable that holds
- * the SREG value. The parameter must be identical to the parameter
- * used in the corresponding ENTER_CRITICAL().
- *
- * \param[in] UNUSED(GCC)/P(IAR) Name of variable storing SREG
- *
- */
-
-#define EXIT_CRITICAL(UNUSED) __asm__ __volatile__ ( \
- "pop __tmp_reg__" "\n\t" \
- "out __SREG__, __tmp_reg__" "\n\t" \
- ::: "memory" \
- )
-
-#define DISABLE_INTERRUPTS() __asm__ __volatile__ ( "cli" ::: "memory")
-#define ENABLE_INTERRUPTS() __asm__ __volatile__ ( "sei" ::: "memory")
-
-#elif defined(__ICCAVR__)
-
-#define ENTER_CRITICAL(P) unsigned char P = __save_interrupt();__disable_interrupt();
-#define EXIT_CRITICAL(P) __restore_interrupt(P);
-
-#define DISABLE_INTERRUPTS() __disable_interrupt();
-#define ENABLE_INTERRUPTS() __enable_interrupt();
-
-#else
-# error Unsupported compiler.
-#endif
-
-/* clang-format on */
-
-#endif /* ATOMIC_H */
diff --git a/voltage-follower.X/mcc_generated_files/utils/compiler.h b/voltage-follower.X/mcc_generated_files/utils/compiler.h
deleted file mode 100644
index fbd7a59..0000000
--- a/voltage-follower.X/mcc_generated_files/utils/compiler.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-#ifndef UTILS_COMPILER_H
-#define UTILS_COMPILER_H
-
-/**
- * \defgroup doc_driver_utils_compiler Compiler abstraction
- * \ingroup doc_driver_utils
- *
- * Compiler abstraction layer and code utilities for 8-bit AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#if defined(__GNUC__)
-#include
-#include
-#elif defined(__ICCAVR__)
-#define ENABLE_BIT_DEFINITIONS 1
-#include
-#include
-
-#ifndef CCP_IOREG_gc
-#define CCP_IOREG_gc 0xD8 /* CPU_CCP_IOREG_gc */
-#endif
-#ifndef CCP_SPM_gc
-#define CCP_SPM_gc 0x9D /* CPU_CCP_SPM_gc */
-#endif
-
-#else
-#error Unsupported compiler.
-#endif
-
-#include
-#include
-#include
-#include
-
-#include "interrupt_avr8.h"
-
-/**
- * \def UNUSED
- * \brief Marking \a v as a unused parameter or value.
- */
-#define UNUSED(v) (void)(v)
-
-#endif /* UTILS_COMPILER_H */
diff --git a/voltage-follower.X/mcc_generated_files/utils/interrupt_avr8.h b/voltage-follower.X/mcc_generated_files/utils/interrupt_avr8.h
deleted file mode 100644
index ad1efd7..0000000
--- a/voltage-follower.X/mcc_generated_files/utils/interrupt_avr8.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_interrupts ISR abstraction
- * \ingroup doc_driver_utils
- *
- * Interrupt-related functionality.
- *
- * \{
- */
-
-#ifndef UTILS_INTERRUPT_AVR8_H
-#define UTILS_INTERRUPT_AVR8_H
-
-/**
- * \weakgroup interrupt_group
- *
- * @{
- */
-
-#ifdef ISR_CUSTOM_H
-#include ISR_CUSTOM_H
-#else
-
-/**
- * \def ISR
- * \brief Define service routine for specified interrupt vector
- *
- * Usage:
- * \code
- ISR(FOO_vect)
- {
- ...
- }
-\endcode
- *
- * \param vect Interrupt vector name as found in the device header files.
- */
-#if defined(__DOXYGEN__)
-#define ISR(vect)
-#elif defined(__GNUC__)
-#include
-#elif defined(__ICCAVR__)
-#define __ISR(x) _Pragma(#x)
-#define ISR(vect) __ISR(vector = vect) __interrupt void handler_##vect(void)
-#endif
-#endif // ISR_CUSTOM_H
-
-#ifdef __GNUC__
-#define cpu_irq_enable() sei()
-#define cpu_irq_disable() cli()
-#else
-#define cpu_irq_enable() __enable_interrupt()
-#define cpu_irq_disable() __disable_interrupt()
-#endif
-
-//! @}
-
-/**
- * \weakgroup interrupt_deprecated_group
- * @{
- */
-// Deprecated definitions.
-#define Enable_global_interrupt() cpu_irq_enable()
-#define Disable_global_interrupt() cpu_irq_disable()
-#define Is_global_interrupt_enabled() cpu_irq_is_enabled()
-//! @}
-
-#endif /* UTILS_INTERRUPT_AVR8_H */
diff --git a/voltage-follower.X/mcc_generated_files/utils/utils.h b/voltage-follower.X/mcc_generated_files/utils/utils.h
deleted file mode 100644
index b133c4d..0000000
--- a/voltage-follower.X/mcc_generated_files/utils/utils.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils AVR Code utility functions
- *
- * Compiler abstraction layer and code utilities for AVR.
- * This module provides various abstraction layers and utilities
- * to make code compatible between different compilers.
- *
- * \{
- */
-
-#ifndef UTILS_H_INCLUDED
-#define UTILS_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \brief Retrieve array size
- */
-#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
-
-/** @} */
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* UTILS_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/utils/utils_assert.h b/voltage-follower.X/mcc_generated_files/utils/utils_assert.h
deleted file mode 100644
index 25c322e..0000000
--- a/voltage-follower.X/mcc_generated_files/utils/utils_assert.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- @Company
- Microchip Technology Inc.
-
- @Description
- This Source file provides APIs.
- Generation Information :
- Driver Version : 1.0.0
-*/
-/*
- (c) 2018 Microchip Technology Inc. and its subsidiaries.
-
- Subject to your compliance with these terms, you may use Microchip software and any
- derivatives exclusively with Microchip products. It is your responsibility to comply with third party
- license terms applicable to your use of third party software (including open source software) that
- may accompany Microchip software.
-
- THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
- EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY
- IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS
- FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
- INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
- WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP
- HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO
- THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL
- CLAIMS IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT
- OF FEES, IF ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS
- SOFTWARE.
-*/
-
-
-/**
- * \defgroup doc_driver_utils_assert Functionality for assert.
- * \ingroup doc_driver_utils
- *
- * \{
- */
-
-#ifndef _ASSERT_H_INCLUDED
-#define _ASSERT_H_INCLUDED
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-/**
- * \brief Assert macro
- *
- * This macro is used to throw asserts. It can be mapped to different function
- * based on debug level.
- *
- * \param[in] condition A condition to be checked;
- * assert is thrown if the given condition is false
- */
-
-#ifdef DEBUG
-#define ASSERT(condition) \
- if (!(condition)) \
- while (true) \
- ;
-#else
-#define ASSERT(condition) ((void)0)
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-#endif /* _ASSERT_H_INCLUDED */
diff --git a/voltage-follower.X/mcc_generated_files/vref/src/vref.c b/voltage-follower.X/mcc_generated_files/vref/src/vref.c
new file mode 100644
index 0000000..b504765
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/vref/src/vref.c
@@ -0,0 +1,47 @@
+/**
+ * VREF Generated Driver File.
+ *
+ * @file vref.c
+ *
+ * @ingroup vref
+ *
+ * @brief This file contains the API implementation for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+#include "../vref.h"
+
+int8_t VREF_Initialize(void)
+{
+ // ALWAYSON disabled; REFSEL Internal 1.024V reference;
+ VREF.ACREF = 0x0;
+
+ // ALWAYSON enabled; REFSEL Internal 1.024V reference;
+ VREF.ADC0REF = 0x80;
+
+ // ALWAYSON enabled; REFSEL Internal 1.024V reference;
+ VREF.DAC0REF = 0x80;
+
+ return 0;
+}
\ No newline at end of file
diff --git a/voltage-follower.X/mcc_generated_files/vref/vref.h b/voltage-follower.X/mcc_generated_files/vref/vref.h
new file mode 100644
index 0000000..8186128
--- /dev/null
+++ b/voltage-follower.X/mcc_generated_files/vref/vref.h
@@ -0,0 +1,55 @@
+/**
+ * VREF Generated Driver API Header File
+ *
+ * @file vref.h
+ *
+ * @defgroup vref VREF
+ *
+ * @brief This file contains the API prototypes for the VREF module.
+ *
+ * @version VREF Driver Version 1.0.0
+*/
+/*
+© [2024] Microchip Technology Inc. and its subsidiaries.
+
+ Subject to your compliance with these terms, you may use Microchip
+ software and any derivatives exclusively with Microchip products.
+ You are responsible for complying with 3rd party license terms
+ applicable to your use of 3rd party software (including open source
+ software) that may accompany Microchip software. SOFTWARE IS ?AS IS.?
+ NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS
+ SOFTWARE, INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT,
+ MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT
+ WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
+ INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY
+ KIND WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF
+ MICROCHIP HAS BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE
+ FORESEEABLE. TO THE FULLEST EXTENT ALLOWED BY LAW, MICROCHIP?S
+ TOTAL LIABILITY ON ALL CLAIMS RELATED TO THE SOFTWARE WILL NOT
+ EXCEED AMOUNT OF FEES, IF ANY, YOU PAID DIRECTLY TO MICROCHIP FOR
+ THIS SOFTWARE.
+*/
+
+
+#ifndef VREF_H_INCLUDED
+#define VREF_H_INCLUDED
+
+#include "../system/utils/compiler.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @ingroup vref
+ * @brief Initializes the VREF module.
+ * @param None.
+ * @retval 0 - VREF is initialized successfully.
+ */
+int8_t VREF_Initialize(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* VREF_H_INCLUDED */
\ No newline at end of file
diff --git a/voltage-follower.X/nbproject/configurations.xml b/voltage-follower.X/nbproject/configurations.xml
index e0f6cff..4d0623b 100644
--- a/voltage-follower.X/nbproject/configurations.xml
+++ b/voltage-follower.X/nbproject/configurations.xml
@@ -7,40 +7,65 @@
-
- mcc_generated_files/config/clock_config.h
+
+ mcc_generated_files/adc/adc0.h
-
- mcc_generated_files/include/dac0.h
- mcc_generated_files/include/cpuint.h
- mcc_generated_files/include/port.h
- mcc_generated_files/include/rtc.h
- mcc_generated_files/include/vref.h
- mcc_generated_files/include/pin_manager.h
- mcc_generated_files/include/opamp.h
- mcc_generated_files/include/ccp.h
- mcc_generated_files/include/rstctrl.h
- mcc_generated_files/include/usart3.h
- mcc_generated_files/include/adc0.h
- mcc_generated_files/include/protected_io.h
- mcc_generated_files/include/tcb0.h
- mcc_generated_files/include/tcb1.h
+
+ mcc_generated_files/dac/dac0.h
-
-
- mcc_generated_files/utils/assembler/iar.h
- mcc_generated_files/utils/assembler/gas.h
+
+ mcc_generated_files/data_streamer/data_streamer.h
+
+
+ mcc_generated_files/opamp/opamp.h
+
+
+
+
+ mcc_generated_files/system/utils/assembler/iar.h
+ mcc_generated_files/system/utils/assembler/gas.h
+
+ mcc_generated_files/system/utils/assembler.h
+ mcc_generated_files/system/utils/compiler.h
+ mcc_generated_files/system/utils/utils_assert.h
+ mcc_generated_files/system/utils/atomic.h
+ mcc_generated_files/system/utils/interrupt_avr8.h
+ mcc_generated_files/system/utils/utils.h
- mcc_generated_files/utils/compiler.h
- mcc_generated_files/utils/interrupt_avr8.h
- mcc_generated_files/utils/utils.h
- mcc_generated_files/utils/utils_assert.h
- mcc_generated_files/utils/assembler.h
- mcc_generated_files/utils/atomic.h
+ mcc_generated_files/system/config_bits.h
+ mcc_generated_files/system/system.h
+ mcc_generated_files/system/pins.h
+ mcc_generated_files/system/ccp.h
+ mcc_generated_files/system/interrupt.h
+ mcc_generated_files/system/protected_io.h
+ mcc_generated_files/system/port.h
+ mcc_generated_files/system/clock.h
+
+
+ mcc_generated_files/timer/tcb0_deprecated.h
+ mcc_generated_files/timer/tcb1_deprecated.h
+ mcc_generated_files/timer/tcb1.h
+ mcc_generated_files/timer/tcb0.h
+ mcc_generated_files/timer/rtc.h
+
+
+ mcc_generated_files/uart/uart_drv_interface.h
+ mcc_generated_files/uart/usart3.h
+ mcc_generated_files/uart/uart_types.h
+
+
+ mcc_generated_files/vref/vref.h
- mcc_generated_files/mcc.h
- data_stream.h
+
+
+ Makefile
+ MyConfig.mc3
+ voltage-follower.mc3
-
- mcc_generated_files/src/pin_manager.c
- mcc_generated_files/src/cpuint.c
- mcc_generated_files/src/protected_io.S
- mcc_generated_files/src/adc0.c
- mcc_generated_files/src/usart3.c
- mcc_generated_files/src/vref.c
- mcc_generated_files/src/opamp.c
- mcc_generated_files/src/rtc.c
- mcc_generated_files/src/dac0.c
- mcc_generated_files/src/tcb0.c
- mcc_generated_files/src/tcb1.c
+
+
+ mcc_generated_files/adc/src/adc0.c
+
+
+
+
+ mcc_generated_files/dac/src/dac0.c
+
+
+
+
+ mcc_generated_files/data_streamer/src/data_streamer.c
+
+ mcc_generated_files/data_streamer/data_streamer.ds
+
+
+
+ mcc_generated_files/opamp/src/opamp.c
+
+
+
+
+ mcc_generated_files/system/src/interrupt.c
+ mcc_generated_files/system/src/pins.c
+ mcc_generated_files/system/src/config_bits.c
+ mcc_generated_files/system/src/clock.c
+ mcc_generated_files/system/src/system.c
+ mcc_generated_files/system/src/protected_io.S
+
+
+
+
+ mcc_generated_files/timer/src/tcb0.c
+ mcc_generated_files/timer/src/tcb1.c
+ mcc_generated_files/timer/src/rtc.c
+
+
+
+
+ mcc_generated_files/uart/src/usart3.c
+
+
+
+
+ mcc_generated_files/vref/src/vref.c
+
- mcc_generated_files/mcc.c
- mcc_generated_files/device_config.c
main.c
- data_stream.c
-
-
- Makefile
- MyConfig.mc3
@@ -89,13 +142,13 @@
AVR128DB48
- noID
+ nEdbgTool
XC8
- 2.30
+ 2.50
3
-
+
@@ -148,9 +201,9 @@
-
+
@@ -160,6 +213,7 @@
+
@@ -245,17 +299,64 @@
value="Press to select which tool pack to use"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -371,13 +472,13 @@
AVR128DB48
-
+ noID
XC8
- 2.20
+ 2.50
3
-
+
@@ -430,9 +531,9 @@
-
+
@@ -442,6 +543,7 @@
+
@@ -529,15 +631,19 @@
+
+
+
+
diff --git a/voltage-follower.X/voltage-follower.mc3 b/voltage-follower.X/voltage-follower.mc3
new file mode 100644
index 0000000..631937a
--- /dev/null
+++ b/voltage-follower.X/voltage-follower.mc3
@@ -0,0 +1,377 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ADC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Application Builder
+ class com.microchip.mcc.melody.module.FrameworkModule
+
+
+ CLKCTRL
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ CPUINT
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Configuration Bits
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ DAC0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ MAIN MANAGER
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ OPAMP
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ Pin Manager
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ RTC
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB0
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ TCB1
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ USART3
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ VREF
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ meta
+ class com.microchip.mcc.melody.hw.module.HardwareModule
+
+
+ module0
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module1
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module19
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module2
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module23
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module3
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module4
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module46
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module48
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module5
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module70
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module77
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module8
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module80
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module81
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+ module9
+ class com.microchip.mcc.melody.script.module.ScriptModule
+
+
+
+
+
+
+
+
+ {}
+
+
+
+ {"userAddedModules":["module5","module4","module9","module8","module48","module1","module0","module3","module2","module46","module77","module70","module81","module80"],"version":"CURRENT","modules":{"module5":{"scriptId":"@mchp-mcc/scf-avr8-clkctrl-v3","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"scf_avr8_clkctrl_v3":{"interfaceId":{"name":"scf-avr8-clkctrl-v3","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CLKCTRL"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"configbits_basic_interface":{"interfaceId":{"name":"configbits-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"configbits_basic_interface"}},"config_device":{"interfaceId":{"name":"config-device","version":"^1"},"handle":{"providerId":"module1","exportId":"config_device"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"frqselOschfctrla":"4 MHz system clock (default)","penMclkctrlb":false,"pdivMclkctrlb":"6X"}}}},"module4":{"scriptId":"@mchp-mcc/scf-avr8-interrupt-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_interrupt_v1":{"interfaceId":{"name":"scf-avr8-interrupt-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"CPUINT"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"iSreg":true}}}},"module9":{"scriptId":"@mchp-mcc/scf-avr8-vref-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_vref_v1":{"interfaceId":{"name":"scf-avr8-vref-v1","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"vdd":3.3,"alwaysonAdc0ref":true,"refselAdc0ref":"Internal 1.024V reference","alwaysonDac0ref":true,"refselDac0ref":"Internal 1.024V reference"}}}},"module8":{"scriptId":"@mchp-mcc/data-streamer-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic-drv-interface","version":"^2.1.0"},"handle":{"providerId":"module23","exportId":"uart_basic_drv_interface"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"software":{"dataStreamerTable":[{"rowId":0.0,"uid":"defaultRow_0","varName":"dacVal","varType":"uint16_t"},{"rowId":1.0,"uid":"dynamicRow_1730713492275","dynamicallyAdded":true,"varName":"opampVal","varType":"uint16_t"}]}}}},"module48":{"scriptId":"@mchp-mcc/scf-avr8-opamp-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"DAC":{"interfaceId":{"name":"dac-general-parameters-avr8","version":"^0.1.0"},"handle":{"providerId":"module70","exportId":"DAC"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_opamp_v1":{"interfaceId":{"name":"scf-avr8-opamp-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"OPAMP"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"mode":"Single OPAMPs","tripleOpampConfiguration":"Instrumentation Amplifier","op1Enabled":false,"op2Enabled":false,"op0Configuration":"Voltage Follower"},"op0Hardware":{"muxposOp0inmux":"DAC output","op0CustomGain":"3"},"op1Hardware":{"muxposOp1inmux":"DAC output","op1CustomGain":"3"},"op2Hardware":{"op2CustomGain":"3"},"software":{"op0outAttribs":{"PD2":{"ioc":"NONE"}},"op1outAttribs":{"PD5":{"ioc":"NONE"}},"op2outAttribs":{"PE2":{"ioc":"NONE"}}},"global":{"irselPwrctrl":"FULL"}}}},"module1":{"scriptId":"@mchp-mcc/avr8-configuration-bits-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_main":{"interfaceId":{"name":"initializer-main","version":"^0.*"},"handle":{"providerId":"module0","exportId":"initializer_main"}},"avr8_configuration_bits_v1":{"interfaceId":{"name":"avr8-configuration-bits-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Configuration Bits"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module0":{"scriptId":"@mchp-mcc/main-manager","imports":{"main":{"interfaceId":{"name":"main-manager","version":"^1.*"},"handle":{"providerId":"mccDevice","exportId":"MAIN MANAGER"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{}},"module3":{"scriptId":"@mchp-mcc/pin-content-processor","imports":{"device-meta":{"interfaceId":{"name":"device-meta","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin-architecture":{"interfaceId":{"name":"pin-architecture","version":"1.0.0"},"handle":{"providerId":"module2","exportId":"pin-architecture"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"saved":{"meta":{"module":"module77"},"rows":{"pcp":{"GPIO$GPIO$input":{"pins":{"PB3":{"state":"MUL"}}},"GPIO$GPIO$output":{"pins":{"PB3":{"state":"L"}}}}},"userEditedData":{"cname":{"eview":{"PB3":"LED0"}}}}}},"module2":{"scriptId":"@mchp-mcc/avr8-pin-manager","imports":{"avr8-pin-manager":{"interfaceId":{"name":"avr8-pin-manager","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"Pin Manager"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0.*"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"adapterdata":{"cname":{"eview":{"dataMap":{"PB3":{"value":"LED0"}}}}}}},"module19":{"scriptId":"@mchp-mcc/scf-avr8-usart-v1","imports":{"osc_clock":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}},"scf_avr8_usart_v1":{"interfaceId":{"name":"scf-avr8-usart-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"USART3"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"interrupt":{"rxc":false},"hardware":{"rxenCtrlb":false}}}},"module46":{"scriptId":"@mchp-mcc/scf-avr8-rtc-v1","imports":{"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"scf_avr8_rtc_v1":{"interfaceId":{"name":"scf-avr8-rtc-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"RTC"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"prescalerCtrla":"RTC Clock / 32","requestedPeriodValue":1.0,"requestedCompareValue":0.0}}}},"module23":{"scriptId":"@mchp-mcc/uart-driver","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1.0.0"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"uart_basic":{"interfaceId":{"name":"uart-basic","version":"^6.0.0"},"handle":{"providerId":"module19","exportId":"uart_basic","label":"UART3"}}},"framewSpecificState":{"userEditedImports":["uart_basic"]},"payload":{"main":{"interrupt":{"interruptDriven":false}}}},"module77":{"scriptId":"@mchp-mcc/scf-avr8-adc-v1","imports":{"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"adc_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0"},"handle":{"providerId":"module9","exportId":"VREF"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"osc_clocks":{"interfaceId":{"name":"osc-clocks","version":"^0"},"handle":{"providerId":"module5","exportId":"osc_clocks"}},"scf_avr8_adc_v1":{"interfaceId":{"name":"scf-avr8-adc-v1","version":"1.0.0"},"handle":{"providerId":"mccDevice","exportId":"ADC0"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"resselCtrla":"10-bit mode","leftadjCtrla":false,"muxposMuxpos":"ADC input pin 2"},"interrupt":{"resrdyIntctrl":true},"clockSettgins":{"sampnumCtrlb":"8 results accumulated","sampleLen":1.0},"software":{"anxattribspinkey1":{}}}}},"module70":{"scriptId":"@mchp-mcc/scf-avr8-dac-v1","imports":{"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}},"pin_standard":{"interfaceId":{"name":"pin-standard","version":"^0"},"handle":{"providerId":"module3","exportId":"pin-standard"}},"scf_avr8_dac_v1":{"interfaceId":{"name":"scf-avr8-dac-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"DAC0"}},"dac_reference_voltage":{"interfaceId":{"name":"vref-general-parameters","version":"^0.1.0"},"handle":{"providerId":"module9","exportId":"VREF"}},"initializer_system":{"interfaceId":{"name":"initializer-system","version":"^0"},"handle":{"providerId":"module1","exportId":"initializer_system"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"outenCtrla":true}}}},"module81":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB0"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"hardware":{"clkselCtrla":"DIV1","timerPeriod":4.3E-4},"advanced":{"runstdbyCtrla":true},"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true}}}},"module80":{"scriptId":"@mchp-mcc/scf-avr8-tcb-v1","imports":{"sys_init_basic_interface":{"interfaceId":{"name":"sys-init-basic-interface","version":"^1"},"handle":{"providerId":"module1","exportId":"sys_init_basic_interface"}},"scf_avr8_tcb_v1":{"interfaceId":{"name":"scf-avr8-tcb-v1","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"TCB1"}},"pins_interface":{"interfaceId":{"name":"pins-interface","version":"^1"},"handle":{"providerId":"module3","exportId":"pins-interface"}},"clock_basic_interface":{"interfaceId":{"name":"clock-basic-interface","version":"^1"},"handle":{"providerId":"module5","exportId":"clock_basic_interface"}},"interrupt_standard":{"interfaceId":{"name":"interrupt-standard","version":"^1"},"handle":{"providerId":"module4","exportId":"interrupt"}},"device_meta":{"interfaceId":{"name":"device-meta","version":"^1"},"handle":{"providerId":"mccDevice","exportId":"meta"}}},"framewSpecificState":{"userEditedImports":[]},"payload":{"main":{"pin":{"ccmpenCtrlb":true},"interrupt":{"captIntctrl":true,"generateISR":true},"hardware":{"timerPeriod":0.00125}}}}},"content":{"@mchp-mcc/avr-8bit":"4.11.0","@mchp-mcc/scf-avr8-dac-v1":"4.0.10","@mchp-mcc/data-streamer-driver":"2.0.1","@mchp-mcc/scf-avr8-tcb-v1":"6.0.0","@mchp-mcc/avr8-pin-manager":"4.6.1","@mchp-mcc/scf-avr8-adc-v1":"4.2.6","@mchp-mcc/scf-avr8-interrupt-v1":"5.0.12","@mchp-mcc/scf-avr8-usart-v1":"10.2.0","@mchp-mcc/main-manager":"3.1.2","@mchp-mcc/scf-avr8-opamp-v1":"1.0.7","@mchp-mcc/scf-avr8-rtc-v1":"4.2.5","@mchp-mcc/pin-content-processor":"3.9.0","@mchp-mcc/uart-driver":"1.10.2","@mchp-mcc/scf-avr8-vref-v1":"4.0.3","@mchp-mcc/scf-avr8-clkctrl-v3":"2.0.10","@mchp-mcc/avr8-configuration-bits-v1":"4.2.14"}}
+
+
+
+
+ main.c
+ 8c0f34e8f96915ad988aa3ea4806527b58b1baf7cd2b4b48ea095186ec987daf
+
+
+ mcc_generated_files\adc\adc0.h
+ 9745d0a3ed92e097097ed23d6f5d20aeaad97ae5ab197d16969759411e89db3e
+
+
+ mcc_generated_files\adc\src\adc0.c
+ dc6e58ebd730df7ed83de9164ca01375a68c9920d76bdde04a879621de7e9985
+
+
+ mcc_generated_files\dac\dac0.h
+ 0549c6cb256039e641849689faac07bd2cdf824d89e7651010b851bdabd5ae5d
+
+
+ mcc_generated_files\dac\src\dac0.c
+ 3b967ab389e7669b5b2fcd31bd20b78c67003f81104d14a98c27dca231cdff0b
+
+
+ mcc_generated_files\data_streamer\data_streamer.ds
+ 3721ae781b96b0bd26a19283e767918b5cea96a3f094f07a22f80819c8656aa7
+
+
+ mcc_generated_files\data_streamer\data_streamer.h
+ fe53812ab04c7af2990c90247b0917b55cb8cf59c7327cdc38735efbc95258b1
+
+
+ mcc_generated_files\data_streamer\src\data_streamer.c
+ f6b1ef7fe11e0343605365ce7bfc7af81cdc33bf43770f5cfd78cf17a49534c5
+
+
+ mcc_generated_files\opamp\opamp.h
+ 2a5cdcd9a567f8f7824802775af651a04f3ecca0a7ef6d4dcd3a4f7aa1965ad6
+
+
+ mcc_generated_files\opamp\src\opamp.c
+ 22ff99604efcc876c7b23d31d899423d0d715aeb41e0944f0d06937830854e31
+
+
+ mcc_generated_files\system\ccp.h
+ 00d4c7f49db8510d0ad35d5b65b82db98d0da655c1ea8e81b657e00f49f2640e
+
+
+ mcc_generated_files\system\clock.h
+ 5342e3ba7f014024b35fe2eea86794d9bb9ec656c55311f8b96c34e9eac4b215
+
+
+ mcc_generated_files\system\config_bits.h
+ cfb3dfe72760dc2066638db643962b2a7db39169cfda29327dcb4d3ec4a26be3
+
+
+ mcc_generated_files\system\interrupt.h
+ 49902a470e198f90d0ea9db752f6313c7074811e1a4da98a4d1e8572db7378f5
+
+
+ mcc_generated_files\system\pins.h
+ b26ae4ef405bbc331b310b6ef9a6a5fdf0c3816b9de10d58e6f593013bcf5fdc
+
+
+ mcc_generated_files\system\port.h
+ b11a993ebf82a6c6f20be03184935a8a4cd3798f435debebdb8cb65da36f64fb
+
+
+ mcc_generated_files\system\protected_io.h
+ 72f5b206c649b31773ab739c0828b1eb6f88d99a27e0fc63f6a9f4119e632370
+
+
+ mcc_generated_files\system\src\clock.c
+ 8de3793d4c564ef1697ce28b5d0955018bc0d17d3a8ecb550ac3e53fa4405f7b
+
+
+ mcc_generated_files\system\src\config_bits.c
+ da35086390f11b66ed0afa138a8c6f5adf00722322388b38601d7253b3bee4b1
+
+
+ mcc_generated_files\system\src\interrupt.c
+ e27867b94747dfcde0538b371a10abd3f95c1516a59d4180fc07d5ccf28697a4
+
+
+ mcc_generated_files\system\src\pins.c
+ 3cfd1d61e1d694a5c57b129cb368eab8061a3614a895d109e46b483daaef0e35
+
+
+ mcc_generated_files\system\src\protected_io.S
+ 4b140dbb376219b5a3da75f0eb4d64e14c8baef82193b7b562ad74cfed7d3348
+
+
+ mcc_generated_files\system\src\system.c
+ 7ec1ba179d9e866aa7ec5c242df4667903d9e9cfacb38b157e535969e92840a7
+
+
+ mcc_generated_files\system\system.h
+ d024b1816588238869dcbbafffa667f0d46215c13d079a5e1cfcf90c1d4641de
+
+
+ mcc_generated_files\system\utils\assembler.h
+ ef3dab91390b4a198c234566994c23272765931378bb3d0aa94670e39e6e0d26
+
+
+ mcc_generated_files\system\utils\assembler\gas.h
+ 667f6ffee6461d9ad79483b20b02a35dfc4ad60bf0418e2ecbd19df4991dc38d
+
+
+ mcc_generated_files\system\utils\assembler\iar.h
+ 53c9ca51da473f3a6ae6e42f4056df249a058f10ece6f749e5bdd1ea3ed7a385
+
+
+ mcc_generated_files\system\utils\atomic.h
+ 19307b79f5a6af4e7cc53b21a4736a674bc97bdaa5b381d8f0bdfd008bd48b9a
+
+
+ mcc_generated_files\system\utils\compiler.h
+ 7b9b32dc17152d0780506dc95a87e10ba2f9238d1f2e9d7ad8f7493000036fc0
+
+
+ mcc_generated_files\system\utils\interrupt_avr8.h
+ e4084c0e62035baf526b13eb8e403cde7b00331045cd04839520c845bb0707a6
+
+
+ mcc_generated_files\system\utils\utils.h
+ 1c920a9d95628ccae7945d16093b8d2407f5a5f27dc63c6256b9c52d3ec363f2
+
+
+ mcc_generated_files\system\utils\utils_assert.h
+ d347e0636652e48c7fb7c186ae4336f343801e0acdca339cc724db0807b4fff3
+
+
+ mcc_generated_files\timer\rtc.h
+ 30de4216e54591b4ce33fa8b85e391383b5612c6040cabae2de0dd78b7a2160e
+
+
+ mcc_generated_files\timer\src\rtc.c
+ 8306e8e939cd5445e08215704a3738c4d52084a12ab6b19f0d89add90d79386e
+
+
+ mcc_generated_files\timer\src\tcb0.c
+ cee852845480c8d90f838e23532e7b6058e717fc70e062fb71916779af420776
+
+
+ mcc_generated_files\timer\src\tcb1.c
+ 81c562f8f043f9648e8844fc8b485964b979a58be45985955bb94f93b103db00
+
+
+ mcc_generated_files\timer\tcb0.h
+ 7a1288fc46858406f1c51ae2f96e5853335aca54d6a69ba94fd1c4d7fe553a73
+
+
+ mcc_generated_files\timer\tcb0_deprecated.h
+ 694cb27180c8eefa7d095e8398ca24bf46b04b63a96cb3d13ffc5df87af08e9e
+
+
+ mcc_generated_files\timer\tcb1.h
+ fcee68e8303016d74505dc8d89515bd6562365c9e1416cf08a13b8f7dfe5e933
+
+
+ mcc_generated_files\timer\tcb1_deprecated.h
+ 7f72627208907e46457461ba1aa1514f055bfb43aec861be0d4c8362663c7766
+
+
+ mcc_generated_files\uart\src\usart3.c
+ 50b378761bf7037897f4212befb6d1ac88bdafd88d3cfddb712b3de22b66b91c
+
+
+ mcc_generated_files\uart\uart_drv_interface.h
+ ad5aaf8976724442bdcbffa3c53527147f62a3745058de17e68c8ef5c3204e6e
+
+
+ mcc_generated_files\uart\uart_types.h
+ b7d15f2c3333652fa797c51b4abb616deaa4fff2224347f096c4b40b39963aaa
+
+
+ mcc_generated_files\uart\usart3.h
+ a0408604af9d136ef752a2b7d35f8bc7ee8c385f66f2051433e88799dad7700b
+
+
+ mcc_generated_files\vref\src\vref.c
+ 52d1bf2631a676c72c50988e6db10fb708f758c997f71e6b4cc601cd1eb9b898
+
+
+ mcc_generated_files\vref\vref.h
+ 45d7853bf4d55b39db01525bd3e376e180f317ac74992a5e49ca9436865cbc50
+
+
+
\ No newline at end of file