attiny icon indicating copy to clipboard operation
attiny copied to clipboard

Add analogReference Functionality

Open Merrr opened this issue 10 years ago • 5 comments

Full functionality for analogReference:

  • DEFAULT: Use VCC as ref
  • INTERNAL/INTERNAL1V1: Use internal 1v1 as ref
  • INTERNAL2V56: Use internal 2v56 as ref
  • EXTERNAL: Use external ref (not tested!)

Merrr avatar May 07 '14 20:05 Merrr

Adding analogReference() support would be great (if it doesn't work right now). But this patch looks like it's against the old "pre1" ATtiny files that included their own version of the Arduino core. The current ATtiny support (in master for 1.0.x and ide-1.5.x) relies on the standard core file in the Arduino distribution. Do you want to look into supporting analogReference() for those branches (i.e. using the standard Arduino core)?

damellis avatar May 12 '14 18:05 damellis

It seems like it isn't possible putting modified Arduino.h and wiring_analog.c files somewhere to override the ones supplied by Arduino. Would it be okay to create a whole new core for this?

mischnic avatar Aug 26 '16 21:08 mischnic

I don't think this is worth including a whole new core for. I think it's important to avoid doing that because it gets out of sync with the main Arduino core and it's easy to fall behind on changes / bug fixes. If there are things that need to be changed in the core, we should try to get the Arduino repository updated. Do you want to open a pull request there?

damellis avatar Aug 26 '16 23:08 damellis

Here's the pull request: https://github.com/arduino/Arduino/pull/5300

mischnic avatar Aug 27 '16 10:08 mischnic

The pull request just got merged, the fix will be in Arduino 1.6.12 . @damellis This pull request can be closed.

mischnic avatar Sep 08 '16 20:09 mischnic