AceSegment  0.3.0
An adjustable, configurable, and extensible framework for rendering seven segment LED displays.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ace_segment::LedMatrixSerial Class Reference

An LedMatrix with an 74HC595 Serial-To-Parallel converter chip on the segment pins. More...

#include <LedMatrixSerial.h>

Inheritance diagram for ace_segment::LedMatrixSerial:
Inheritance graph
[legend]
Collaboration diagram for ace_segment::LedMatrixSerial:
Collaboration graph
[legend]

Public Member Functions

 LedMatrixSerial (Hardware *hardware, uint8_t numGroups, uint8_t numElements)
 
void setGroupPins (const uint8_t *groupPins)
 
void setElementPins (uint8_t latchPin, uint8_t dataPin, uint8_t clockPin)
 
virtual void configure () override
 Configure the pins for the given LED wiring. More...
 
virtual void finish () override
 Turn off the pins by doing the opposite of configure(). More...
 
virtual void enableGroup (uint8_t group) override
 
virtual void disableGroup (uint8_t group) override
 
virtual void drawElements (uint8_t pattern) override
 
- Public Member Functions inherited from ace_segment::LedMatrix
 LedMatrix (Hardware *hardware, uint8_t numGroups, uint8_t numElements)
 
void setCathodeOnGroup ()
 LED negative terminals are on the group line. More...
 
void setAnodeOnGroup ()
 LED positive terminals are on the group line. More...
 
void invertGroupLevels ()
 If a transistor drives the group, invert the logic levels. More...
 

Protected Member Functions

void writeGroupPin (uint8_t group, uint8_t output)
 Write to group pin identified by 'group'. More...
 

Protected Attributes

const uint8_t * mGroupPins
 
uint8_t mLatchPin
 
uint8_t mDataPin
 
uint8_t mClockPin
 
- Protected Attributes inherited from ace_segment::LedMatrix
Hardware *const mHardware
 
const uint8_t mNumGroups
 
const uint8_t mNumElements
 
uint8_t mGroupOn
 
uint8_t mGroupOff
 
uint8_t mElementOn
 
uint8_t mElementOff
 

Detailed Description

An LedMatrix with an 74HC595 Serial-To-Parallel converter chip on the segment pins.

The wiring is as follows:

latchPin/D10/SS – ST_CP (Phillips) / RCK (TI) / Pin 12 (rising) dataPin/D11/MOSI – DS (Phillips) / SER (TI) / Pin 14 clockPin/D13/SCK – SH_CP (Phillips) / SRCK (TI) / Pin 11 (rising)

Definition at line 42 of file LedMatrixSerial.h.

Member Function Documentation

◆ configure()

void ace_segment::LedMatrixSerial::configure ( )
overridevirtual

Configure the pins for the given LED wiring.

Reimplemented from ace_segment::LedMatrix.

Reimplemented in ace_segment::LedMatrixSpi.

Definition at line 30 of file LedMatrixSerial.cpp.

◆ finish()

void ace_segment::LedMatrixSerial::finish ( )
overridevirtual

Turn off the pins by doing the opposite of configure().

Reimplemented from ace_segment::LedMatrix.

Reimplemented in ace_segment::LedMatrixSpi.

Definition at line 46 of file LedMatrixSerial.cpp.

◆ writeGroupPin()

void ace_segment::LedMatrixSerial::writeGroupPin ( uint8_t  group,
uint8_t  output 
)
protected

Write to group pin identified by 'group'.

Definition at line 72 of file LedMatrixSerial.cpp.


The documentation for this class was generated from the following files: