总的来说,Proteus软件中能够仿真的图形LCD驱动器分成三类。 1. Toshiba T6963C Controller,主要有以下型号: LM3228、LM3229、LM3267、LM3283、LM3287、LM4228、LM4265、LM4267、LM4283、LM4287、PG12864F、PG24064F、PG128128A、PG160128A。 2. Sharp SED1520 Controller,主要有以下型号:AGM1232G、EW12A03GLY、HDM32GS12-B、HDM32GS12Y-B。 3. Sharp SED1565 Controller,主要有以下型号:HDG12864F-1、HDS12864F-3、HDG12864L-4、HDG12864L-6、NOKIA7110、TG126410GFSB、TG13650FEY 4. Samsung KS0108 Controller,主要有以下型号:AMPIRE128x64、LGM12641BS1R。 注意:大家比较关心的ST7920驱动器Proteus里面是没有的,不要再费尽心思下载什么带中文字库的LCD模型,导入Proteus,费时费力不讨好! LM3328是一款内置T6963C驱动器的图形液晶显示器,显示范围为128*64,单色。采用Atmega16单片机,用C语言实现中文显示,是一件特别简单的事情,全部C语言代码仅30余行。接线及Proteus仿真图、程序均在下文中给出。 AVR驱动LM3228实现中文显示/*
Chip type : ATmega16
Program type : Application
AVR Core Clock frequency: 8.000000 MHz
Memory model : Small
External RAM size : 0
Data Stack size : 256
*/
#include
// Graphic Display functions
#include
extern flash unsigned char HZ16X16[];
extern flash unsigned char EN8X16[];
// Font used for displaying text
// on the graphic display
#include
unsigned char i=0;
void main(void)
{
// Variable used to store graphic display
// controller initialization data
GLCDINIT_t glcd_init_data;
// Graphic Display Controller initialization
// The T6963 connections are specified in the
// Project|Configure|C Compiler|Libraries|Graphic Display menu:
// DB0 - PORTA Bit 0
// DB1 - PORTA Bit 1
// DB2 - PORTA Bit 2
// DB3 - PORTA Bit 3
// DB4 - PORTA Bit 4
// DB5 - PORTA Bit 5
// DB6 - PORTA Bit 6
// DB7 - PORTA Bit 7
// C /D - PORTB Bit 0
// /CE - PORTB Bit 1
// /RD - PORTB Bit 2
// /WR - PORTB Bit 3
// /RESET - PORTB Bit 4
// Specify the current font for displaying text
glcd_init_data.font=font5x7;
// No function is used for reading
// image data from external memory
glcd_init_data.readxmem=NULL;
// No function is used for writing
// image data to external memory
glcd_init_data.writexmem=NULL;
glcd_init(&glcd_init_data);
glcd_settextjustify(0,0);
while(1)
{
glcd_setfont(HZ16X16);
glcd_moveto(8,0);
for(i=128;i |