Skip to content

Commit b2e0b5e

Browse files
committed
minor changes
1 parent dde7e20 commit b2e0b5e

8 files changed

Lines changed: 201 additions & 204 deletions

File tree

megaavr/extras/Ref_Analog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ At least there's a plausible use of the DAC input: recognizing that the voltage
143143
`?` The DD-series lists a "BGTEMPSENSE" option in preliminary material, but it was removed by launch. It is unclear if this was ever implemented or if it exists in the silicon.
144144

145145
### Measuring VDD and Temperature
146-
See [the example we give for very talkative implementation](../libraries/megaTinyCore/examples/ReadTempVcc/ReadTempVcc.ino) and the [megaTinyCore.h library](../libraries/megaTinycore/README.md) which provides ready-to-use function calls for these measurements.
146+
See [the example we give for very talkative implementation](../libraries/megaTinyCore/examples/readTempVcc/readTempVcc.ino) and the [megaTinyCore.h library](../libraries/megaTinyCore/README.md) which provides ready-to-use function calls for these measurements.
147147

148148

149149
#### Measuring VDD on 0/1-series

megaavr/libraries/PTC/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ The ptc_ch_bm_t is a typedef that depends on the pincount of the device and rang
9494

9595
### PTC Operation
9696
![PTC_InnerWorkings](https://github.com/MX682X/ptc_touch/assets/58419867/823c487c-0633-4031-b381-45e7a32867fb)
97-
(Source: [Microchip's PTC Subsystem Firmware User's Guide](<https://web.archive.org/web/20221225142000/https://www.mouser.com/pdfdocs/SAMA5D2_PTC_Firmware_UG.pdf>))
98-
This schematic was made for a different chip, but it is likely to look similar on the AVRs.
97+
(Source: [Microchip's PTC Subsystem Firmware User's Guide](https://web.archive.org/web/20221225142000/https://www.mouser.com/pdfdocs/SAMA5D2_PTC_Firmware_UG.pdf))
98+
This schematic was made for a different chip, but it is likely to look similar to this on the AVRs.
9999

100100
Most of the following is a hypothesis based on the publicly available documentation and observation.
101101
The PTC is using a charge transfer between a variable and a fixed capacitance to measure a difference between those two. The variable capacitance in this case is the sensor electrode and the fixed one is the internal Cc. The neat thing about having a dedicated hardware for this, is that Cc is not really fixed, compared to the Sample-and-Hold capacitor of the normal ADC, it can be calibrated to be about the same as the electrode we want to measure (See below).
@@ -115,7 +115,7 @@ If you have trouble understanding: Imagine two equally sized volumes connected t
115115

116116
Based on the documentation found online, the PTC has an internal, tunable capacitor connected after the series resistance to ground that is used to compensate the parasitic capacitance of the electrodes. Every node starts with a default compensation value. As soon as the node is enabled, the library attempts to find a compensation setting that will result in an ADC value of about 512 counts (1/2 of ADC resolution). Based on oscilloscope readings, it can also be said that the PTC tries to have a charge of 50% VCC on the electrode when being acquired. This is the also the reason, why the digital input function of the pins is disabled.
117117

118-
The maximum compensation is about 30pF for Mutual-cap and about 50pF for Self-cap. It is possible to get the compensation capacitance with uint16_t ptc_get_node_cc_femto(cap_sensor_t* node); - however this function has to do a lot of calculations and is thus a bit bloat-y. It will also return the value in femto farrads, to avoid floats. Read more here: <https://www.microchipdeveloper.com/touch:guide-to-interpret-cc-calibration-value>
118+
The maximum compensation is about 30pF for Mutual-cap and about 50pF for Self-cap. It is possible to get the compensation capacitance with uint16_t ptc_get_node_cc_femto(cap_sensor_t* node); - however this function has to do a lot of calculations and is thus a bit bloat-y. It will also return the value in femto farrads, to avoid floats. Read more here: (dead link pruned; I don't know what document it was, I don't think I've seen it).
119119

120120
Different pins have a different parasitic capacitance. I suspect this is depends on the internal circuitry and alternative functions, so it's normal to see some difference with pins next to each other.
121121

megaavr/libraries/PTC/library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=1.1.0
33
author=MX682X
44
maintainer=MX682X
55
sentence=This library (experimental) allows a straightforward use of the Peripheral Touch Controller (PTC)
6-
paragraph=The PTC contains hardware to assist in touch detection. This library helps taking leverage of this peripheral.
6+
paragraph=The PTC contains hardware to assist in touch detection. This library helps taking leverage of this peripheral<br>Supports only the 1-Series AtTiny chips.<br>Tested with 1614 so far<br>feedback appreciated!
77
category=Sensors
88
includes=ptc.h
99
url=https://github.com/SpenceKonde/megaTinyCore/tree/master/megaavr/libraries/PTC
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name=tinyNeoPixel
2-
version=2.0.7
2+
version=2.0.8
33
author=Adafruit (modified by Spence Konde)
44
maintainer=Spence Konde <spencekonde@gmail.com>
55
sentence=Arduino library for controlling single-wire-based LED pixels and strip for all modern (post 2016) AVR microcontrollers, and distributed with megaTinyCore and DxCore.
6-
paragraph=This library is closely based on the original Adafruit_NeoPixel library. It has been modified to account for the improved ST performance on the tinyAVR 0-series, tinyAVR 1-series and megaAVR 0-series, and add support for speeds from 4 MHz to 48 MHz. No specific actions to choose the port the port at any speed (enabled by ST improvements). Please refer to the documentation for more information.<br>2.0.7 - Fix critical defect in 10 and 12 MHz implementations which would output the first bit only.<br/> 2.0.6 - correct naming of labels in asm to conform with our naming policy. Add show(number), which will show up to the first (number) leds. This allows the static allocation version to light up a varying number of LEDs. 2.0.5 - correct some timing and compile issues at certain speeds. <br/> 2.0.4 - Add support for operation at speeds as low as 4 MHz. Ensure that the inline assembly is specified correctly. <br/>2.0.3 - Fix issue when millis is disabled.
6+
paragraph=This library is closely based on the original Adafruit_NeoPixel library. It has been modified to account for the improved ST performance on the tinyAVR 0-series, tinyAVR 1-series and megaAVR 0-series, and add support for speeds from 4 MHz to 48 MHz. No specific actions needed to choose the port the port at any speed (enabled by ST improvements). Please refer to the documentation for more information.<br>2.0.8 - make member variables protected, like they are on Adafruit version, alloweing richer subclassing.<br>2.0.7 - Fix critical defect in 10 and 12 MHz implementations which would output the first bit only.<br/> 2.0.6 - correct naming of labels in asm to conform with our naming policy. Add show(number), which will show up to the first (number) leds. This allows the static allocation version to light up a varying number of LEDs. 2.0.5 - correct some timing and compile issues at certain speeds. <br/> 2.0.4 - Add support for operation at speeds as low as 4 MHz. Ensure that the inline assembly is specified correctly. <br/>2.0.3 - Fix issue when millis is disabled.
77
category=Display
88
url=https://github.com/SpenceKonde/megaTinyCore/blob/master/megaavr/extras/tinyNeoPixel.md
99
architectures=megaavr

megaavr/libraries/tinyNeoPixel_Static/examples/strandtest/strandtest.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <tinyNeoPixel_Static.h>
22

3-
#define PIN 3
3+
#define PIN PIN_PA3
44

55
// Parameter 1 = number of pixels in strip
66
// Parameter 2 = Arduino pin number (most are valid)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name=tinyNeoPixel Static
2-
version=2.0.7
1+
name=tinyNeoPixel_Static
2+
version=2.0.8
33
author=Adafruit (modified by Spence Konde)
44
maintainer=Spence Konde <spencekonde@gmail.com>
55
sentence=Arduino library for controlling single-wire-based LED pixels and strip for all modern (post 2016) AVR microcontrollers, and distributed with megaTinyCore and DxCore.
6-
paragraph=This library is closely based on the original Adafruit_NeoPixel library. It has been modified to account for the improved ST performance on the tinyAVR 0-series, tinyAVR 1-series and megaAVR 0-series, and add support for speeds from 4 MHz to 48 MHz. No specific actions to choose the port the port at any speed (enabled by ST improvements). Please refer to the documentation for more information.<br>2.0.7 - Fix critical defect in 10 and 12 MHz implementations which would output the first bit only.<br/> 2.0.6 - correct naming of labels in asm to conform with our naming policy. Add show(number), which will show up to the first (number) leds. This allows the static allocation version to light up a varying number of LEDs. 2.0.5 - correct some timing and compile issues at certain speeds. <br/> 2.0.4 - Add support for operation at speeds as low as 4 MHz. Ensure that the inline assembly is specified correctly. <br/>2.0.3 - Fix issue when millis is disabled.
6+
paragraph=This library is closely based on the original Adafruit_NeoPixel library. It has been modified to account for the improved ST performance on the tinyAVR 0-series, tinyAVR 1-series and megaAVR 0-series, and add support for speeds from 4 MHz to 48 MHz. No specific actions needed to choose the port the port at any speed (enabled by ST improvements). Please refer to the documentation for more information.<br>2.0.8 - make member variables protected, like they are on Adafruit version, alloweing richer subclassing.<br>2.0.7 - Fix critical defect in 10 and 12 MHz implementations which would output the first bit only.<br/> 2.0.6 - correct naming of labels in asm to conform with our naming policy. Add show(number), which will show up to the first (number) leds. This allows the static allocation version to light up a varying number of LEDs. 2.0.5 - correct some timing and compile issues at certain speeds. <br/> 2.0.4 - Add support for operation at speeds as low as 4 MHz. Ensure that the inline assembly is specified correctly. <br/>2.0.3 - Fix issue when millis is disabled.
77
category=Display
88
url=https://github.com/SpenceKonde/megaTinyCore/blob/master/megaavr/extras/tinyNeoPixel.md
99
architectures=megaavr

0 commit comments

Comments
 (0)