WR Home Topic Home | Chapter: 1 2 3 |
<Previous | Next> |
Chapter 03
Circuitry for the Propeller PCB
Page 6
Some concepts about switching
To make it much simpler, lets use a "Byte" instead of a "Nibble" and combine the colourCode with onSequence:
For the ease of understanding, let us keep the MSB (which is un-used) as Logic 0 (GND)
We have only two voltages +5V and 0V, represented by logic-1 and logic-0
Each LED has only two terminals: anode and cathode
The two voltages can be applied to the two terminals in 2x2 = 4 ways.
LEDs Anode | LEDs Cathode | Result | Comment | |
Voltage | GND | GND | Will NOT Glow | |
Voltage | GND | +5 | Will NOT Glow | Reverse Bias: NOT recommended |
Voltage | +5 | GND | Will Glow | Normal Operation |
Voltage | +5 | +5 | Will NOT Glow |
NOTE: it is assumed that a resistance (470-ohm) is connected in series with the LED.
LEDs Anode | LEDs Cathode | Result | Comment | |
Logic | 0 | 0 | Will NOT Glow | |
Logic | 0 | 1 | Will NOT Glow | Reverse Bias: NOT recommended |
Logic | 1 | 0 | Will Glow | Normal Operation |
Logic | 1 | 1 | Will NOT Glow |
Example:
Byte = 0x3F = 0011 1111 binary
CC_R = Logic 0 = 0 Volt (GND)
CC_G = Logic 1 = 5 Volt
CC_B = Logic 1 = 5 Volt
Lower Nibble = 1111 (onSequence)
NOTE: The previously used N/C (not connected) is replaced by +5V. As supplying +5V at both terminals of a LED will also keep it switched OFF.
All Green LEDs will receive +5 V at both anode and cathode, so they will NOT glow.
All Blue LEDs will receive +5 V at both anode and cathode, so they will NOT glow.
Only Red LEDs will receive +5 V at anode and GND at cathode, so they all will glow.
Example:
Byte = 0x44 = 0100 0100 binary
CC_R = Logic 1 = 5 Volt
CC_G = Logic 0 = 0 Volt (GND)
CC_B = Logic 0 = 0 Volt (GND)
Lower Nibble = 0100 (onSequence)
All Red LEDs will receive +5 V at both anode and cathode, so they will NOT glow.
All Green LEDs will get 0V on cathode and onSequence at anode. So the Green LEDs will glow as per the onSequence.
All Blue LEDs will get 0V on cathode and onSequence at anode. So the Blue LEDs will glow as per the onSequence.
Example:
Byte = 0x09 = 0000 1001 binary
IMPORTNAT Example :
Without using TDM and by using the above switching technique only, the following could NOT be achieved, whatever be the Byte's value.
Question:
How can you achieve the above pattern using TDM?
.
.
.
.
.
.
.
Solution:
Steps:
- Imagine R, G, B switching separately (as shown below)
- Find the value for "Byte" in each case.
(Byte is a combination of colourCode and onSequence) - Cycle them (repeat the byte sequence in cycle to produce the end effect)
Byte = 0x2F = 0011 1111 CC_R = 0 CC_G = 1 CC_B = 1 onSequence = 1111 |
|
Byte = 0x59 = 0101 1001 CC_R = 1 CC_G = 0 CC_B = 1 onSequence = 1001 |
|
Byte = 0x69 = 0110 1001 CC_R = 1 CC_G = 1 CC_B = 0 onSequence = 1001 |
Question:
In how many ways you can switch OFF all the LEDs.
- Without using TDM
- By using TDM
WR Home Topic Home | Chapter: 1 2 3 |
<Previous | Next> |