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:
LED Sequence

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.
LED Sequence

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)
LED Sequence

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
LED Sequence



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.
Needs TDM


Question:
How can you achieve the above pattern using TDM?

.
.
.
.
.
.
.

Solution:

Steps:
  1. Imagine R, G, B switching separately (as shown below)
  2. Find the value for "Byte" in each case.
    (Byte is a combination of colourCode and onSequence)
  3. 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
TDM slice for Red

Byte = 0x59 = 0101 1001
CC_R = 1
CC_G = 0
CC_B = 1
onSequence = 1001
TDM slice for Green

Byte = 0x69 = 0110 1001
CC_R = 1
CC_G = 1
CC_B = 0
onSequence = 1001
TDM slice for Blue








Question:
In how many ways you can switch OFF all the LEDs.
  1. Without using TDM
  2. By using TDM

LED Sequence





WR Home      Topic Home      Chapter:  1  2  3 
<Previous Next>