MCC 152
Voltage Output and DIO DAQ HAT for Raspberry Pi®
Features• Two 12-bit simultaneousvoltage outputs• 5 mA output drive, sourcing• 0.8 V/µs slew rate
• Eight bidirectional digital bits
• 5V / 3.3V operation;
CMOS input thresholds• Programmable input polarity• Screw terminal connections
The MCC 152 is a 12-bit analog voltage output and digital input/output DAQ HAT. The
MCC 152 is shown here connected to a Raspberry Pi (not included).

Overview
The MCC 152 is a voltage output and digital input/output HAT (Hardware Attachedon Top) designed for use with Raspberry Pi, the most popular single-board computer on the market today.
A HAT is an add-on board with a 40W GPIO (general purpose input/output) connector that conforms to the Raspberry Pi HAT specification.
The MCC 152 HAT provides two analog outputs and eight digital I/O bits. Up toeight MCC HATs can be stacked onto one Raspberry Pi. With CMOS input thresholds, selectable voltage operation, and 5 V tolerance for the digital inputs, thedigital channels support both 3.3 V and 5 V logic types.

• Stack up to eight MCC HATs
onto a single Raspberry Pi

Software• MCC DAQ HAT Library;
available on GitHub

Supported Operating Systems• Linux®/Raspbian

Programming API• C, C++, Python

Raspberry Pi InterfaceAnalog Voltage Output

PowerThe MCC 152 header plugs into the 40-pin
general purpose I/O (GPIO) connector on auser-supplied Raspberry Pi. The MCC 152
was tested for use with all Raspberry Pi
models with the 40-pin GPIO connector.

The MCC 152 provides two 12-bit analog
outputs with a 0 V to 5 V output range
and 5 mA output drive, sourcing. Bothoutputs can be updated simultaneouslywith software.

Power is provided by the Raspberry Pi
through the GPIO header connector.

HAT configuration

Digital I/O

HAT configuration parameters are stored
in an on-board EEPROM that allows theRaspberry Pi to automatically set up theGPIO pins when the HAT is connected.

Stackable HATs
Up to eight MCC HAT boards can bestacked onto a single Raspberry Pi. Users
can mix and match MCC HAT models
in the stack.

The MCC 152 provides eight bidirectional
digital bits.
Each digital bit is configurable for pull-up
or pull-down, or can be disabled. Eachoutput bit can source 10 mA and sink
25 mA.
Users can configure the software to generate an interrupt when the state of a digital
input bit changes.

MCC DAQ HAT Library
The open-source MCC DAQ HAT Libraryof commands in C/C++ and Python
allows users to develop applications on
the Raspberry Pi using Linux.
The library is available to download fromGitHub. Comprehensive API and hardware documentation is available.
The MCC DAQ HAT Library supports
operation with multiple MCC DAQ HATs
running concurrently.
Console-based example programs areavailable for each API.

The MCC 152 can interface with 3.3 V or
5 V logic types; the voltage is selectablewith an onboard jumper.
The input polarity is software programmable for normal (active high, default)
or inverted logic (active low).

Measurement Computing(508) 946-5100

1

info@mccdaq.com

mccdaq.com

MCC 152
Block Diagram and Example Programs

5.25 V
boost
DC-DC

Screw Terminals

Analog Outputs

2

Dual 12-bit DAC
SPI
I2C

Digital I/O

8

Board
Address
Matching

SPI
I2C

Raspberry PiHeader

I/O
ExpanderHATEEPROM
Interrupt

VIO

W3 jumper5V/3.3V

MCC DAQ HAT Examples
The MCC DAQ HAT Library includes console-based example
programs developed in C/C++ and Python that users can run tobecome familiar with the library and the MCC 152.
Each example includes a description and a list of the functions
demonstrated in the program. An example is shown here.
Users can verify MCC 152 functionality out-of-the-box by running the MCC 152 App from the MCC DAQ HAT Manager utility
program. This utility requires the Raspbian desktop interface,
and is accessible from the Applications menu.
Ready-to-run examples are included with the DAQ HAT library

Stackable
Connect up to eight MCC DAQ HATs onto a single
Raspberry Pi. Onboard jumpers identify each board inthe stack.

Measurement Computing(508) 946-5100

2

info@mccdaq.com

mccdaq.com

MCC 152
Specifications and Ordering
Specifications

High level output current: 10 mA max4
Low level output current: 25 mA max
Output high voltage
VIO = 3.3 V: 2.5 V min (IOH = –10 mA)
VIO = 5 V: 4.0 V min (IOH = –10 mA)
Output low voltage
VIO = 3.3 V: 0.25 V max (IOL = 10 mA)
VIO = 5 V: 0.2 V max (IOL = 10 mA)

All specifications are subject to change without notice.
Typical for 25 ˚C unless otherwise specified.

