NEW DATABASE - 350 MILLION DATASHEETS FROM 8500 MANUFACTURERS
NM95C12 AN-766 NM9306 COP400 COP800 TP3064 TP3065 C1995 RRD-B30M75 LM2936 - Datasheet Archive
Application Note 766 Chris Siegl March 1991 ABSTRACT This application gives a detailed description of the use of the NM95C12 in
National Semiconductor Application Note 766 Chris Siegl March 1991 ABSTRACT This application gives a detailed description of the use of the NM95C12 NM95C12 in electronic metering key applications where it is desirable to have a status display without having the key connected to any device By using the NM95C12 NM95C12 such functionality can be obtained without using a microcontroller in the key This can have significant cost size and power impact Enter the NM95C12 NM95C12 serial E2PROM with eight programmable outputs which are set to their stored values on power up This device is not only non-volatile but is small inexpensive simple to use and does not require a microcontroller in the key device DISPLAY INTERFACE The NM95C12 NM95C12 has 8 programmable outputs The switch configuration register (SCR) controls these outputs in pairs four bits per pair Table I shows the different switch configurations possible for each pair In this application we are only interested in modes 0 1 2 and 3 Because the NM95C12 NM95C12 has a much greater current sinking capability than sourcing we will configure our LED displays with their cathodes to the output port A LOW output results in a lit LED Figure 1 shows a bar graph display being driven by the NM95C12 NM95C12 A single resistor SIP can be used to limit the current to the LEDs The configuration register looks like Figure 2 with a b c h representing the LED segments To light a particular segment the appropriate bit in the SCR register must be set to 0 This register is set to the contents of the word stored in the E2PROM's location 61 at power-up The SCR register itself is located at address 62 and can be written to directly without affecting the E2PROM location 61 and the new contents of the SCR register will be lost on powerdown At the next power-up the contents of location 61 will again be stored in the SCR AN-766 AN-766 INTRODUCTION Metering keys are becoming quite common now for use on copying machines in large corporations for departmental accounting purposes as well as in the flood of neighborhood copy centers and resource facilities shared by a number of businesses The simplest implementation of such a device is a simple mechanical counter with an advance solenoid as each copy is made a pulse advances the counter This approach suffers a number of drawbacks including low reliability easy to tamper with bulky and unable to itemize between different uses or equipment These types of devices are no longer just used for copying machines fax machine usage word processor usage plotters and laser printers are now becoming part of the shared resources of a corporation or among a number of businesses as well as such services being incorporated into the neighborhood copy center While the mechanical counter could still be used in such applications where the device under use could increment the counter at different rates depending on the type of usage a different counter could be used for each service generating an itemized receipt for the user becomes very cumbersome By using a non-volatile memory in the key device an itemized list can be kept of the services used The value of the services used could also be tracked and the key terminated when a certain limit is reached The key device could function like a debit card where the user gets a certain amount of credit stored in his card when it is all used up he must go back for more at which point a cash register or other device with a printer and a receptacle for the key device would print an itemized list of usage and optionally erase the memory and store a new credit amount The disadvantage of this approach when compared to the mechanical counter is the lack of an indication of the remaining credit or usage to the user One way to solve this problem is to include a display on the device being used to display the current credit information This has the disadvantage that the user must have the key device plugged into a service device to find his credit status Another approach is to include a microcontroller in the key device along with a display a battery and a switch to activate the display If the battery fails information in the key is lost By using serial E2PROM memory devices such as the NM9306 NM9306 NM93Cxx or NM93CSxx families solves the information retention problem when the battery fails but we still need the microcontroller if the key device is to have an active display without connection to another device THE NM95C12 NM95C12 The NM95C12 NM95C12 is a 1024-bit CMOS E2PROM with 8 programmable outputs The 1024 bits of memory are divided into 60 registers of 16 bits each and each register can be individually accessed Registers 61 63 are dedicated to storing the programmable output settings Each output may be programmed to provide either a HIGH or a LOW output level or these outputs may also be programmed to form four individual pairs of SPST switches In this application we will only be programming these pins as HIGH or LOW outputs but there are many other applications where a SPST switch or switches would be useful Other features of the NM95C12 NM95C12 include a very low operating current (less than 4 mA) software write protection self timed write cycle (erase cycles not necessary) with an endurance of over 40 000 writes per register and at least 10 year data retention Interfacing to the NM95C12 NM95C12 is done through the on-board MICROWIRETM port this port consists of four signal lines a serial clock (SK) serial data input (SI) serial data output (SO) and chip select (CS) MICROWIRE is supported in hardware in the COP400 COP400 COP800 COP800 and HPC TM microcontroller families MICROWIRE can also be easily implemented on most microncontrollers and microprocessors in software The TP3064 TP3064 and TP3065 TP3065 implement a MICROWIRE hardware interface to various standard microprocessors TRI-STATE is a registered trademark of National Semiconductor Corporation MICROWIRETM and HPCTM are trademarks of National Semiconductor Corporation C1995 C1995 National Semiconductor Corporation TL D 11189 Using the NM95C12 NM95C12 in a Stand Alone Metering Device Using the NM95C12 NM95C12 in a Stand Alone Metering Device RRD-B30M75 RRD-B30M75 Printed in U S A TL D 11189 1 FIGURE 1 Switch Configuration Register (SCR) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Z Y X W Z Y X W Z Y X W Z Y X W X Y X Switch 4 YX Switch 3 YX Switch 2 Y Switch 1 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 a b 0 0 c d 0 0 e f 0 0 g h FIGURE 2 SCR Configured to Drive Bar Graph (a 0 in a b h turns on appropriate segment) The circuit in Figure 1 uses some tricks to maximize the battery life The LM2936 LM2936 (low dropout ultra-low quiescent current 5V regulator) was used to regulate the battery voltage down to 5V for the NM95C12 NM95C12 By bypassing the regulator for the a V connection to the resistor SIP the current through the regulator only feeds the NM95C12 NM95C12 which in its quiescent state (with all inputs at CMOS logic levels) is k 50 mA the dropout voltage of the LM2936 LM2936 is k 0 1V To have the LEDs operate correctly it is important to keep the battery voltage under 8V to 9V otherwise the LEDs which should be off will get turned on through the protection diodes (see modes 12 and 13 of Table I) not to mention the increase in current discharging the battery Another approach would be to power the LEDs from the regulated a 5V Now the thing to watch out for is the current limit of the LM2936 LM2936 exceeding 65 mA could force the regulator to go into current limit 2 TABLE I Switch Configurations TL D 11189 9 Modes 0 thru 11 are logic level functions Modes 12 and 13 are Analog switch functions 3 charge the contents of the E2PROM are not lost The rechargeable battery could be replaced with a 9V transistor battery (typical voltage on these is 7V to 8V) which will give operating life of multiple months if checked only intermittently No data would be lost during battery changes Figure 3 shows how the key would be configured using the transistor battery Table II shows the bit combinations for the SCR register to generate the digits 0 to 9 Notice with the 7 segment display we no longer can use a resistor SIP because segment LEDs are all tied to a common cathode Resistors in this configuration are available in DIPs as well as SOIC Applications desiring two digits (credit can now be displayed as percent remaining) can be implemented with two MM74HC4511 MM74HC4511 display decoder drivers as shown in Figure 4 The MM74HC4511s have a quiescent current of k80 mA maximizing battery life and are available both in DIP as well as SOIC packages The MM74HC4511 MM74HC4511 has a maximum supply voltage of 6V so it should be operated from a 5V regulated supply as shown in Figure 5 Table III shows how the BCD (binary coded decimal) data is configured in the SCR register to display the two digits All the circuits in this application note use very low current Hewlett Packard displays (they are specified for operation at 1 mA per segment) to maximize battery life Other displays at higher currents can be used but care must be exercised not to exceed the current capabilities of the LM2936 LM2936 as well as the power dissipation capabilities of the NM95C12 NM95C12 especially if the surface mount package is used at higher temperatures Another side effect of higher currents in the LEDs is the VOL specification is 0 4V at an IOL of 2 1 mA but will rise with higher IOLs (typically stays well under 1V at 10 mA) Instead of using a bar graph individual LEDs could be used in much the same manner The length of bar graph lit or number of LEDs lit would show the amount of credit remaining Another approach would be to use a 7 segment display Figure 3 shows such a circuit The button is pressed when the user wishes to see the display There is a diode bypass of the push button switch so the display is active while the key is plugged into the device under use The user can monitor his remaining credit while operating the device The battery is being charged whenever the key is plugged into a device If the battery should ever go too low to operate the user just plugs the key into a device for a while to re- TABLE II TL D 11189 3 4 TL D 11189 2 FIGURE 3 TL D 11189 4 FIGURE 4 5 TL D 11189 5 FIGURE 5 TABLE III TL D 11189 6 abled So while the metering device is unplugged from the service device we want this signal low therefor this signal has a pull down resistor To begin an access to the NM95C12 NM95C12 the CS is first set high by the service device then a high start bit is on DI and clocked into the NM95C12 NM95C12 by a low to high transition on SK (see Figure 8 ) the start bit is then followed by opcode and address (see Table V) with SK low to high transitions for each bit In the case of a read instruction subsequent toggling of the SK line causes the addressed data to be shifted out on DO Data should not be sampled on DO on the low to high transition of SK as this is when the bit is shifted out On write operations they must be preceded by the write enable instruction (WEN) In the write instruction (WRITE) the data follows right after the address (see Figure 9 ) The MICROWIRE interface is supported in hardware on the COP400 COP400 COP800 COP800 and HPC microcontroller families MICROWIRE can also be easily implemented on most microcontrollers and processors in software Application Note AN-507 AN-507 ``Using the NMC93CSxx family'' covers the details of how to communicate with these types of serial memory devices from various microcontrollers The TP3464 TP3464 and TP3465 TP3465 implement a MICROWIRE hardware interface to various standard microprocessors If there is a need to display the number 100 as well this can be accomplished with the addition of just one quad NOR gate as shown in Figure 6 Here we get a little tricky By adding some gating to the two most significant bits of the most significant digit a coding can be worked out that gives a zero code to the most significant digit driver at the same time as driving through another gate the hundreds digit Figure 7 shows the logic along with a table of the states If the 2 most significant bits of the most significant digit are inverted before going to the SCR register the right numbers will be displayed To display 100 the SRC is loaded with all zeros Table IV shows some example numbers MODULE INTERFACE The metering device or key must connect to the service device through some type of connector The simplest approach is to bring out the MICROWIRE port through a connector to a processor or microcontroller in the service device The MICROWIRE port consists of four signal lines a serial clock (SK) serial data input (SI) serial data output (SO) and the chip select (CS) When CS is LOW the chip is powered down into standby mode (outputs A1 through A4 and outputs B1 through B4 are still driven even while in standby) and accesses on the MICROWIRE port are dis- 6 TL D 11189 7 FIGURE 6 7 If there is a need to minimize the number of contacts in the connector from the metering device to the service device Application Note AN-423 AN-423 ``The NMC9346 NMC9346 An Amazing Device'' gives the details to implementing power and MICROWIRE signals over just two connections CONCLUSION This application note describes a number of approaches to metering devices from the very simple to the complex If more E2PROM is required it is available in the NM93Cxx family in 8-pin DIPs and SOIC in various sizes With the features of very low power small size and low cost as well as the simplicity of interface to most processors and controllers already part of the panel interface of most server devices the implementation of this type of product is very easy TL D 11189 8 A B C D E F 0 1 0 1 0 0 1 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 1 FIGURE 7 TABLE IV TL D 11189 13 TABLE V NMC95C12 NMC95C12 Instructions SB Op Code Address READ Instruction 1 10 A5A0 Data WEN 1 00 11XXXX 11XXXX WRITE 1 01 A5A0 D15 D0 WRALL 1 00 01XXXX 01XXXX D15 D0 WDS 1 00 Comments 00XXXX 00XXXX Reads data stored in memory starting at specified address Write enable must precede all programming modes Writes register Writes all registers Disables all programming instructions 8 Synchronous Data Timing TL D 11189 10 Instruction Sequence TL D 11189 11 FIGURE 8 TL D 11189 12 FIGURE 9 9 Using the NM95C12 NM95C12 in a Stand Alone Metering Device LIFE SUPPORT POLICY NATIONAL'S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL SEMICONDUCTOR CORPORATION As used herein AN-766 AN-766 1 Life support devices or systems are devices or systems which (a) are intended for surgical implant into the body or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user National Semiconductor Corporation 2900 Semiconductor Drive P O Box 58090 Santa Clara CA 95052-8090 Tel 1(800) 272-9959 TWX (910) 339-9240 National Semiconductor GmbH Livry-Gargan-Str 10 D-82256 D-82256 F4urstenfeldbruck Germany Tel (81-41) 35-0 Telex 527649 Fax (81-41) 35-1 National Semiconductor Japan Ltd Sumitomo Chemical Engineering Center Bldg 7F 1-7-1 Nakase Mihama-Ku Chiba-City Ciba Prefecture 261 Tel (043) 299-2300 Fax (043) 299-2500 2 A critical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness National Semiconductor Hong Kong Ltd 13th Floor Straight Block Ocean Centre 5 Canton Rd Tsimshatsui Kowloon Hong Kong Tel (852) 2737-1600 Fax (852) 2736-9960 National Semiconductores Do Brazil Ltda Rue Deputado Lacorda Franco 120-3A Sao Paulo-SP Brazil 05418-000 Tel (55-11) 212-5066 Telex 391-1131931 NSBR BR Fax (55-11) 212-1181 National Semiconductor (Australia) Pty Ltd Building 16 Business Park Drive Monash Business Park Nottinghill Melbourne Victoria 3168 Australia Tel (3) 558-9999 Fax (3) 558-9998 National does not assume any responsibility for use of any circuitry described no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications