This library creates the interface to operate the TLC5940. This device manages 16 PWM outputs.
tlc5940 Class Reference
TI's TLC5940 interface class. More...
#include <tlc5940.h>
Public Member Functions | |
tlc5940 (int num_ics, int DC_data[]) | |
Create a tlc5940 interface object connected to some specifics pins. | |
void | send_data (int data[]) |
Send the specified set of grayscale values. |
Detailed Description
TI's TLC5940 interface class.
Example:
// Turn on all the outputs # include "mbed.h" # include "tlc5940.h" int main() { int DC_data[2*96]; int GS_data[2*16]; // Dot Correction Values for (int i=0; i<2*96; i++) DC_data[i] = 1; // Grayscale Values for (int i=0; i<2*16; i++) GS_data[i] = 0xFF; // Create object tlc5940 tlc_driver(2, DC_data); // Send data tlc_driver.send_data(GS_data); while (1) {} }
Definition at line 51 of file tlc5940.h.
Constructor & Destructor Documentation
tlc5940 | ( | int | num_ics, |
int | DC_data[] | ||
) |
Create a tlc5940 interface object connected to some specifics pins.
- Parameters:
-
num_ics Number of TLC5940 connected in series DC_data[] Dot Correction values for initialization
Definition at line 23 of file tlc5940.cpp.
Member Function Documentation
void send_data | ( | int | data[] ) |
Send the specified set of grayscale values.
- Parameters:
-
data[] Array of 12-bit Grayscale values for transmission
Definition at line 56 of file tlc5940.cpp.
Generated on Thu Jul 14 2022 21:35:46 by 1.7.2