Analog output

Resolution: 12 bits, 1 in 4,096
Output range: 0 V to 5.0 V
Number of channels: 2Write time: 12 µs, typPower on and reset voltage (Initializes to 000h code): 0 V, ±10 mV
Output drive (each D/A OUT): 5 mA, sourcing
Slew rate: 0.8 V/µs typ
Differential nonlinearity: ±0.25 LSB max
Zero-scale error1 (000h code): 2 mV typ, 10 mV max
Full-scale error2 (FFFh code): -0.1 % of FSR typ, ±1 % of FSR max
Offset error2: ±1 mV typ, ±10 mV max
Gain error 2: ±1.5 % of FSR max

MemoryNon-volatile memory: 4 KB (ID and serial storage, no user-modifiable memory)

Power

Supply current, 5V supply
Typical, 5V DIO selection: 15 mA
Maximum, 5V DIO selection: 35 mA5 , 6Typical, 3.3V DIO selection: 10 mA
Maximum, 3.3V DIO selection: 12 mA5
Supply current, 3.3V supply4Typical, 5V DIO selection: 0.01 mA
Maximum, 5V DIO selection: 6 mATypical, 3.3V DIO selection: 3.5 mAMaximum, 3.3V DIO selection: 11 mA5Digital input/output

Digital input type: CMOS
Number of I/O: 8Configuration: Each bit may be configured as input (power on default) or output
Pull-up configuration: Each bit has a programmable 100 kΩ pull resistor (50 to150 kΩ range) that may be programmed as pull-up (power on default), pulldown, or disabled. The pull-up/down resistors are disabled on outputs whenin open-drain mode.
DIO supply voltage (VIO): 5 V or 3.3 V, selectable with jumper W3(factory default is 5 V.)
Port read time: 400 µs typ
Port write time: 500 µs typ
Interrupt functionality: Each bit may be configured to generate an interrupt onchange when in input mode.
Input low voltage threshold: 0.3 × VIO V max
Input high voltage threshold: 0.7 × VIO V min
Input voltage limits (both 3.3 V and 5 V modes)
6.5 V absolute max3, –0.5 V absolute min
Input voltage recommended range
5 V mode: 5.5 V max, 0 V min
3.3 V mode: 3.8 V max3, 0 V min
Output type: CMOS, entire port may be configured as push-pull or open-drain.

Interface specifications

Raspberry Pi GPIO pins used
GPIO 8, GPIO 10, GPIO 11 (SPI interface)
GPIO 2, GPIO 3 (I2C interface)
ID_SD, ID_SC (ID EEPROM)
GPIO 12, GPIO 13, GPIO 26, (Board address)
GPIO 21 (Interrupt)
Data interface type
SPI slave device, CE0 chip select (Analog output)
I2C slave device (Digital I/O)
SPI mode: 1
SPI clock rate: 50 MHz max
I2C address: 0×20 to 0×27, depending on board address jumper setting
I2C clock rate: 400 kHz max

Environmental

Operating temperature range: 0 °C to 55 °C
Storage temperature range: –40 °C to 85 °C
Humidity: 0% to 90% non-condensing

MechanicalDimensions (L × W × H): 65 × 56.5 × 12 mm (2.56 × 2.22 × 0.47 in.) max
1 Zero-scale error may result in a “dead-band” digital input code region. In thiscase, changes in requested output voltage may not produce a corresponding change
in the output voltage when the voltage is less than 10 mV. The offset error is tested
and specified at 10 mV.

4 The power consumed by all DAQ HATs must be within the capacity of theRaspberry Pi power supply. Extra care must be taken with sourcing 3.3 V loads
since they are supplied by the regulator on the Raspberry Pi; MCC recommends
using the 5V DIO selection when sourcing large load currents such as LEDs.

2 Error tested at no load.

5 This specification doesn’t include user loading on analog outputs.

3 When VIO is 3.3 V the input will tolerate voltages up to 6.5 V, but the voltage
must be current-limited or it will change the VIO voltage due to current flowing into the MCC 152. An external current limiting resistor of 700 Ω or larger isrecommended on each input that is higher than 3.3 V when the W3 jumper is inthe 3.3 V position.

6 This specification doesn’t include user loading on digital outputs or the VIO
terminal.

Order Information

SoftwareHardwarePart No.

Description

MCC DAQ
HAT Library

Open-source library for developing applications in C, C++,and Python on Linux for MCC DAQ HAT devices; availablefor download on GitHub at https://github.com/mccdaq/mcchats.

Part No.

Description

MCC 152

12-bit voltage output DAQ HAT. Raspberry Pi model withthe 40-pin GPIO connector required.

Measurement Computing
DS-MCC-152(508) 946-5100

3

info@mccdaq.com

mccdaq.com
December 2019. Rev 2© Measurement Computing Corporation