Shield Code 6.0
Loading...
Searching...
No Matches
Max1148.hpp File Reference

Header file for the Max1148 library for Dartmouth's 317 Lab. Manages ADC communication through SPI. More...

#include <Arduino.h>
#include <SPI.h>
Include dependency graph for Max1148.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Max1148
 Manages interfacing with Max1148 ADC. More...
 

Macros

#define SPI_SPEED   2000000
 
#define SPI_MODE   SPI_MODE0
 
#define ADC_CHANNEL   0
 
#define ADC_PIN   10
 
#define ADC_CS_PIN   10
 
#define ADC_READ   0x00
 

Enumerations

enum class  Channel : uint8_t {
  CHAN0 = 0x8F , CHAN1 = 0xCF , CHAN2 = 0x9F , CHAN3 = 0xDF ,
  CHAN4 = 0xAF , CHAN5 = 0xEF , CHAN6 = 0xBF , CHAN7 = 0xFF
}
 Control bytes for the Max1148 ADC. Only modifiable parameter is the channel. We use single ended, unipolar conversion, and external clock mode. Note that the old code used internal clock. More...
 

Detailed Description

Header file for the Max1148 library for Dartmouth's 317 Lab. Manages ADC communication through SPI.

Each Max1148 object should correspond to an ADC channel. The channel is set in the constructor. This makes dealing with the 4 ADCs on the new set up quite simple.

This is really just the Max1147 library from the Isinglass/Apophis shield code rewritten for the new board. Written by Jacob at some point unknown to me.

See the data sheet for more information - https://www.analog.com/media/en/technical-documentation/data-sheets/MAX1146-MAX1149.pdf

Author
Sean Wallace
Date
2024-06-25

Definition in file Max1148.hpp.

Macro Definition Documentation

◆ ADC_CHANNEL

#define ADC_CHANNEL   0

Definition at line 34 of file Max1148.hpp.

◆ ADC_CS_PIN

#define ADC_CS_PIN   10

Definition at line 36 of file Max1148.hpp.

◆ ADC_PIN

#define ADC_PIN   10

Definition at line 35 of file Max1148.hpp.

◆ ADC_READ

#define ADC_READ   0x00

Definition at line 37 of file Max1148.hpp.

◆ SPI_MODE

#define SPI_MODE   SPI_MODE0

Definition at line 33 of file Max1148.hpp.

◆ SPI_SPEED

#define SPI_SPEED   2000000

Definition at line 32 of file Max1148.hpp.

Enumeration Type Documentation

◆ Channel

enum class Channel : uint8_t
strong

Control bytes for the Max1148 ADC. Only modifiable parameter is the channel. We use single ended, unipolar conversion, and external clock mode. Note that the old code used internal clock.

Enumerator
CHAN0 
CHAN1 
CHAN2 
CHAN3 
CHAN4 
CHAN5 
CHAN6 
CHAN7 

Definition at line 44 of file Max1148.hpp.