You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please implement the ADC for CircuitPython SeeSaw.
Some of the below can be simplified to achieve required functionality.
seesaw/include/RegisterMap.h
#define SEESAW_ADC_BASE 0x09
/****** STATUS *****/
#define SEESAW_ADC_STATUS 0x00
//this is asserted when this encorunters an error
#define SEESAW_ADC_STATUS_ERROR_BITS 0x01
//this is asserted when window monitor interrupt occurs
#define SEESAW_ADC_STATUS_WINMON 0x02
/****** INTENSET *****/
//writing a 1 to any of the bits in this register enables the interrupt
#define SEESAW_ADC_INTEN 0x02
// if this bit is set to 1, assert interrupt when window monitor conditions are met
#define SEESAW_ADC_INTEN_WINMON_BITS 0x01
/****** INTENCLR *****/
/* writing a 1 to any of these bits disables the interrupt.
* this automatically updates the inten register
*/
#define SEESAW_ADC_INTENCLR 0x03
// writing a 1 disables the window monitor interrupt
#define SEESAW_ADC_INTENCLR_WINMON_BITS 0x01
/****** WINMODE *****/
#define SEESAW_ADC_WINMODE 0x04
/****** WINTHRESH *****/
//window monitor thresholds
#define SEESAW_ADC_WINTHRESH 0x05
/****** CHANNELS *****/
#define SEESAW_ADC_CHANNEL_0 0x07
#define SEESAW_ADC_CHANNEL_1 0x08
#define SEESAW_ADC_CHANNEL_2 0x09
#define SEESAW_ADC_CHANNEL_3 0x0A
#define SEESAW_ADC_CHANNEL_4 0x0B
#define SEESAW_ADC_CHANNEL_5 0x0C
#define SEESAW_ADC_CHANNEL_6 0x0D
#define SEESAW_ADC_CHANNEL_7 0x0E
Please implement the ADC for CircuitPython SeeSaw.
Some of the below can be simplified to achieve required functionality.
seesaw/include/RegisterMap.h
Documentation: https://learn.adafruit.com/adafruit-seesaw-atsamd09-breakout/analog-to-digital-converter
CircuitPython Learn Guide: https://learn.adafruit.com/circuitpython-essentials/circuitpython-analog-in
The text was updated successfully, but these errors were encountered: