This library creates the interface to operate the TLC5940. This device manages 16 PWM outputs.

Files at this revision

API Documentation at this revision

Comitter:
Fiuba
Date:
Sat Nov 27 01:08:28 2010 +0000
Parent:
2:500ec33cd4b6
Commit message:
I think the documentation is now fully functional :)

Changed in this revision

tlc5940.h Show annotated file Show diff for this revision Revisions of this file
diff -r 500ec33cd4b6 -r 40cb2f9adc4d tlc5940.h
--- a/tlc5940.h	Sat Nov 27 00:50:01 2010 +0000
+++ b/tlc5940.h	Sat Nov 27 01:08:28 2010 +0000
@@ -22,6 +22,32 @@
 
 #include "mbed.h"
 
+/** TI's TLC5940 interface class
+ *
+ * Example:
+ * @code
+ * // 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) {}
+ * }
+ * @endcode
+ */
 class tlc5940 {
 private:
     bool first_cycle_flag;