Techno Babble
Shake 'n Roll Electronic Dice
This new product uses a special technique called Charlieplexing to drive 14 LEDs from only six microprocessor pins. To see how this works, look at the schematic at the top left above. In this example, two pins are used to apply a positive voltage at +V so that LED1 lights. If we now reverse the power connections so that the positive voltage is applied to the right, LED2 will light. With a microprocessor, it is possible to very quickly switch the drive voltages so that it appears, to the human eye, that both LED1 and LED2 are both on at the same time. Of course, with only two pins there is no advantage to using Charlieplexing. However, things change when using three or more pins. In the schematic at the top right, we have three pins A, B, C that are driving six LEDs. The following table shows how to drive each of the LEDs:
LED 1 - C is +, A is -, B is tristated
LED 2 - C is -, A is +, B is tristated
LED 3 - A is +, B is -, C is tristated
LED 4 - A is -, B is +, C is tristated
LED 5 - B is +, C is -, A is tristated
LED 6 - B is -, C is +, A is tristated
Note: To avoid unintended LEDs from lighting, any unused pins need to be disconnected or tristated. In general, by using n pins, you can drive n * (n-1) LEDs.
Saturday, 16 July 2016
Copyright © 2011-2016 Computer Inspirations. All rights reserved. Last updated Friday, 9 March 2018