收藏 分销(赏)

嵌入式开发-HD44780(LCD1602).pdf

上传人:可**** 文档编号:4345851 上传时间:2024-09-09 格式:PDF 页数:59 大小:316.48KB
下载 相关 举报
嵌入式开发-HD44780(LCD1602).pdf_第1页
第1页 / 共59页
嵌入式开发-HD44780(LCD1602).pdf_第2页
第2页 / 共59页
点击查看更多>>
资源描述
1HD44780U(LCD-II)(Dot Matrix Liquid Crystal Display Controller/Driver)DescriptionThe HD44780U dot-matrix liquid crystal display controller and driver LSI displays alphanumerics,Japanese kana characters,and symbols.It can be configured to drive a dot-matrix liquid crystal displayunder the control of a 4-or 8-bit microprocessor.Since all the functions such as display RAM,charactergenerator,and liquid crystal driver,required for driving a dot-matrix liquid crystal display are internallyprovided on one chip,a minimal system can be interfaced with this controller/driver.A single HD44780U can display up to one 8-character line or two 8-character lines.The HD44780U has pin function compatibility with the HD44780S which allows the user to easily replacean LCD-II with an HD44780U.The HD44780U character generator ROM is extended to generate 208 5 8 dot character fonts and 32 5 10 dot character fonts for a total of 240 different character fonts.The low power supply(2.7V to 5.5V)of the HD44780U is suitable for any portable battery-driven productrequiring low power dissipation.Features 5 8 and 5 10 dot matrix possible Low power operation support:2.7 to 5.5V Wide range of liquid crystal display driver power 3.0 to 11V Liquid crystal drive waveform A(One line frequency AC waveform)Correspond to high speed MPU bus interface 2 MHz(when VCC=5V)4-bit or 8-bit MPU interface enabled 80 8-bit display RAM(80 characters max.)9,920-bit character generator ROM for a total of 240 character fonts 208 character fonts(5 8 dot)32 character fonts(5 10 dot)HD44780U2 64 8-bit character generator RAM 8 character fonts(5 8 dot)4 character fonts(5 10 dot)16-common 40-segment liquid crystal display driver Programmable duty cycles 1/8 for one line of 5 8 dots with cursor 1/11 for one line of 5 10 dots with cursor 1/16 for two lines of 5 8 dots with cursor Wide range of instruction functions:Display clear,cursor home,display on/off,cursor on/off,display character blink,cursor shift,display shift Pin function compatibility with HD44780S Automatic reset circuit that initializes the controller/driver after power on Internal oscillator with external resistors Low power consumptionOrdering InformationType No.PackageCGROMHD44780UA00FSHCD44780UA00HD44780UA00TFFP-80BChipTFP-80FJapanese standard fontHD44780UA02FSHCD44780UA02HD44780UA02TFFP-80BChipTFP-80FEuropean standard fontHD44780UBxxFSHCD44780UBxxHD44780UBxxTFFP-80BChipTFP-80FCustom fontNote:xx:ROM code No.HD44780U3HD44780U Block DiagramDisplaydata RAM(DDRAM)80 8 bitsCharactergeneratorROM(CGROM)9,920 bitsCharactergeneratorRAM(CGRAM)64 bytesInstructionregister(IR)TiminggeneratorCommonsignaldriver16-bitshiftregisterSegmentsignaldriver40-bitlatchcircuit40-bitshiftregisterParallel/serial converterandattribute circuitLCD drivevoltageselectorAddresscounterMPUinter-faceInput/outputbufferDataregister(DR)CursorandblinkcontrollerCPGCL1CL2MDRSR/WDB4 to DB7EInstructiondecoderOSC1 OSC2COM1 toCOM16SEG1 toSEG408887405578787VCCGNDV1V2V3V4V5DB0 to DB3ResetcircuitACL8BusyflagHD44780U4 HD44780U Pin Arrangement(FP-80B)1234567891011121314151617181920212223248079787776757473727170696867666564636261605958575655545352515049484746454443424125262728293031323334353637383940FP-80B(Top view)SEG39SEG40COM16COM15COM14COM13COM12COM11COM10COM9COM8COM7COM6COM5COM4COM3COM2COM1DB7DB6DB5DB4DB3DB2SEG22SEG21SEG20SEG19SEG18SEG17SEG16SEG15SEG14SEG13SEG12SEG11SEG10SEG9SEG8SEG7SEG6SEG5SEG4SEG3SEG2SEG1GNDOSC1SEG23SEG24SEG25SEG26SEG27SEG28SEG29SEG30SEG31SEG32SEG33SEG34SEG35SEG36SEG37OSC2V1V2V3V4V5CL1CL2VCCMDRSR/WEDB0DB1SEG38HD44780U5HD44780U Pin Arrangement(TFP-80F)1234567891011121314151617181920807978777675747372717069686766656463626160595857565554535251504948474645444342412122232425262728293031323334353637383940TFP-80F(Top view)COM16COM15COM14COM13COM12COM11COM10COM9COM8COM7COM6COM5COM4COM3COM2COM1DB7DB6DB5DB4SEG20SEG19SEG18SEG17SEG16SEG15SEG14SEG13SEG12SEG11SEG10SEG9SEG8SEG7SEG6SEG5SEG4SEG3SEG2SEG1SEG21SEG22SEG23SEG24SEG25SEG26SEG27SEG28SEG29SEG30SEG31SEG32SEG33SEG34SEG35SEG36SEG37SEG38SEG39SEG40GNDOSC1OSC2V1V2V3V4V5CL1CL2VCCMDRSR/WEDB0DB1DB2DB3HD44780U6HD44780U Pad ArrangementHD44780UType code23XY42218063Chip size:Coordinate:Origin:Pad size:4.90 4.90 mm2Pad center(m)Chip center114 114 m2HD44780U7HCD44780U Pad Location CoordinatesCoordinateCoordinatePad No.FunctionX(um)Y(um)Pad No.FunctionX(um)Y(um)1SEG222100231341DB2207022902SEG212280231342DB3226022903SEG202313208943DB4229020994SEG192313183344DB5229018835SEG182313161745DB6229016676SEG172313140146DB7229014527SEG162313118647COM1231311868SEG15231397048COM223139709SEG14231375549COM3231375510SEG13231353950COM4231353911SEG12231332351COM5231332312SEG11231310852COM6231310813SEG10231310853COM7231310814SEG9231332354COM8231332315SEG8231353955COM9231353916SEG7231375556COM10231375517SEG6231397057COM11231397018SEG52313118658COM122313118619SEG42313140159COM132313140120SEG32313161760COM142313161721SEG22313183361COM152313183322SEG12313207362COM162313209523GND2280229063SEG402296231324OSC12080229064SEG392100231325OSC21749229065SEG381617231326V11550229066SEG371401231327V21268229067SEG361186231328V3941229068SEG35970231329V4623229069SEG34755231330V5304229070SEG33539231331CL148229071SEG32323231332CL2142229072SEG31108231333VCC309229073SEG30108231334M475229074SEG29323231335D665229075SEG28539231336RS832229076SEG27755231337R/W1022229077SEG26970231338E1204229078SEG251186231339DB01454229079SEG2414012313 40DB11684229080SEG2316172313HD44780U8Pin FunctionsSignalNo.ofLinesI/ODeviceInterfaced withFunctionRS1IMPUSelects registers.0:Instruction register(for write)Busy flag:address counter(for read)1:Data register(for write and read)R/W1IMPUSelects read or write.0:Write1:ReadE1IMPUStarts data read/write.DB4 to DB74I/OMPUFour high order bidirectional tristate data buspins.Used for data transfer and receive betweenthe MPU and the HD44780U.DB7 can be usedas a busy flag.DB0 to DB34I/OMPUFour low order bidirectional tristate data bus pins.Used for data transfer and receive between theMPU and the HD44780U.These pins are not used during 4-bit operation.CL11OExtension driverClock to latch serial data D sent to the extensiondriverCL21OExtension driverClock to shift serial data DM1OExtension driverSwitch signal for converting the liquid crystaldrive waveform to ACD1OExtension driverCharacter pattern data corresponding to eachsegment signalCOM1 to COM16 16OLCDCommon signals that are not used are changedto non-selection waveforms.COM9 to COM16are non-selection waveforms at 1/8 duty factorand COM12 to COM16 are non-selectionwaveforms at 1/11 duty factor.SEG1 to SEG4040OLCDSegment signalsV1 to V55Power supplyPower supply for LCD driveVCC V5=11 V(max)VCC,GND2Power supplyVCC:2.7V to 5.5V,GND:0VOSC1,OSC22Oscillationresistor clockWhen crystal oscillation is performed,a resistormust be connected externally.When the pin inputis an external clock,it must be input to OSC1.HD44780U9Function DescriptionRegistersThe HD44780U has two 8-bit registers,an instruction register(IR)and a data register(DR).The IR stores instruction codes,such as display clear and cursor shift,and address information for displaydata RAM(DDRAM)and character generator RAM(CGRAM).The IR can only be written from the MPU.The DR temporarily stores data to be written into DDRAM or CGRAM and temporarily stores data to beread from DDRAM or CGRAM.Data written into the DR from the MPU is automatically written intoDDRAM or CGRAM by an internal operation.The DR is also used for data storage when reading datafrom DDRAM or CGRAM.When address information is written into the IR,data is read and then storedinto the DR from DDRAM or CGRAM by an internal operation.Data transfer between the MPU is thencompleted when the MPU reads the DR.After the read,data in DDRAM or CGRAM at the next address issent to the DR for the next read from the MPU.By the register selector(RS)signal,these two registers canbe selected(Table 1).Busy Flag(BF)When the busy flag is 1,the HD44780U is in the internal operation mode,and the next instruction will notbe accepted.When RS=0 and R/W=1(Table 1),the busy flag is output to DB7.The next instructionmust be written after ensuring that the busy flag is 0.Address Counter(AC)The address counter(AC)assigns addresses to both DDRAM and CGRAM.When an address of aninstruction is written into the IR,the address information is sent from the IR to the AC.Selection of eitherDDRAM or CGRAM is also determined concurrently by the instruction.After writing into(reading from)DDRAM or CGRAM,the AC is automatically incremented by 1(decremented by 1).The AC contents are then output to DB0 to DB6 when RS=0 and R/W=1(Table 1).Table 1Register SelectionRSR/WOperation00IR write as an internal operation(display clear,etc.)01Read busy flag(DB7)and address counter(DB0 to DB6)10DR write as an internal operation(DR to DDRAM or CGRAM)11DR read as an internal operation(DDRAM or CGRAM to DR)HD44780U10Display Data RAM(DDRAM)Display data RAM(DDRAM)stores display data represented in 8-bit character codes.Its extendedcapacity is 80 8 bits,or 80 characters.The area in display data RAM(DDRAM)that is not used fordisplay can be used as general data RAM.See Figure 1 for the relationships between DDRAM addressesand positions on the liquid crystal display.The DDRAM address(ADD)is set in the address counter(AC)as hexadecimal.1-line display(N=0)(Figure 2)When there are fewer than 80 display characters,the display begins at the head position.Forexample,if using only the HD44780,8 characters are displayed.See Figure 3.When the display shift operation is performed,the DDRAM address shifts.See Figure 3.AC6AC5 AC4 AC3AC2 AC1AC01001110AC(hexadecimal)Example:DDRAM address 4EHigh orderbitsLow orderbitsFigure 1 DDRAM Address00010203044E4FDDRAMaddress(hexadecimal)Display position(digit)123457980.Figure 2 1-Line DisplayDDRAMaddressDisplayposition1234567800 01 02 03 04 05 06 07Forshift leftForshift right00 01 02 03 04 05 0601 02 03 04 05 06 07 084FFigure 3 1-Line by 8-Character Display ExampleHD44780U11 2-line display(N=1)(Figure 4)Case 1:When the number of display characters is less than 40 2 lines,the two lines are displayedfrom the head.Note that the first line end address and the second line start address are notconsecutive.For example,when just the HD44780 is used,8 characters 2 lines are displayed.SeeFigure 5.When display shift operation is performed,the DDRAM address shifts.See Figure 5.00010203042627DDRAMaddress(hexadecimal)Displayposition123453940.40414243446667.Figure 4 2-Line DisplayDDRAMaddressDisplayposition1234567800 01 02 03 04 05 06 07Forshift leftForshift right40 41 42 43 44 45 46 4701 02 03 04 05 06 07 0841 42 43 44 45 46 47 4800 01 02 03 04 05 0640 41 42 43 44 45 462767Figure 5 2-Line by 8-Character Display ExampleHD44780U12 Case 2:For a 16-character 2-line display,the HD44780 can be extended using one 40-outputextension driver.See Figure 6.When display shift operation is performed,the DDRAM address shifts.See Figure 6.DDRAMaddressDisplayposition123456789 10 11 12 13 14 15 1600 01 02 03 04 05 06 07 08 09 0A0B0C0D0E 0FForshift left00 01 02 03 04 05 06 07 08 09 0A0B0C0D0E2740 41 42 43 44 45 46 47 48 49 4A4B4C4D4E 4FHD44780U displayExtension driverdisplay020103 04 05 06 07 08 09 0A0B0C0D0E 0F10Forshift right41 42 43 44 45 46 47 48 49 4A4B4C4D4E 4F 5040 41 42 43 44 45 46 47 48 49 4A4B4C4D4E67Figure 6 2-Line by 16-Character Display ExampleHD44780U13Character Generator ROM(CGROM)The character generator ROM generates 5 8 dot or 5 10 dot character patterns from 8-bit charactercodes(Table 4).It can generate 208 5 8 dot character patterns and 32 5 10 dot character patterns.User-defined character patterns are also available by mask-programmed ROM.Character Generator RAM(CGRAM)In the character generator RAM,the user can rewrite character patterns by program.For 5 8 dots,eightcharacter patterns can be written,and for 5 10 dots,four character patterns can be written.Write into DDRAM the character codes at the addresses shown as the left column of Table 4 to show thecharacter patterns stored in CGRAM.See Table 5 for the relationship between CGRAM addresses and data and display patterns.Areas that are not used for display can be used as general data RAM.Modifying Character Patterns Character pattern development procedureThe following operations correspond to the numbers listed in Figure 7:1.Determine the correspondence between character codes and character patterns.2.Create a listing indicating the correspondence between EPROM addresses and data.3.Program the character patterns into the EPROM.4.Send the EPROM to Hitachi.5.Computer processing on the EPROM is performed at Hitachi to create a character pattern listing,whichis sent to the user.6.If there are no problems within the character pattern listing,a trial LSI is created at Hitachi and samplesare sent to the user for evaluation.When it is confirmed by the user that the character patterns arecorrectly written,mass production of the LSI proceeds at Hitachi.HD44780U14Determinecharacter patternsCreate EPROMaddress data listingWrite EPROMEPROM HitachiComputerprocessingCreate characterpattern listingEvaluatecharacterpatternsOK?Art workSampleevaluationOK?MaskingTrialSampleNoYesNoYesM/T132456Note:For a description of the numbers used in this figure,refer to the preceding page.UserHitachiMassproductionStartFigure 7 Character Pattern Development ProcedureHD44780U15 Programming character patternsThis section explains the correspondence between addresses and data used to program character patternsin EPROM.The HD44780U character generator ROM can generate 208 5 8 dot character patterns and32 5 10 dot character patterns for a total of 240 different character patterns.Character patternsEPROM address data and character pattern data correspond with each other to form a 5 8 or 5 10 dot character pattern(Tables 2 and 3).Table 2Example of Correspondence between EPROM Address Data and Character Pattern(5 8 Dots)DataO4 O3 O2 O1 O00 0 0 10 0 1 00 0 1 10 1 0 00 1 1 0 0 0 1 0 EPROM AddressCharacter codeLinepositionLSB0 1 0 10 1 1 00 1 1 10 0 0 01 0 0 11 0 1 01 0 1 11 1 0 01 1 0 11 1 1 01 1 1 11 0 0 01 1 0 0 11 0 0 0 11 0 0 0 11 0 0 0 01 0 0 0 01 0 1 1 0Cursor position1 1 1 1 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 00 0 0 0 0A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0A11Notes:1.EPROM addresses A11 to A4 correspond to a character code.2.EPROM addresses A3 to A0 specify a line position of the character pattern.3.EPROM data O4 to O0 correspond to character pattern data.4.EPROM data O5 to O7 must be specified as 0.5.A lit display position(black)corresponds to a 1.6.Line 9 and the following lines must be blanked with 0s for a 5 8 dot character fonts.HD44780U16 Handling unused character patterns1.EPROM data outside the character pattern area:Always input 0s.2.EPROM data in CGRAM area:Always input 0s.(Input 0s to EPROM addresses 00H to FFH.)3.EPROM data used when the user does not use any HD44780U character pattern:According to the userapplication,handled in one of the two ways listed as fo
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服