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

Chapter 03

Circuitry for the Propeller PCB

Page 4

Some concepts about switching


Disadvantage of this method:

Question: We want to do two things:
  1. Switch ON rightmost Red and Green LED
  2. Switch ON leftmost Red but to switch OFF leftmost Green.
If we want to switch ON the leftmost RED LED, keeping the leftmost Green LED OFF, is it possible?
(NOTE: Question-marks "???????" are on the left side)


For now (just for the time-being) the answer is NO.

Explanation: There are four pairs of Red and Green LEDs. Each pair shares a common anode. So each pair must behave in a same way, either both ON or both OFF.

Solution:
  1. If the pair does not share the anode, they can be controlled separately. This will take two nibbles. Hence, while storing the onSequence two nibbles will be required: One for Red and one for Green. But this is NOT the desired solution ( WHY ? ). The two diagrams illustrates the method of using separate nibbles:
    Separate RED
    Separate Green

  2. Another solution is to cycle the sequence (See animation below) :

    CC_Red = GND, CC_Green = N/C, Nibble = 1001
    CC_Red = N/C, CC_Green = GND, Nibble = 0001

    Explanation:
    1. In the first step, onSequence is applicable to Red LEDs only,
      because the master control for Green LEDs is OFF (CC_Green = N/C)
    2. In the second step, the onSequence is applicable to Green LEDs only,
      because the master control for Red LEDs is OFF (CC_Red = N/C)
    3. Goto Step 1 and repeat, while the desired pattern is required.

    This is known as Time Division Multiplexing (TDM). For some time, Red is visible and for time, Green is visble. If the process is repeated, let us say 100 times in a second then we will not see them flickering, but it will produce the desired effect.
    The animation shown below illustrates this concept:

    TDM

Finally, with the help of TDM, we can achieve the desired effect, without having separate anodes.

End Effect

Why method-1 is not used ? What is the problem using separate anodes ?

The anodes of LEDs will be connected by a microcontrollers port. For 4-common-anodes only 4-pins will be occupied. Four separate anodes for Red and four separate anodes for Green, will require 8-port pins. The micro-controller has limited port pins, they should be used optimally, else purchasing a micro controller with more GPIO (General Purpose Input Output) pins will increase the overall project cost.



Conclusion:
By here you must understand when to use TDM and when NOT to.
  1. When Red and Green LEDs have the same onSequence (Nibble) its simple (no TDM required).
  2. When Red and Green LEDs have different onSequence (Nibble), namely onSequence_Red and onSequence_Green we display them alternately in the following manner:
    1. Apply CC_R = GND, CC_G = N/C (so that only Red LEDs will "listen")
    2. Now apply onSequence for Red LEDs
    3. Apply CC_R = N/C, CC_G = GND (so that only Green LEDs will "listen")
    4. Now apply onSequence for Green LEDs



Question:

If it is desired to switch ON all the Red LEDs and no Green LED, what will be the value of
CC_Red, CC_Green and onSequence (nibble) ? Will you need TDM or not ?

Question







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