AND8107/D The NLSF595 Used as a 7/8 Segment Decoder Driver Prepared by: Fred Zlotnick ON Semiconductor http://onsemi.com APPLICATION NOTE the MCU. It is a simple matter to fill the register with known bits. This updating may be a flashing – in all characters or any message such as err or even simply blanking the display. To create a segment that is ON, the ‘595’ needs to be programmed with a 0, conversely a one produces a blank. If we wish the display to be blank, simply shift 8−1s and enable the latch clock (RCK) with a 1. If there are 2 digits to blank, then 16 bits are shifted out. The speed of the device is many times faster than a normal 2, 4 or 8 MHz SPI clock, so speed in this example is not a concern. If there is no SPI bus available on the MCU, the user can create a 3 wire bus by sending a clock signal followed by a data signal in software. When all bits have been shifted, simply pulling the enable pin low (SCK) loads the data into the output and the display is enabled. Since the data is latched in, the user need not do anything at all until he/she wishes to change the data. All the “595s” are enabled together, so only one line is dedicated to the display. Figure 1 shows an MCU with an SPI bus, 2 LEDs, and separate display drivers, non−multiplexed. It should be noted, that if the user is not using a decimal point, they must still shift 8 bits out to complete each display. If the last segment is not used, simply insert a 1 as a place holder. Brightness adjustment: the maximum rating per pin is 20 mA on this device. If the designer is simply trying to illuminate the LEDs without adjusting brightness, the pin OE should be grounded. If brightness control is desired, the designer should set up a duty cycle adjustment on the pin, e.g. 25, 50, 75, 100 percent. This can easily be done in software, by keeping the refresh rate faster than 75 Hz to eliminate any possible flicker. Complete Circuit: This diagram will show cascading two NLSF595 for a 2 digit, 7/8 segment display, using brightness control, an SPI bus, and a 5.0 V supply for the LEDs. The NLSF595 Serial Peripheral Interface (SPI) LED driver from ON Semiconductor is an advanced CMOS device that was originally intended as a segment driver for multiple tri−color LEDs. This article will now reveal a bit more usefulness, the 7/8 segment display driver. This device may be used in conjunction with a microcontroller with only one dedicated line. Some typical applications include: Keyboard illumination, special lighting in handsets and keyboard backlighting, and now a 7/8 segment1 display driver. For more information on multi−color display solutions, please see Application note AND80912. Originally developed more than 25 years ago, the 7+1 segment LED, is very economical and useful for cost sensitive applications, especially where the appliance is line (mains) operated. Standard LED drivers that were developed many years ago, included overhead such as a BCD to 7 segment decoder that are now superfluous with modern MCUs. The NLSF595 provides great versatility, offering 10 numeric characters, in addition to many alpha characters. The device itself consists of a shift register which may sit on an existing SPI bus, a latch to hold the previous data while updating the new data, and output drivers capable of driving 20 mA each. It is possible to have one, two, three or more 7/8 segment LEDs driven by the same SPI bus and a single enable (low). Since the device is capable of driving 20 mA per output, it is further possible to multiplex the outputs assuming the user doesn’t exceed the limits of the device. This article shows a non multiplexed approach, i.e. using one register/driver per 7/8 segment display. The designer is free to use the device in a multiplexed form. A static 7+1 decoder driver requires the user to generate a lookup table with all the codes he/she is trying to use. For this example I will assume 10 numeric, 5 alphas, and a decimal point. The user is free to generate more codes such as P, h, e, °, etc. and actual software coding is very simple. After a reset (e.g. POR) assume the display is wrong and requires updating. Although the device register may be reset by pulling the SCLR pin low, this may take another I/O from Semiconductor Components Industries, LLC, 2002 December, 2002 − Rev. 0 1. 7 segments plus a decimal point or minus sign. 2. http://www.onsemi.com/pub/Collateral/AND8091−D.PDF − New Tri−Color LED Driver Minimizes Control Lines on MCU. 1 Publication Order Number: AND8107/D AND8107/D +5 V Common Anode LEDs 220 3.3 V Qa 3.3 V Qh NLSF595−1 0.1 f NLSF595−2 SQH D SCK 0.1 f OE D RCK SCK OE CK D E CK D SPI−Bus Brightness MCU with SPI Bus Figure 1. Two Devices Configured to Display to Non−Multiplexed Digits ON Semiconductor and are registered trademarks of Semiconductor Components Industries, LLC (SCILLC). SCILLC reserves the right to make changes without further notice to any products herein. SCILLC makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does SCILLC assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation special, consequential or incidental damages. “Typical” parameters which may be provided in SCILLC data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating parameters, including “Typicals” must be validated for each customer application by customer’s technical experts. SCILLC does not convey any license under its patent rights nor the rights of others. SCILLC products are not designed, intended, or authorized for use as components in systems intended for surgical implant into the body, or other applications intended to support or sustain life, or for any other application in which the failure of the SCILLC product could create a situation where personal injury or death may occur. Should Buyer purchase or use SCILLC products for any such unintended or unauthorized application, Buyer shall indemnify and hold SCILLC and its officers, employees, subsidiaries, affiliates, and distributors harmless against all claims, costs, damages, and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if such claim alleges that SCILLC was negligent regarding the design or manufacture of the part. SCILLC is an Equal Opportunity/Affirmative Action Employer. PUBLICATION ORDERING INFORMATION Literature Fulfillment: Literature Distribution Center for ON Semiconductor P.O. Box 5163, Denver, Colorado 80217 USA Phone: 303−675−2175 or 800−344−3860 Toll Free USA/Canada Fax: 303−675−2176 or 800−344−3867 Toll Free USA/Canada Email: [email protected] JAPAN: ON Semiconductor, Japan Customer Focus Center 2−9−1 Kamimeguro, Meguro−ku, Tokyo, Japan 153−0051 Phone: 81−3−5773−3850 Email: [email protected] ON Semiconductor Website: http://onsemi.com For additional information, please contact your local Sales Representative. N. American Technical Support: 800−282−9855 Toll Free USA/Canada http://onsemi.com 2 AND8107/D