1. Trang chủ
  2. » Giáo án - Bài giảng

AN0563 using PIC16C5X microcontrollers as LCD drivers

15 298 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 15
Dung lượng 198,28 KB

Nội dung

AN563 Using PIC16C5X Microcontrollers as LCD Drivers Author: To turn an LCD segment “on,” which makes the segment turn dark or opaque, an LCD RMS voltage that is greater than the LCD threshold voltage is applied to the LCD The RMS LCD voltage is the RMS voltage across the capacitor C in Figure 1, which is equal to the potential difference between SEG and COM values Al Lovrich Microchip Technology Inc INTRODUCTION This application note describes an LCD controller implementation using a PIC16C55 microcontroller This technique offers display capabilities for applications that require a small display at a low cost, together with the capabilities of the standard PIC16C55 microcontroller We start by an overview of LCD devices and their theory of operation followed by software implementation issues of the controller The source code for controlling a multiplexed LCD display is included in Appendix A Different LCDs have different characteristics; Figure shows typical voltage vs relative contrast characteristics Notations on the curve show operating points for multiplex operation with the threshold voltage set to 1.7 VRMS This voltage is often used as the measure of voltage for the LCD to be “off” or transparent The curve is normalized and assumes a viewing angle of 90° to the plane of the LCD Contrast control, the process of turning on a segment, is achieved by moving the operating point of the LCD This is achieved by applying a voltage to the LCD that is greater than the LCDs threshold voltage A typical circuit to accomplish this task is shown in Figure LIQUID CRYSTAL DISPLAYS The Liquid Crystal Display (LCD) is a thin layer of “Liquid Crystal Material” deposited between two plates of glass The raw LCD is often referred to as “glass” Electrodes are attached to both sides of the glass One side is referred to as common or backplane, while the other side is referred to as segment Driving a liquid crystal display at direct current (DC) will cause permanent damage to the display unit In order to prevent irreversible electrochemical action from destroying the display, the voltage at all segment locations must reverse polarity periodically so that a zero net voltage is applied to the device This process is referred to as AC voltage application There are two LCD driving methods available: Static and multiplexed An LCD is modeled as a capacitor, with one side connected to the common plane and the other side connected to the segment, as shown in Figure LCDs are sensitive to Root Mean Square Voltage (VRMS) levels When a VRMS level of zero volts is applied to the LCD, the LCD is practically transparent FIGURE 1: ELECTRICAL MODEL OF AN LCD SEGMENT WITH DRIVING VOLTAGES COM SEG SEG Segment Off COM - SEG C SEG Segment On COM - SEG COM VON RMS = VDD VOFF RMS =  1997 Microchip Technology Inc DS00563C-page AN563 Conventional LCDs have separate external connections for each and every segment plus a common plane This is the most basic method that results in good display quality The main disadvantage of this driving method is that each segment requires one liquid crystal driver The static driving method uses the frame frequency, defined as a period of the common plane signal, of several tens to several hundred Hz A lower frequency would result in blinking effects and higher frequencies would increase power requirements To turn a segment on, a voltage that has an opposite polarity to the common plane signal must be applied resulting in a large RMS voltage across the plates To turn off a segment, a voltage that is of the same polarity to the common plane signal is applied This drive method is universal to driving LCD segments Figure shows an example of this driving method The LCD frequency is defined as the rate of output changes of the common plane and segment signals, whereas the frame rate is defined as FFRAME FFRAME = N where N is the multiplex rate or number of backplanes Typically, FFRAME ranges from 25 Hz to 300 Hz The most commonly used frame frequency is 40-70 Hz A lower frequency would result in flicker effects and higher frequency would increase power requirements FIGURE 2: TYPICAL LCD CHARATERISTICS Multiplexed LCDs maintain their liquid crystal characteristics They have a low power consumption, a high contrast ratio under high ambient light levels, and they reduce the number of external connections necessary for dot matrix and alphanumeric displays The multiplex driving method reduces the number of driver circuits, or microcontroller I/O pins if a software method is used The method of drive for multiplexed displays is Time Division Multiplex (TDM) with the number of time divisions equal to twice the number of common planes used in a given format In order to prevent permanent damage to the LCD display, the voltage at all segment locations must reverse polarity periodically so that zero net voltage is applied This is the reason for the doubling in time divisions; each common plane must be alternately driven with a voltage pulse of opposite polarity The drive frequency should be greater than the flicker rate of 25 Hz Since increasing the drive frequency significantly above this value increases current demand by the CMOS circuitry, an upper drive frequency level of 60 Hz is recommended by most LCD manufacturers We have chosen a drive rate of 50 Hz for this application note which results in a frame period of 20 ms The most commonly available formats are 2x4, 3x3, and 5x7 In this report we use a 2x4 format LCD to display hexadecimal digits FIGURE 3: CONTRAST CONTROL CIRCUIT VLCD VDD Two Common Planes V = 4.1 VRMS % Relative Contrast 100% VDD VRMSOFF 1.7 VRMS Contrast Control V1 R V2 Drive Voltage VRMS DS00563C-page VSS R  1997 Microchip Technology Inc AN563 To better understand multiplexed LCD control it is best to look at the general case The segments in a multiplexed LCD are arranged in an X-Y grid form as shown in Figure The common plane signals maintain their relative shape at all times, as shown in Figure To turn on segment (SEG1), we need to apply a voltage VD, such that VS + VD turns the segment on and VS - VD turns the segment off Note that the segment signal VD is symmetrical This is a consequence of the intervals that the common plane signal is not present at all times Use of nonsymmetrical waveform will result in a higher VRMS present on the unaddressed segments The symmetrical nature of the waveforms theoretically result in zero DC voltage levels CMOS drivers (e.g., microcontrollers) operate at to +5V levels (rail voltage levels) This would require driving voltages beyond the range of operation This constraint is addressed by a technique referred to as “level shifting” or “biasing” Level shifting allows application of voltages in the range of to +2.5V, which is compatible with these drivers This would require an additional voltage level of +2.5V, which can be implemented through a simple resistive voltage divider circuit FIGURE 4: FIGURE 5: MULTIPLEXED LCD SEGMENT ARRANGEMENT MULTIPLEXED LCD DRIVE WAVEFORMS 20 ms COM1 +VD COM2 COM1 COM3 • • • COMn -VD COM2 ••• SEG1 SEG2 SEG3 COM3 ••• SEGm COMn +VS SEG1 (0n) -VS VS + VD COM1 - SEG1 (0n) VS - VD  1997 Microchip Technology Inc DS00563C-page AN563 IMPLEMENTATION The voltage levels are generated by taking advantage of PIC16C5X I/O pin set to input, which tri-states the voltage level seen on the pin This method uses I/O pins to generate the proper voltage levels Figure shows the truth table for generating the voltage levels Figure shows how to create a bitmap for different digits Figure shows the waveforms generated for the accompanying software which implements a hexadecimal counter The ideas presented in the previous section can be applied to any size multiplexed LCD display In our implementation we used a 4-digit LCD from Ocular Inc [1] The circuit diagram used in this application note is shown in Figure Each I/O pin on the PIC16C55 device controls the state of two segments (Figure 6) which requires a total of 16 I/O pins The reference voltages are generated through a simple resistive voltage divider circuit PIC16C55 RA0 FIGURE 7: COMMON PLANE SIGNAL GENERATION LCD (OCULAR) COM0 2.5 1k CP0 COM0 1k COM1 RA1 2.5 RA2 COM1 State CP1 1k RA3 COM0 DIGITS 5,6 RB7:RB0 DIGITS 3,4 RC7:RC0 FIGURE 8: State 1k State VDD VSS SYSTEM CONFIGURATION WITH LCD PINOUT State FIGURE 6: COM1 State +5V +2.5V State +2.5V +5V State 0V +2.5V State +2.5V 0V LCD CHARACTER BITMAP COM0 SEG0 COM1 SEG1 COM0 SEG2 COM1 SEG3 Digit F E D DP A G C B F E D DP A G C B 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 0 0 1 1 1 1 0 0 1 1 1 a 0 1 0 0 1 0 1 1 b 0 1 0 1 0 1 c 0 1 1 1 0 d 0 1 0 0 1 0 1 e 0 1 1 1 1 f 0 1 1 1 0 1 DS00563C-page  1997 Microchip Technology Inc AN563 FIGURE 9: EXAMPLE OF OUTPUT WAVEFORMS FOR DIGIT VDD V1 V2 COM0 VDD V1 V2 COM1 VDD V2 SEGn VDD SEGn + V2 V2 V1 0V -V1 -V2 COM0 - SEGn ( selected waveform) COM0 - SEGn + (non selected waveform) frame CONCLUSION In this application note we have demonstrated the use of PIC16C5X devices to implement a simple LCD controller As discussed earlier, it is important to keep the generated DC voltage to a minimum to extend the life of the LCD Ideally one should switch all the I/O lines simultaneously, however, implementation of software of the LCD controller will necessarily introduce a delay which is proportional to the instruction cycle of the microcontroller, as shown in Figure 10 Therefore it is necessary to keep the switching time to a minimum Our implementation introduced less than 50 mV of DC voltage on the segment lines which is below the manufacturer’s recommended DC offset voltage of 60 mV REFERENCES [1] Ocular Inc., Drawing number JH074 V1 0V -V1 FLCD FIGURE 10: MICROCONTROLLER GENERATED OUTPUT WAVEFORM COM0 SEGX ∆t -4 µs 1/∆t -0.25 MHz  1997 Microchip Technology Inc DS00563C-page AN563 Please check the Microchip BBS for the latest version of the source code Microchip’s Worldwide Web Address: www.microchip.com; Bulletin Board Support: MCHIPBBS using CompuServe® (CompuServe membership not required) APPENDIX A: PIC16C5X AS A MULTIPLEXED LCD DRIVER MPASM 01.40 Released LOC OBJECT CODE VALUE 000001FF 000001FF 000003FF 000007FF 00000001 00000002 00000003 00000004 00000005 00000006 00000007 00000008 00000009 0000000A 0000000B 0000000C 0000000D 00000060 00000000 00000001 00000002 DS00563C-page LCD.ASM 1-16-1997 16:45:44 PAGE LINE SOURCE TEXT 00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 LIST C=132,n=0,p=16c55,r=dec ;*********************************************************** ; Project: PIC16C5X as a multiplexed LCD driver * ; * ; Revision history: * ; 04/14/93 original * ; 1-15-97 Compatability with MPASMWIN 1.40 * ;*********************************************************** ; Equates pic54 pic55 pic56 pic57 equ equ equ equ 0x1ff 0x1ff 0x3ff 0x7ff ; Define Reset Vectors TMR0 pc status fsr equ equ equ equ ; ; ; ; porta portb portc equ equ equ ; f5 ; f6 ; f8 f1 f2 f3 f4 ; realtime mode registers currentState msTimer sTimerLow sTimerHigh digit56 digit34 equ equ equ equ equ equ currentState+1 msTimer+1 sTimerLow+1 sTimerHigh+1 digit56+1 ; Millisecond timer ; Lower byte second timer ; Upper byte second timer ; Misc definitions FIVEMSEC equ 96 w f equ equ z equ ; Assuming 4.096 MHz crystal ; Status register bits ;******************************************************** ; Port assignments * ; * ; porta - bit0: Common Plane * ; bit1: Common Plane * ; bit2: Common Plane * ; bit3: Common Plane * ; *  1997 Microchip Technology Inc AN563 0000 0000 0000 0001 0002 0003 0C01 0025 0C08 0005 0004 0C00 0005 0026 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120  1997 Microchip Technology Inc ; portb - bit0: 6B/DP * ; bit1: 6C/6D * ; bit2: 6G/6E * ; bit3: 6A/6F * ; bit4: 5B/DP * ; bit5: 5C/5D * ; bit6: 5G/5E * ; bit7: 5A/5F * ; * ; portc - bit0: 4B/DP * ; - bit1: 4C/4D * ; - bit2: 4G/4E * ; - bit3: 4A/4F * ; - bit4: 3B/DP * ; - bit5: 3C/3D * ; - bit6: 3G/3E * ; - bit7: 3A/3F * ; * ;******************************************************** ;******************************************************** ; Macro definitions * ;******************************************************** UpdateState macro State, Table swapf andlw call movwf swapf sTimerLow, w 0xf Table digit56 digit56, f movf andlw call iorwf sTimerLow, w 0xf Table digit56, f swapf andlw call movwf swapf sTimerHigh, w 0xf Table digit34 digit34, f movf andlw call iorwf sTimerHigh, w 0xf Table digit34, f movf movwf movf movwf endm digit34, w portc digit56, w portb org ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Display digits & ; Display digits & ; Initialize ports A, B, and C and TMR0 In case of output data ; values, set the data latch first, then set the port direction Initialize movlw movwf movlw tris 00000001b porta 00001000b porta ; Set data latch movlw movwf 00000000b portb ; Set levels to low ; Set I/O direction DS00563C-page AN563 0006 0C00 0007 0006 0008 0009 000A 000B 0C00 0027 0C00 0007 000C 0C04 000D 0002 000E 0C60 000F 0021 0010 0C04 0011 0028 0012 0C0D 0013 0029 0014 006A 0015 006B 0016 0800 0017 0017 0201 0018 0743 0019 0A17 001A 0C60 001B 0021 001C 02E9 001D 0A21 001E 03EA 001F 0A21 0020 02AB 0021 0021 0004 0022 00C8 0023 0E03 DS00563C-page 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 movlw tris 00000000b portb ; Set as outputs movlw movwf movlw tris 00000000b portc 00000000b portc ; Set levels to low movlw option 0x04 ; Set prescaler movlw movwf FIVEMSEC TMR0 ; TMR0 = 5ms movlw movwf currentState movlw movwf 0xd msTimer clrf clrf sTimerLow sTimerHigh retlw ; Set as outputs ; Initialize millisecond timer ; Clear second counter ; Check timer register for timing out (TMR0 = 0) Remain in the ; loop until the timer times out ; Wait for 5ms timer timeout Timer_Check movf btfss goto ; ; ; ; ; ; ; ; ; ; ; ; ; TMR0, w status, z Timer_Check movlw movwf FIVEMSEC TMR0 decfsz goto msTimer, f Update_Backplane incfsz goto incf sTimerLow, f Update_Backplane sTimerHigh, f ; Update second counter RA0 and RA1 are used to control voltage level for common plane RA2 and RA3 are used to control voltage level for common plane There are four possible states with different voltage levels as follows: State - cp0 cp1 State - cp0 cp1 State - cp0 cp1 State - cp0 cp1 = = = = = = = = +5v +2.5v +2.5v +5v 0v +2.5v +2.5v 0v Update_Backplane clrwdt decf andlw ra0=1, ra2=1, ra0=1, ra2=1, ra0=0, ra2=1, ra0=1, ra2=0, ra1=x ra3=0 ra1=0 ra3=x ra1=x ra3=0 ra1=0 ra3=x ; Reset watchdog timer currentState, w 0x03 ; Update w register ; Use only bit0/1  1997 Microchip Technology Inc AN563 0024 0028 0025 01E2 0026 0AAD 0027 0A81 0028 0A55 0029 0029 002A 002B 002C 002D 038A 0E0F 0944 002C 03AC 002E 002F 0030 0031 020A 0E0F 0944 012C 0032 0033 0034 0035 0036 038B 0E0F 0944 002D 03AD 0037 0038 0039 003A 020B 0E0F 0944 012D 003B 003C 003D 003E 020D 0027 020C 0026 003F 0040 0041 0042 0C05 0025 0C02 0005 0043 0800 0044 0044 01E2 0045 0046 0047 0048 0049 004A 004B 004C 004D 004E 004F 0050 0051 0052 0053 0054 0804 080C 0802 0800 0808 0801 080F 0804 0800 0800 0800 0809 080B 0808 0803 0803 00187 00188 00189 00190 00191 00192 00193 00194 00195 00196 00197 00198 M M M M M M M M M M M M M M M M M M M M M M M M M M M 00199 00200 00201 00202 00203 00204 00205 00206 00207 00208 00209 00210 00211 00212 00213 00214 00215 00216 00217 00218 00219 00220 00221 00222 00223 00224 00225  1997 Microchip Technology Inc currentState pc, f goto goto goto goto State3 State2 State1 State0 ; movwf addwf ; Update currentState ; State State0 UpdateState State0, S0_Table swapf andlw call movwf swapf sTimerLow, w 0xf S0_Table digit56 digit56, f movf andlw call iorwf sTimerLow, w 0xf S0_Table digit56, f swapf andlw call movwf swapf sTimerHigh, w 0xf S0_Table digit34 digit34, f movf andlw call iorwf sTimerHigh, w 0xf S0_Table digit34, f movf movwf movf movwf digit34, w portc digit56, w portb movlw movwf movlw tris 00000101b porta 00000010b porta retlw ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Display digits & ; Display digits & S0_Table addwf pc, f ; Add offset to pc retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw 0100b 1100b 0010b 0000b 1000b 0001b 1111b 0100b 0000b 0000b 0000b 1001b 1011b 1000b 0011b 0011b ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; a b c d e f DS00563C-page AN563 0055 0055 0056 0057 0058 0059 038A 0E0F 0970 002C 03AC 005A 005B 005C 005D 020A 0E0F 0970 012C 005E 005F 0060 0061 0062 038B 0E0F 0970 002D 03AD 0063 0064 0065 0066 020B 0E0F 0970 012D 0067 0068 0069 006A 020D 0027 020C 0026 006B 006C 006D 006E 0C05 0025 0C08 0005 006F 0800 0070 0070 01E2 0071 0072 0073 0074 0075 0076 0077 0078 0079 007A 007B 007C 007D 007E 007F 0080 0801 080F 0809 080D 0807 0805 080F 080F 0801 0805 0803 0801 0809 0809 0801 0803 0081 DS00563C-page 10 00226 00227 00228 00229 00230 M M M M M M M M M M M M M M M M M M M M M M M M M M M 00231 00232 00233 00234 00235 00236 00237 00238 00239 00240 00241 00242 00243 00244 00245 00246 00247 00248 00249 00250 00251 00252 00253 00254 00255 00256 00257 00258 00259 00260 00261 00262 00263 M ; State State1 UpdateState State1, S1_Table swapf andlw call movwf swapf sTimerLow, w 0xf S1_Table digit56 digit56, f movf andlw call iorwf sTimerLow, w 0xf S1_Table digit56, f swapf andlw call movwf swapf sTimerHigh, w 0xf S1_Table digit34 digit34, f movf andlw call iorwf sTimerHigh, w 0xf S1_Table digit34, f movf movwf movf movwf digit34, w portc digit56, w portb movlw movwf movlw tris 00000101b porta 00001000b porta retlw ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Display digits & ; Display digits & S1_Table addwf pc, f retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw 0001b 1111b 1001b 1101b 0111b 0101b 1111b 1111b 0001b 0101b 0011b 0001b 1001b 1001b 0001b 0011b ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; a b c d e f ; State State2 UpdateState State2, S2_Table  1997 Microchip Technology Inc AN563 0081 0082 0083 0084 0085 038A 0E0F 099C 002C 03AC 0086 0087 0088 0089 020A 0E0F 099C 012C 008A 008B 008C 008D 008E 038B 0E0F 099C 002D 03AD 008F 0090 0091 0092 020B 0E0F 099C 012D 0093 0094 0095 0096 020D 0027 020C 0026 0097 0098 0099 009A 0C04 0025 0C02 0005 009B 0800 009C 009C 01E2 009D 009E 009F 00A0 00A1 00A2 00A3 00A4 00A5 00A6 00A7 00A8 00A9 00AA 00AB 00AC 080B 0803 080D 080F 0807 080E 080E 080B 080F 080F 080F 0806 0804 0807 080C 080C 00AD 00AD 00AE 00AF 00B0 00B1 038A 0E0F 09C8 002C 03AC 00B2 020A M swapf sTimerLow, w M andlw 0xf ; Isolate digit (offset) M call S2_Table M movwf digit56 M swapf digit56, f M M movf sTimerLow, w M andlw 0xf ; Isolate digit (offset) M call S2_Table M iorwf digit56, f M M swapf sTimerHigh, w M andlw 0xf ; Isolate digit (offset) M call S2_Table M movwf digit34 M swapf digit34, f M M movf sTimerHigh, w M andlw 0xf ; Isolate digit (offset) M call S2_Table M iorwf digit34, f M M movf digit34, w ; Display digits & M movwf portc M movf digit56, w M movwf portb ; Display digits & 00264 00265 movlw 00000100b 00266 movwf porta 00267 movlw 00000010b 00268 tris porta 00269 00270 retlw 00271 00272 S2_Table 00273 addwf pc, f 00274 00275 retlw 1011b ; 00276 retlw 0011b ; 00277 retlw 1101b ; 00278 retlw 1111b ; 00279 retlw 0111b ; 00280 retlw 1110b ; 00281 retlw 1110b ; 00282 retlw 1011b ; 00283 retlw 1111b ; 00284 retlw 1111b ; 00285 retlw 1111b ; a 00286 retlw 0110b ; b 00287 retlw 0100b ; c 00288 retlw 0111b ; d 00289 retlw 1100b ; e 00290 retlw 1100b ; f 00291 00292 ; State 00293 00294 State3 00295 UpdateState State3, S3_Table M M swapf sTimerLow, w M andlw 0xf ; Isolate digit (offset) M call S3_Table M movwf digit56 M swapf digit56, f M M movf sTimerLow, w  1997 Microchip Technology Inc DS00563C-page 11 AN563 00B3 0E0F 00B4 09C8 00B5 012C 00B6 00B7 00B8 00B9 00BA 038B 0E0F 09C8 002D 03AD 00BB 00BC 00BD 00BE 020B 0E0F 09C8 012D 00BF 00C0 00C1 00C2 020D 0027 020C 0026 00C3 00C4 00C5 00C6 0C01 0025 0C08 0005 00C7 0800 00C8 00C8 01E2 00C9 00CA 00CB 00CC 00CD 00CE 00CF 00D0 00D1 00D2 00D3 00D4 00D5 00D6 00D7 00D8 080E 0800 0806 0802 0808 080A 080E 0800 080E 080A 080C 080E 0806 0806 080E 080C 00D9 00D9 0900 00DA 00DA 0917 00DB 0ADA 01FF 01FF 01FF 0AD9 M M M M M M M M M M M M M M M M M M M 00296 00297 00298 00299 00300 00301 00302 00303 00304 00305 00306 00307 00308 00309 00310 00311 00312 00313 00314 00315 00316 00317 00318 00319 00320 00321 00322 00323 00324 00325 00326 00327 00328 00329 00330 00331 00332 00333 00334 00335 00336 00337 andlw call iorwf 0xf S3_Table digit56, f swapf andlw call movwf swapf sTimerHigh, w 0xf S3_Table digit34 digit34, f movf andlw call iorwf sTimerHigh, w 0xf S3_Table digit34, f movf movwf movf movwf digit34, w portc digit56, w portb movlw movwf movlw tris 00000001b porta 00001000b porta retlw ; Isolate digit (offset) ; Isolate digit (offset) ; Isolate digit (offset) ; Display digits & ; Display digits & S3_Table addwf pc, f retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw retlw 1110b 0000b 0110b 0010b 1000b 1010b 1110b 0000b 1110b 1010b 1100b 1110b 0110b 0110b 1110b 1100b ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; a b c d e f ; Main code Start call Initialize call goto Timer_Check Repeat org pic55 Repeat System_Reset goto MEMORY USAGE MAP (‘X’ = Used, Start END ‘-’ = Unused) 0000 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 0040 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX DS00563C-page 12  1997 Microchip Technology Inc AN563 0080 : XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXX 00C0 : XXXXXXXXXXXXXXXX XXXXXXXXXXXX -01C0 : -X All other memory blocks unused Program Memory Words Used: Program Memory Words Free: Errors : Warnings : Messages : 0 reported, reported,  1997 Microchip Technology Inc 221 291 suppressed suppressed DS00563C-page 13 Note the following details of the code protection feature on PICmicro® MCUs • • • • • • The PICmicro family meets the specifications contained in the Microchip Data Sheet Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions There are dishonest and possibly illegal methods used to breach the code protection feature All of these methods, to our knowledge, require using the PICmicro microcontroller in a manner outside the operating specifications contained in the data sheet The person doing so may be engaged in theft of intellectual property Microchip is willing to work with the customer who is concerned about the integrity of their code Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code Code protection does not mean that we are guaranteeing the product as “unbreakable” Code protection is constantly evolving We at Microchip are committed to continuously improving the code protection features of our product If you have any further questions about this matter, please contact the local sales office nearest to you Information contained in this publication regarding device applications and the like is intended through suggestion only and may be superseded by updates It is your responsibility to ensure that your application meets with your specifications No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise Use of Microchip’s products as critical components in life support systems is not authorized except with express written approval by Microchip No licenses are conveyed, implicitly or otherwise, under any intellectual property rights Trademarks The Microchip name and logo, the Microchip logo, FilterLab, KEELOQ, microID, MPLAB, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A and other countries dsPIC, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, microPort, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, MXDEV, PICC, PICDEM, PICDEM.net, rfPIC, Select Mode and Total Endurance are trademarks of Microchip Technology Incorporated in the U.S.A Serialized Quick Turn Programming (SQTP) is a service mark of Microchip Technology Incorporated in the U.S.A All other trademarks mentioned herein are property of their respective companies © 2002, Microchip Technology Incorporated, Printed in the U.S.A., All Rights Reserved Printed on recycled paper Microchip received QS-9000 quality system certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona in July 1999 The Company’s quality system processes and procedures are QS-9000 compliant for its PICmicro® 8-bit MCUs, KEELOQ® code hopping devices, Serial EEPROMs and microperipheral products In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001 certified  2002 Microchip Technology Inc M WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC Japan Corporate Office Australia 2355 West Chandler Blvd Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Web Address: http://www.microchip.com Microchip Technology Australia Pty Ltd Suite 22, 41 Rawson Street Epping 2121, NSW Australia Tel: 61-2-9868-6733 Fax: 61-2-9868-6755 Microchip Technology Japan K.K Benex S-1 6F 3-18-20, Shinyokohama Kohoku-Ku, Yokohama-shi Kanagawa, 222-0033, Japan Tel: 81-45-471- 6166 Fax: 81-45-471-6122 Rocky Mountain China - Beijing 2355 West Chandler Blvd Chandler, AZ 85224-6199 Tel: 480-792-7966 Fax: 480-792-7456 Microchip Technology Consulting (Shanghai) Co., Ltd., Beijing Liaison Office Unit 915 Bei Hai Wan Tai Bldg No Chaoyangmen Beidajie Beijing, 100027, No China Tel: 86-10-85282100 Fax: 86-10-85282104 Atlanta 500 Sugar Mill Road, Suite 200B Atlanta, GA 30350 Tel: 770-640-0034 Fax: 770-640-0307 Boston Lan Drive, Suite 120 Westford, MA 01886 Tel: 978-692-3848 Fax: 978-692-3821 Chicago 333 Pierce Road, Suite 180 Itasca, IL 60143 Tel: 630-285-0071 Fax: 630-285-0075 Dallas 4570 Westgrove Drive, Suite 160 Addison, TX 75001 Tel: 972-818-7423 Fax: 972-818-2924 Detroit Tri-Atria Office Building 32255 Northwestern Highway, Suite 190 Farmington Hills, MI 48334 Tel: 248-538-2250 Fax: 248-538-2260 Kokomo 2767 S Albright Road Kokomo, Indiana 46902 Tel: 765-864-8360 Fax: 765-864-8387 Los Angeles 18201 Von Karman, Suite 1090 Irvine, CA 92612 Tel: 949-263-1888 Fax: 949-263-1338 China - Chengdu Microchip Technology Consulting (Shanghai) Co., Ltd., Chengdu Liaison Office Rm 2401, 24th Floor, Ming Xing Financial Tower No 88 TIDU Street Chengdu 610016, China Tel: 86-28-6766200 Fax: 86-28-6766599 China - Fuzhou Microchip Technology Consulting (Shanghai) Co., Ltd., Fuzhou Liaison Office Unit 28F, World Trade Plaza No 71 Wusi Road Fuzhou 350001, China Tel: 86-591-7503506 Fax: 86-591-7503521 China - Shanghai Microchip Technology Consulting (Shanghai) Co., Ltd Room 701, Bldg B Far East International Plaza No 317 Xian Xia Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060 China - Shenzhen 150 Motor Parkway, Suite 202 Hauppauge, NY 11788 Tel: 631-273-5305 Fax: 631-273-5335 Microchip Technology Consulting (Shanghai) Co., Ltd., Shenzhen Liaison Office Rm 1315, 13/F, Shenzhen Kerry Centre, Renminnan Lu Shenzhen 518001, China Tel: 86-755-2350361 Fax: 86-755-2366086 San Jose Hong Kong Microchip Technology Inc 2107 North First Street, Suite 590 San Jose, CA 95131 Tel: 408-436-7950 Fax: 408-436-7955 Microchip Technology Hongkong Ltd Unit 901-6, Tower 2, Metroplaza 223 Hing Fong Road Kwai Fong, N.T., Hong Kong Tel: 852-2401-1200 Fax: 852-2401-3431 New York Toronto 6285 Northam Drive, Suite 108 Mississauga, Ontario L4V 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509 India Microchip Technology Inc India Liaison Office Divyasree Chambers Floor, Wing A (A3/A4) No 11, O’Shaugnessey Road Bangalore, 560 025, India Tel: 91-80-2290061 Fax: 91-80-2290062 Korea Microchip Technology Korea 168-1, Youngbo Bldg Floor Samsung-Dong, Kangnam-Ku Seoul, Korea 135-882 Tel: 82-2-554-7200 Fax: 82-2-558-5934 Singapore Microchip Technology Singapore Pte Ltd 200 Middle Road #07-02 Prime Centre Singapore, 188980 Tel: 65-334-8870 Fax: 65-334-8850 Taiwan Microchip Technology Taiwan 11F-3, No 207 Tung Hua North Road Taipei, 105, Taiwan Tel: 886-2-2717-7175 Fax: 886-2-2545-0139 EUROPE Denmark Microchip Technology Nordic ApS Regus Business Centre Lautrup hoj 1-3 Ballerup DK-2750 Denmark Tel: 45 4420 9895 Fax: 45 4420 9910 France Microchip Technology SARL Parc d’Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany Microchip Technology GmbH Gustav-Heinemann Ring 125 D-81739 Munich, Germany Tel: 49-89-627-144 Fax: 49-89-627-144-44 Italy Microchip Technology SRL Centro Direzionale Colleoni Palazzo Taurus V Le Colleoni 20041 Agrate Brianza Milan, Italy Tel: 39-039-65791-1 Fax: 39-039-6899883 United Kingdom Arizona Microchip Technology Ltd 505 Eskdale Road Winnersh Triangle Wokingham Berkshire, England RG41 5TU Tel: 44 118 921 5869 Fax: 44-118 921-5820 01/18/02  2002 Microchip Technology Inc [...]... Data Sheet Microchip believes that its family of PICmicro microcontrollers is one of the most secure products of its kind on the market today, when used in the intended manner and under normal conditions There are dishonest and possibly illegal methods used to breach the code protection feature All of these methods, to our knowledge, require using the PICmicro microcontroller in a manner outside the... the security of their code Code protection does not mean that we are guaranteeing the product as “unbreakable” Code protection is constantly evolving We at Microchip are committed to continuously improving the code protection features of our product If you have any further questions about this matter, please contact the local sales office nearest to you Information contained in this publication regarding... meets with your specifications No representation or warranty is given and no liability is assumed by Microchip Technology Incorporated with respect to the accuracy or use of such information, or infringement of patents or other intellectual property rights arising from such use or otherwise Use of Microchip’s products as critical components in life support systems is not authorized except with express written... FilterLab, KEELOQ, microID, MPLAB, PIC, PICmicro, PICMASTER, PICSTART, PRO MATE, SEEVAL and The Embedded Control Solutions Company are registered trademarks of Microchip Technology Incorporated in the U.S.A and other countries dsPIC, ECONOMONITOR, FanSense, FlexROM, fuzzyLAB, In-Circuit Serial Programming, ICSP, ICEPIC, microPort, Migratable Memory, MPASM, MPLIB, MPLINK, MPSIM, MXDEV, PICC, PICDEM, PICDEM.net,... microperipheral products In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001 certified  2002 Microchip Technology Inc M WORLDWIDE SALES AND SERVICE AMERICAS ASIA/PACIFIC Japan Corporate Office Australia 2355 West Chandler Blvd Chandler, AZ 85224-6199 Tel: 480-792-7200 Fax: 480-792-7277 Technical Support: 480-792-7627 Web Address: http://www.microchip.com... Atlanta, GA 30350 Tel: 770-640-0034 Fax: 770-640-0307 Boston 2 Lan Drive, Suite 120 Westford, MA 01886 Tel: 978-692-3848 Fax: 978-692-3821 Chicago 333 Pierce Road, Suite 180 Itasca, IL 60143 Tel: 630-285-0071 Fax: 630-285-0075 Dallas 4570 Westgrove Drive, Suite 160 Addison, TX 75001 Tel: 972-818-7423 Fax: 972-818-2924 Detroit Tri-Atria Office Building 32255 Northwestern Highway, Suite 190 Farmington Hills,... Nordic ApS Regus Business Centre Lautrup hoj 1-3 Ballerup DK-2750 Denmark Tel: 45 4420 9895 Fax: 45 4420 9910 France Microchip Technology SARL Parc d’Activite du Moulin de Massy 43 Rue du Saule Trapu Batiment A - ler Etage 91300 Massy, France Tel: 33-1-69-53-63-20 Fax: 33-1-69-30-90-79 Germany Microchip Technology GmbH Gustav-Heinemann Ring 125 D-81739 Munich, Germany Tel: 49-89-627-144 0 Fax: 49-89-627-144-44... 852-2401-1200 Fax: 852-2401-3431 New York Toronto 6285 Northam Drive, Suite 108 Mississauga, Ontario L4V 1X5, Canada Tel: 905-673-0699 Fax: 905-673-6509 India Microchip Technology Inc India Liaison Office Divyasree Chambers 1 Floor, Wing A (A3/A4) No 11, O’Shaugnessey Road Bangalore, 560 025, India Tel: 91-80-2290061 Fax: 91-80-2290062 Korea Microchip Technology Korea 168-1, Youngbo Bldg 3 Floor Samsung-Dong,... Office Unit 28F, World Trade Plaza No 71 Wusi Road Fuzhou 350001, China Tel: 86-591-7503506 Fax: 86-591-7503521 China - Shanghai Microchip Technology Consulting (Shanghai) Co., Ltd Room 701, Bldg B Far East International Plaza No 317 Xian Xia Road Shanghai, 200051 Tel: 86-21-6275-5700 Fax: 86-21-6275-5060 China - Shenzhen 150 Motor Parkway, Suite 202 Hauppauge, NY 11788 Tel: 631-273-5305 Fax: 631-273-5335 ... www.microchip.com; Bulletin Board Support: MCHIPBBS using CompuServe® (CompuServe membership not required) APPENDIX A: PIC16C5X AS A MULTIPLEXED LCD DRIVER MPASM 01.40 Released LOC OBJECT CODE VALUE 000001FF... use a 2x4 format LCD to display hexadecimal digits FIGURE 3: CONTRAST CONTROL CIRCUIT VLCD VDD Two Common Planes V = 4.1 VRMS % Relative Contrast 100% VDD VRMSOFF 1.7 VRMS Contrast Control V1 R... universal to driving LCD segments Figure shows an example of this driving method The LCD frequency is defined as the rate of output changes of the common plane and segment signals, whereas the frame

Ngày đăng: 11/01/2016, 11:51

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN