The integrated circuit labelled 74HC595 controls the bar graph display and it has a very wide application in electronics. After the 8-bit data is loaded into the internal registry of this chip through the SPI interface, the data is translated to the parallel 8-bit output by activating the STCP pin, thus controlling the display. Bar graph displays are often used to create various types of VU meters, status indicators, different types of counters and similar devices.
How Does The Bar Graph 3 Click Board™ Work?
When it comes to driving an array of LED segments, using so-called shift-register ICs is almost unavoidable. This Click Board™ uses a single 74HC595 IC, a tri-state, serial-in, parallel-out, 8-bit shift-register with output latch, from Texas Instruments. It is used to drive the SMA-B500LE a monochrome (red) 5 segment bar graph array, from American Opto Plus LED corporation. The 74HC595 ICs is comprised of a D-type internal storage register, and a serial-to-parallel shift register, both 8 bits wide. Each of these registers has its own clock line, making it possible to clock in the desired data in, and then clock it out to the parallel output pins when needed.
The SMA-B500LE bar graph LED array has 5 red LED segments. Each segment contains three LEDs, with their cathodes connected in a single point and routed out as the single common cathode pin. This results with a bar graph display that has only six pins, even though it uses 15 LED elements in total. Similarly, all the anodes of the LED segments are routed to a single pin, which is connected to the drain of the P channel MOSFET, while its source is connected to the VCC. Driving the gate of the MOSFET using the PWM pin of the mikroBUS allows dimming of the LED bar graph display, by changing the pulse width of the applied PWM signal.
The BarGraph 3 Click Board™ communicates with the host MCU over the SPI interface, routed to the mikroBUS MOSI and SCK pins, labelled as SDI and SCK on this Click Board™, respectively. Five bits of information are pushed through the serial data input pin (DS) of the 74HC595 IC, routed to the SDI pin. The construction of the SPI interface is such that it operates with 8-bit long words, so the whole data word needs to be clocked in before it is latched on the output. However, the values of the bits that correspond to the non-connected pins of the 74HC595 IC will be disregarded.
The Output Enable pin (#OE) is routed to the AN pin of the mikroBUS, and it is labelled as OE. If this pin is at the HIGH logic level, the outputs Q0 to Q7S of the 74HC595 IC will be set at HIGH-Z (high impedance mode) meaning that they will become disconnected. Regardless of the logic state on other pins, the outputs will not change from this state, until #OE is brought down to a LOW logic level. Memory content and the logic states at the output pins will be unaffected, meaning that the OE can be used to turn the segments of the bar graph on or off without affecting their states (like a simple SPST switch in series with the LED segment of the bar graph)
After the data word has been clocked in, the master SPI clock should be stopped, and the CS pin should be driven to a HIGH logic level. The CS pin of the mikroBUS is routed to the STCP pin of the 74HC595 IC. A rising edge on the STCP input pin of the 74HC595 IC will latch the data from the internal storage register to the output pins, changing the states of its parallel output pins (Q0 to Q7). If a specific bit in the internal storage is 0, the state on the appropriate pin of the 74HC595 IC will become LOW. With their anodes connected to the positive voltage level already (provided that the P-type MOSFET is open), the segment will be lit. This means that the logical 0 lights up a segment, while 1 turns it off.
The #MR pin is used to clear the data in the internal storage register of the 74HC595 IC. The LOW logic level on this pin will clear the content of this storage register, but it will not turn off the outputs which are already activated. The #MR pin is routed to the RST pin of the mikroBUS and it is pulled to a HIGH logic level by the onboard resistor.
The BarGraph 3 Click Board™ can work with both 3.3V and 5V MCUs. The operating voltage selection can be done via the onboard SMD jumper, labelled as VCC SEL.
||It can be used for displaying of various signal or status properties, for building VU-meters, and various types of gauges and signal indicators
||74HC595, 8-bit serial-in, parallel-out shift registers with output latches, from Texas Instruments; SMA-B500LE, a monochrome (white) 5 segment bar graph array, from American Opto Plus LED corporation
||Clean and bright five-segment LED bar graph, with uniform light distribution, simple to use with included software library functions. Controlled by the popular 74HC595 shift register IC, dimmable with the PWM signal applied over the mikroBUS PWM pin.
|Click Board™ size
||M (42.9 x 25.4 mm)
||3.3V or 5V
THE PINOUT DIAGRAM
This table shows how the pinout on BarGraph 3 Click Board™ corresponds to the pinout on the mikroBUS socket (the latter shown in the two middle columns).
ONBOARD SETTINGS AND INDICATORS
||Power LED indicator
||Power supply voltage selection: left position 3.3V, right position 5V