44 virtual float GetRefValue(
int select,
float vcc) = 0;
109 virtual float GetValue(
int select,
float vcc) = 0;
112 void SetMuxSelect(
int select);
113 void PinStateHasChanged(
Pin*);
128 virtual float GetValue(
int select,
float vcc);
148 virtual float GetValue(
int select,
float vcc);
149 virtual float GetValueAComp(
int select,
float vcc);
164 virtual float GetValue(
int select,
float vcc);
165 virtual bool IsDifferenceChannel(
int select);
176 virtual float GetValue(
int select,
float vcc);
177 virtual bool IsDifferenceChannel(
int select);
200 virtual float GetValue(
int select,
float vcc);
250 bool IsPrescalerClock(
void);
251 bool IsFreeRunning(
void);
252 virtual int GetTriggerSource(
void);
253 int ConversionBipolar(
float value,
float ref);
254 int ConversionUnipolar(
float value,
float ref);
278 unsigned int CpuCycle();
280 unsigned char GetAdch(
void);
281 unsigned char GetAdcl(
void);
285 void SetAdcsrA(
unsigned char);
286 void SetAdcsrB(
unsigned char);
287 void SetAdmux(
unsigned char val);
289 void ClearIrqFlag(
unsigned int vec);
292 void NotifySignalChanged(
void);
298 bool IsSetACME(
void) {
return (adcsrb & ACME) == ACME; }
319 unsigned char set_from_reg(
const IOSpecialReg* reg,
unsigned char nv);
unsigned char GetAdmux(void)
ADC reference is selected on 3 or 4 different sources: Vcc, aref pin, bandgap or 2.56V reference.
Basic AVR device, contains the core functionality.
0:aref, 1:vcc, 2:bg, 3:2.56V
0:aref, 1:vcc, 2:-, 3:2.56V
void RegisterNotifyClient(AnalogSignalChange *client)
Register analog comparator for notification of multiplexer signal change.
HWARef8(AvrDevice *_core, Pin *_refpin)
virtual float GetRefValue(int select, float vcc)=0
unsigned char GetAdcsrA(void)
void UnregisterNotifyClient(void)
Unregister client for signal change notification.
unsigned char GetAdcsrB(void)
Pin class, handles input and output to external parts.
AnalogSignalChange * notifyClient
ADC reference is selected on 4 diff. sources: Vcc, aref pin, bandgap or 2.56V reference.
ADC reference is taken from special ADREF pin (no port pin)
Interface class to connect hardware units to control registers.
void RegisterNotifyClient(AnalogSignalChange *client)
ADC type M16: ADC on atmega16 and atmega32.
int numPins
Multiplexer channel, can't be used for ADC sampling because of buffering on conversion start! ...
Build a register for TraceValue's.
ADC type M8: ADC on atmega8.
ADC type M64: ADC on atmega64.
Reference source for ADC (base class)
HWAdmux(AvrDevice *_core, int _pins)
ADC type M164: ADC on atmega164/324/644/1284 and at90can32/64/128.
ADC type 4433: ADC on at90s/l4433.
ADC type T25: ADC on attiny25/45/85.
bool IsADEnabled(void)
Check, if ADC is enabled.
virtual float GetValueAComp(int select, float vcc)
ADC type M128: ADC on atmega128.
AnalogSignalChange * notifyClient
float GetADMuxValue(float vcc)
Get analog value from ADC multiplexer.
bool IsSetACME(void)
Check, if ACME bit is set, return false, if not available.
void UnregisterNotifyClient(void)
virtual bool IsDifferenceChannel(int select)
ADC type M48: ADC on atmega48/88/168/328.
unsigned char get_from_client(const IOSpecialReg *reg, unsigned char v)
virtual int GetTriggerSource(void)