Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadFromConsecutiveRegisters ¶
Use this function to check what data is stored at what registers. The starting register and the number of registers to read must be specified.
func RegisterMatch ¶
checks if the data returned from a register read matches the data that was initially sent - use this to ensure you properly set your registers
func WriteToConsecutiveRegisters ¶
This writes data to consecutive registers. You need to specify the starting register and the byte slice of data to write. It will go down the slice and write one byte to each consecutive register starting from the one specified. Please see the datasheet for more information. The WREG opcode is used here and uses the same programming on multiple different TI ADCs
Types ¶
type Register ¶
type Register struct { Name string Address byte Defaultvalue byte //use the function Setregister with values from the constants file or you can also set this manually by looking at the datasheet. Setvalue byte }
func NewRegister ¶
Use this to create a register to then set using the setregister function
func (*Register) Setregister ¶
This function sets the register data byte according to the settings specified. PLEASE make sure to list either ALL settings for a given register OR the default value. For examp if you want to change the POWER register on the ADS126x to enable vbias, make sure to also include the setting for the internal reference which is also controlled by that register. This will ensure that the registers are set exactly as you intended. The lists of all possible settings for registers are listed in the constants file for that device.
Directories ¶
Path | Synopsis |
---|---|
To test out this library with this product - https://www.waveshare.com/18983.htm - It works but is not ideal for precision measurement for many reasons - Primarily that the ADC is powered from the Raspberry Pi which adds a huge source of noise.
|
To test out this library with this product - https://www.waveshare.com/18983.htm - It works but is not ideal for precision measurement for many reasons - Primarily that the ADC is powered from the Raspberry Pi which adds a huge source of noise. |
Package supports use of Texas Insturments ADS1262 and ADS1263 32-bit analog to digital converters
|
Package supports use of Texas Insturments ADS1262 and ADS1263 32-bit analog to digital converters |