Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ADS1248 Class Reference
#include <ADS1248.h>
Public Types | |
| enum | reg |
register name list of ADS1248 More... | |
| enum | cmd |
commande list of ADS1248 More... | |
Public Member Functions | |
| ADS1248 (SPI &spi, PinName cs, PinName rdy, PinName start=NC) | |
| Create ADS1248 instance. | |
| void | start (bool en) |
| Access to output start pin. | |
| void | waitReady (void) |
| Wait ADS1248 to be ready (pooling method) | |
| void | sleep (bool en) |
| Sleep cmd of ADS1248 (ask waitReady) | |
| void | sync (void) |
| Synchronisation cmd of ADS1248. | |
| void | reset (void) |
| Reset cmd of ADS1248. | |
| int | read (void) |
| Read data when conversion was finished (ask waitReady) | |
| operator int () | |
| Ask read. | |
| unsigned char | readReg (unsigned char reg) |
| Read ADS1248 register. | |
| void | readReg (unsigned char reg, unsigned char *buff, int len) |
| Read ADS1248 registers. | |
| void | writeReg (unsigned char reg, unsigned char val) |
| Write ADS1248 register. | |
| void | writeReg (unsigned char reg, const unsigned char *buff, int len) |
| Write ADS1248 registers. | |
| void | systemOffsetCal (void) |
| System Offset Calibration cmd of ADS1248 (ask waitReady) | |
| void | systemGainCal (void) |
| System Gain Calibration cmd of ADS1248 (ask waitReady) | |
| void | selfOffsetCal (void) |
| Self Offset Calibration cmd of ADS1248 (ask waitReady) | |
Detailed Description
ADS1248 class.
Used for read ADS1248/7/6 Temperature ADC
Definition at line 9 of file ADS1248.h.
Member Enumeration Documentation
Constructor & Destructor Documentation
| ADS1248 | ( | SPI & | spi, |
| PinName | cs, | ||
| PinName | rdy, | ||
| PinName | start = NC |
||
| ) |
Create ADS1248 instance.
- Parameters:
-
SPI SPI bus to use cs pin to connect at CS input rdy pin connect at !rdy output start pin connect at start inpout (pullup if unused)
Definition at line 8 of file ADS1248.cpp.
Member Function Documentation
| operator int | ( | ) |
| int read | ( | void | ) |
Read data when conversion was finished (ask waitReady)
- Returns:
- 24bit data 2's complement
Definition at line 60 of file ADS1248.cpp.
| unsigned char readReg | ( | unsigned char | reg ) |
Read ADS1248 register.
- Parameters:
-
reg is register address
- Returns:
- register value
Definition at line 95 of file ADS1248.cpp.
| void readReg | ( | unsigned char | reg, |
| unsigned char * | buff, | ||
| int | len | ||
| ) |
Read ADS1248 registers.
- Parameters:
-
reg is first register address buff pointer on buffer to write len lenght of data to read
Definition at line 82 of file ADS1248.cpp.
| void reset | ( | void | ) |
Reset cmd of ADS1248.
Definition at line 49 of file ADS1248.cpp.
| void selfOffsetCal | ( | void | ) |
Self Offset Calibration cmd of ADS1248 (ask waitReady)
Definition at line 138 of file ADS1248.cpp.
| void sleep | ( | bool | en ) |
Sleep cmd of ADS1248 (ask waitReady)
- Parameters:
-
en for wakeup or sleep
Definition at line 29 of file ADS1248.cpp.
| void start | ( | bool | en ) |
Access to output start pin.
- Parameters:
-
en start pin state
Definition at line 20 of file ADS1248.cpp.
| void sync | ( | void | ) |
Synchronisation cmd of ADS1248.
Definition at line 39 of file ADS1248.cpp.
| void systemGainCal | ( | void | ) |
System Gain Calibration cmd of ADS1248 (ask waitReady)
Definition at line 128 of file ADS1248.cpp.
| void systemOffsetCal | ( | void | ) |
System Offset Calibration cmd of ADS1248 (ask waitReady)
Definition at line 118 of file ADS1248.cpp.
| void waitReady | ( | void | ) |
Wait ADS1248 to be ready (pooling method)
Definition at line 24 of file ADS1248.cpp.
| void writeReg | ( | unsigned char | reg, |
| const unsigned char * | buff, | ||
| int | len | ||
| ) |
Write ADS1248 registers.
- Parameters:
-
reg is first register address buff pointer on buffer to read len lenght of data to write
Definition at line 101 of file ADS1248.cpp.
| void writeReg | ( | unsigned char | reg, |
| unsigned char | val | ||
| ) |
Write ADS1248 register.
- Parameters:
-
reg is register address val value to write
Definition at line 114 of file ADS1248.cpp.
Generated on Sat Jul 16 2022 23:46:51 by
1.7.2