SpenceKonde / megaTinyCore

Arduino core for the tinyAVR 0/1/2-series - Ones's digit 2,4,5,7 (pincount, 8,14,20,24), tens digit 0, 1, or 2 (featureset), preceded by flash in kb. Library maintainers: porting help available!
Other
563 stars 148 forks source link

Error setting analog reference for Tiny-2 #1148

Open EclipseBoom opened 1 month ago

EclipseBoom commented 1 month ago

Using an Tiny826 chip and the latest core version on Arduino 2.3.3

When setting the analogReference I sometimes get a compilation error "Implicit Definition" or "Undefined symbol" i.e.

analogReference(INTERNAL2V048); // set reference to the desired voltage, and set that as the ADC reference.

Work Around:

By selecting a different family in the IDE Board Menu such as ATTiny3227... and then reselecting the correct family and chip. The compile will work properly and will continue to work properly. Seems like the correct analogReference option set is not being set properly the first time.