仍是那个89C52和12232的组合。可是这个12232没有Datasheet。最终我仍是靠自己的剖析才能和对卖家材料那么一点点的信赖(现在看来是过错的)搞定(?)了这个的驱动。
现在我一向找不到办法让这个玩意显现下半屏。现在上半屏显现什么,下半屏就跟着显现。我晕……
不过至少靠前面两个程序的协助显现出了能够辨认的字符。
不过说道这个倒让我说一下,我的P0口上的上拉电阻形似挂掉了,成果导致我显现汉字老是掉笔画,很古怪,尝试了用NE555/4046发生的时钟信号驱动CLK端均未成功。成果加上上拉电阻就好了。
这个是前次的驱动http://www.51hei.com/mcu/1560.html 作用如同更好些了
上显现作用图:
上程序(仍是3/4制品,我得看看怎么着让下半屏亮起来):
完好的源代码下载:http://www.51hei.com/f/12232de.rar
/*------*FILE main.c* 测验驱动12232*/#include #include//#define DEBUG#ifdef DEBUG#include #endif/*-----DEV%&&&&&%E IO Pin map.* NMTB-S000389FGHSAY-A* 死马当活马医吧!!!* 时序68 series *///仿二进制赋值#define HEX__(n) 0x##n##UL#define B8__(x) ( (x & 0x0000000FUL) ? 1:0 )+( (x & 0x000000F0UL) ? 2:0 )+( (x & 0x00000F00UL) ? 4:0 )+( (x & 0x0000F000UL) ? 8:0 )+( (x & 0x000F0000UL) ? 16:0 )+( (x & 0x00F00000UL) ? 32:0 )+( (x & 0x0F000000UL) ? 64:0 )+( (x & 0xF0000000UL) ? 128:0 )#define B8(x) ((unsigned char)B8__(HEX__(x)))#define B16(x_msb,x_lsb) (((unsigned int)B8(x_msb)<<8) + B8(x_lsb))#define B32(x_msb,x_2,x_3,x_lsb) (((unsigned long)B8(x_msb)<<24) + ((unsigned long)B8(x_2)<<16) + ((unsigned long)B8(x_3)<<8) + B8(x_lsb))#define TH 0xFE#define TL 0x40//2K定时器值#define LCD_RESET 0xE2 //复位 #define LCD_DISPLAY_ON 0xAF //显现开 #define LCD_DISPLAY_OFF 0xAE //显现关 #define LCD_PS_ON 0xA5 //节电驱动 #define LCD_PS_OFF 0xA4 //正常驱动 #define LCD_DUTY16 0xA8 //占空比1/16 #define LCD_DUTY32 0xA9 //占空比1/32 #define LCD_END 0xEE #define LCD_RWMODE 0xE0 #define LCD_LINE0 0xC0 //开端行 #define LCD_PAGE0 0xB8 //开端页 #define LCD_COLUMN0 0x00 //开端列 #define Both_Write_Cmd(cmd) LCD_Write(0,0,cmd);LCD_Write(1,0,cmd)#define Both_Write_Data(dat) LCD_Write(0,1,dat);LCD_Write(1,1,dat)#define CLK P1_3#define RESET P1_6#define A0 P1_0#define E1 P1_2#define E2 P1_1#define LCD_RD P1_4 #define LCD_WR P1_5 #define DATA P0//渣字库,从16x8转到8x8unsigned char __code ASCII[][8]={{0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0},{0x0,0x0,0xE,0xFF,0xFF,0xE,0x0,0x0},{0x0,0x3,0x7,0x0,0x0,0x7,0x3,0x0},{0x8,0xFE,0xFE,0x8,0xFE,0xFE,0x8,0x0},{0xE,0x9F,0x91,0x91,0x91,0xF3,0x66,0x0},{0x8C,0xC,0x40,0x60,0x30,0x98,0x8C,0x0},{0x60,0xF6,0x9F,0xB9,0x6F,0xF6,0x90,0x0},{0x0,0x4,0x7,0x3,0x0,0x0,0x0,0x0},{0x0,0x0,0x7C,0x7E,0x83,0x81,0x0,0x0},{0x0,0x0,0x81,0x83,0x7E,0x7C,0x0,0x0},{0x20,0x28,0x78,0x70,0x70,0x78,0x28,0x20},{0x0,0x20,0x20,0x78,0x78,0x20,0x20,0x0},{0x0,0x0,0x0,0x80,0x80,0x0,0x0,0x0},{0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x0},{0x0,0x0,0x0,0x80,0x80,0x0,0x0,0x0},{0x80,0x0,0x40,0x60,0x30,0x18,0xC,0x0},{0x7C,0x7E,0x83,0xB1,0x83,0x7E,0x7C,0x0},{0x0,0x84,0x86,0xFF,0xFF,0x80,0x80,0x0},{0x82,0xC3,0xE1,0xB1,0x99,0x8F,0x86,0x0},{0x2,0x83,0x91,0x91,0x91,0xFF,0x6E,0x0},{0x30,0x38,0x2C,0xA6,0xFF,0xFF,0xA0,0x0},{0x1F,0x9F,0x91,0x91,0x91,0xF1,0x61,0x0},{0x7C,0xFE,0x93,0x91,0x91,0xF0,0x60,0x0},{0x3,0x3,0xC1,0xE1,0x31,0x1F,0xF,0x0},{0x6E,0xFF,0x91,0x91,0x91,0xFF,0x6E,0x0},{0xE,0x9F,0x91,0x91,0x91,0x7F,0x7E,0x0},{0x0,0x0,0x0,0xC,0xC,0x0,0x0,0x0},{0x0,0x0,0x80,0x8C,0xC,0x0,0x0,0x0},{0x0,0x20,0x70,0x58,0xC,0x86,0x82,0x0},{0x0,0x48,0x48,0x48,0x48,0x48,0x48,0x0},{0x0,0x82,0x86,0xC,0x58,0x70,0x20,0x0},{0x6,0x7,0x1,0xF1,0xF9,0xF,0x6,0x0},{0x7C,0xFE,0x82,0xF2,0xF2,0xFE,0x7C,0x0},{0xF8,0xFC,0x26,0x23,0x26,0xFC,0xF8,0x0},{0x81,0xFF,0xFF,0x91,0x91,0xFF,0x6E,0x0},{0x7C,0x7E,0x83,0x81,0x81,0x83,0x6,0x0},{0x81,0xFF,0xFF,0x81,0x83,0x7E,0x7C,0x0},{0x81,0xFF,0xFF,0x91,0xB9,0x83,0x87,0x0},{0x81,0xFF,0xFF,0x91,0x39,0x3,0x7,0x0},{0x7C,0x7E,0x83,0xA1,0xA1,0x63,0xE6,0x0},{0xFF,0xFF,0x10,0x10,0x10,0xFF,0xFF,0x0},{0x0,0x0,0x81,0xFF,0xFF,0x81,0x0,0x0},{0x40,0xC0,0x80,0x81,0xFF,0x7F,0x1,0x0},{0x81,0xFF,0xFF,0x30,0x78,0xCF,0x87,0x0},{0x81,0xFF,0xFF,0x81,0x80,0x80,0x80,0x0},{0xFF,0xFF,0xE,0x1C,0xE,0xFF,0xFF,0x0},{0xFF,0xFF,0xE,0x1C,0x38,0xFF,0xFF,0x0},{0x7E,0xFF,0x81,0x81,0x81,0xFF,0x7E,0x0},{0x81,0xFF,0xFF,0x91,0x11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0x18,0x70,0x18,0xF8,0xF0,0x0},{0x8,0xF8,0xF0,0x8,0x8,0xF8,0xF0,0x0},{0x70,0xF8,0x88,0x88,0x88,0xF8,0x70,0x0},{0x8,0xF8,0xF0,0x88,0x88,0xF8,0x70,0x0},{0x70,0xF8,0x88,0x88,0xF0,0xF8,0x8,0x0},{0x88,0xF8,0xF0,0x98,0x8,0x38,0x30,0x0},{0x10,0xB8,0xE8,0xC8,0xC8,0x98,0x10,0x0},{0x8,0x8,0x7E,0xFF,0x88,0x88,0x0,0x0},{0x78,0xF8,0x80,0x80,0x78,0xF8,0x80,0x0},{0x0,0x78,0x78,0x80,0x80,0x78,0x78,0x0},{0x78,0xF8,0x80,0x60,0x80,0xF8,0x78,0x0},{0x88,0x98,0x70,0x60,0x70,0x98,0x88,0x0},{0x78,0xF8,0x80,0x80,0x80,0xF8,0xF8,0x0},{0x98,0x98,0xC8,0xE8,0xB8,0x98,0x88,0x0},{0x0,0x10,0x10,0x7E,0xEF,0x81,0x81,0x0},{0x0,0x0,0x0,0xEF,0xEF,0x0,0x0,0x0},{0x0,0x81,0x81,0xEF,0x7E,0x10,0x10,0x0},{0x2,0x3,0x1,0x3,0x2,0x3,0x1,0x0}};