你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

求高手帮忙看下stm32驱动12232液晶屏的问题

[复制链接]
544852010 提问时间:2010-8-12 18:36 /
[table]            [tr]            [td]OCM12232的液晶屏,驱动器是SED1520,液晶屏始终不显示汉字字母数字等,大白框老是一闪一闪的,不知道问题在哪?求高手前辈及各路大侠帮忙解决下。感激不尽!!!附件中石OCM12232液晶屏的资料。端口连接:VDD-5V,VSS-地,Vo接10k可调电阻到3.3V,RES-PC4,E1-PC0,E2-PC1,R/W-PC2,A0-PC3,DB0-DB7分别接PA0-PA7,LED+-3.3V,LED-接地。
            
            
            
            我的程序如下:(程序是按照该12232液晶屏使用说明书自带的68时序的51单片机的测试程序转换到stm32单片机上面的)
            
            ocm12232.h文件:
            
            #ifndef _OCM12232_h_
            #define _OCM12232_h_
            
            #define   data               1
            #define   comm               0
            #define   X                  0x80
            #define   Y                  0x80
            #define   f_page             0xB8
            #define   f_row              0xC0
            #define   f_line             0x00
            #define E1_0             GPIO_WriteBit(GPIOC, GPIO_Pin_0, Bit_SET)     //ENABLE1=0,LCD读写禁止
            #define E1_1             GPIO_WriteBit(GPIOC, GPIO_Pin_0, Bit_RESET)   //ENABLE1=1,LCD读写使能
            
            #define E2_0             GPIO_WriteBit(GPIOC, GPIO_Pin_1, Bit_RESET)   //ENABLE2=0,LCD读写禁止
            #define E2_1             GPIO_WriteBit(GPIOC, GPIO_Pin_1, Bit_SET)     //ENABLE2=1,LCD读写使能
            
            #define RW_0             GPIO_WriteBit(GPIOC, GPIO_Pin_2, Bit_RESET) //R/W=0,LCD读允许
            #define RW_1             GPIO_WriteBit(GPIOC, GPIO_Pin_2, Bit_SET)   //R/W=1,LCD写允许
            
            #define A0_0             GPIO_WriteBit(GPIOC, GPIO_Pin_3, Bit_RESET)//Ao=0,向LCD写入指令
            #define A0_1             GPIO_WriteBit(GPIOC, GPIO_Pin_3, Bit_SET)  //Ao=1,向LCD输入数据
            
            #define RES_1            GPIO_WriteBit(GPIOC, GPIO_Pin_4, Bit_SET)  //LCD上升沿复位,复位之后保持高电平 GPIO_WriteBit(GPIOC, GPIO_Pin_0,0) //ENABLE1=0,LCD读写禁止
            #define RES_0            GPIO_WriteBit(GPIOC, GPIO_Pin_4, Bit_RESET)
            void Lcd12232delay(int n);//延时微妙
            void Delay(int d);
            void LCD_WriteLByte(u8 Byte);
            void wr_lcd(unsigned char choe1,unsigned char choe2,unsigned char data_comm,unsigned char content);
            void chk_busy(unsigned char choe1,unsigned char choe2);
            void init_lcd(void);
            void disphz(unsigned char const *chn);
            void dispzf(const unsigned char *eng);
            void disptu(unsigned char const *img);
            void wrlattice(unsigned char data1,unsigned char data2);
            #endif
            
            ocm12232.c文件:
            
            #include"stm32f10x_lib.h"
            #include "OCM12232.h"
            
            void Lcd12232delay(int n)//延时微妙
            {
              int i="0";
              for(;n;--n)
                for(i=0;i

OCM12232-1.pdf

下载

184.75 KB, 下载次数: 55, 下载积分: ST金币 -1

收藏 1 评论15 发布时间:2010-8-12 18:36

举报

15个回答
544852010 回答时间:2010-8-12 18:36:51

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

main.c文件:
#include"stm32f10x_lib.h"
#include "hw_conf.h"
#include"OCM12232.h"
void delay(int d);
unsigned const char tab1[]=
{
/*--  文字:  中  --*/
0x00,0x00,0xFC,0x08,0x08,0x08,0x08,0xFF,0x08,0x08,0x08,0x08,0xFC,0x08,0x00,0x00,0x00,0x00,0x07,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0X02,0x02,0x07,0x00,0x00,0x00,
/*--  文字:  科  --*/
0x10,0x12,0x92,0x72,0xFE,0x51,0x91,0x00,0x22,0xCC,0x00,0x00,0xFF,0x00,0x00,0x00,
0x04,0x02,0x01,0x00,0xFF,0x00,0x04,0x04,0x04,0x02,0x02,0x02,0xFF,0x01,0x01,0x00,
  /*--  文字:  国  --*/
0x00,0xFE,0x02,0x0A,0x8A,0x8A,0x8A,0xFA,0x8A,0x8A,0x8A,0x0A,0x02,0xFE,0x00,0x00,   0x00,0xFF,0x40,0x48,0x48,0x48,0x48,0x4F,0x48,0x49,0x4E,0x48,0x40,0xFF,0x00,0x00,
/*--  文字:  技  --*/     0x08,0x08,0x88,0xFF,0x48,0x28,0x00,0xC8,0x48,0x48,0x7F,0x48,0xC8,0x48,0x08,0x00,
0x01,0x41,0x80,0x7F,0x00,0x40,0x40,0x20,0x13,0x0C,0x0C,0x12,0x21,0x60,0x20,0x00,
  /*--  文字:  肇  --*/       0x80,0x60,0x1C,0x95,0x96,0x94,0x9C,0xC8,0xA4,0xAF,0x94,0x94,0x2C,0x44,0x44,0x00,  0x20,0x22,0x2A,0x2A,0x2A,0x2A,0x2A,0xFF,0x2A,0x2A,0x2A,0x2F,0x22,0x22,0x20,0x00,
  /*--  文字:  有  --*/     0x00,0x04,0x84,0x44,0xE4,0x34,0x2C,0x27,0x24,0x24,0x24,0xE4,0x04,0x04,0x04,0x00,
0x02,0x01,0x00,0x00,0xFF,0x09,0x09,0x09,0x29,0x49,0xC9,0x7F,0x00,0x00,0x00,0x00,
/*--  文字:  庆  --*/
0x00,0x00,0xFC,0x44,0x44,0x44,0x44,0xC5,0x7E,0xC4,0x44,0x44,0x44,0x44,0x44,0x00,
0x40,0x30,0x0F,0x40,0x20,0x10,0x0C,0x03,0x00,0x01,0x06,0x18,0x30,0x60,0x20,0x00,
/*--  文字:  限  --*/
0xFE,0x02,0x32,0x4E,0x82,0x00,0xFE,0x4A,0xCA,0x4A,0x4A,0x4A,0x7E,0x00,0x00,0x00,
0xFF,0x00,0x02,0x04,0x03,0x00,0xFF,0x40,0x20,0x03,0x0C,0x12,0x21,0x60,0x20,0x00,
/*--  文字:  金  --*/
0x40,0x40,0x20,0x20,0x50,0x48,0x44,0xC3,0x44,0x48,0x50,0x50,0x20,0x60,0x20,0x00,
0x40,0x40,0x42,0x42,0x4A,0x72,0x42,0x7F,0x42,0x62,0x5A,0x42,0x42,0x40,0x40,0x00,
/*--  文字:  公  --*/
0x00,0x00,0x80,0x40,0x30,0x0E,0x84,0x00,0x00,0x0E,0x10,0x60,0xC0,0x80,0x80,0x00,
0x00,0x01,0x20,0x70,0x28,0x24,0x23,0x31,0x10,0x10,0x14,0x78,0x30,0x01,0x00,0x00,
/*--  文字:  鹏  --*/
0x00,0xFE,0x12,0xFE,0x00,0xFE,0x12,0xFE,0x00,0xFC,0x0E,0x35,0x44,0x7C,0x00,0x00,
0x20,0x1F,0x21,0x7F,0x20,0x1F,0x41,0x7F,0x08,0x09,0x09,0x29,0x49,0x21,0x1F,0x00,
/*--  文字:  司  --*/
0x00,0x10,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x92,0x12,0x02,0x02,0xFE,0x00,0x00,
0x00,0x00,0x1F,0x04,0x04,0x04,0x04,0x04,0x04,0x0F,0x00,0x20,0x40,0x3F,0x00,0x00
};
unsigned const char tab2[]=
{
/*--  文字:  8  --*/  0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,
/*--  文字:  G  --*/
0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,
/*--  文字:  6  --*/     0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,
/*--  文字:  o  --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,
/*--  文字:  -  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
/*--  文字:  l  --*/    0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
/*--  文字:  7  --*/
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,
/*--  文字:  d  --*/
0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,
/*--  文字:  5  --*/
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,
/*--  文字:  e  --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,
/*--  文字:  8  --*/     0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,
/*--  文字:  n  --*/
0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,
/*--  文字:  -  --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
/*--  文字:  P  --*/
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,
/*--  文字:  2  --*/  0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
/*--  文字:  a  --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,
/*--  文字:  2  --*/  0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
/*--  文字:  l  --*/
0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
/*--  文字:  2  --*/
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,
/*--  文字:  m  --*/
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,
/*--  文字:  3  --*/
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,
/*--  文字:     --*/  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
/*--  文字:  1  --*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,
/*--  文字:  L  --*/  0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,
/*--  文字:  9  --*/  0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,
/*--  文字:  C  --*/
0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,
/*--  文字:  6  --*/
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,
/*--  文字:  M  --*/     0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00
};
unsigned const char tab3[]=
{
                  /*--  调入了一幅图像:F:\梁\其它\HOCO12232.bmp  --*/
                  /*--  宽度x高度=122x32  --*/
                  0x00,0x00,0x00,0x70,0xF8,0xF8,0xFC,0xFC,0xFE,0xFE,0xFE,0xFE,0xFC,0xFC,0xF0,0xE0,
                  0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x80,0x40,0x20,0x10,0x48,0xD4,0xB4,0x62,0xC2,0x82,0x03,0x02,0x02,
                  0x02,0x84,0xC4,0xE0,0xA0,0xE0,0x60,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0xB0,0xF8,0xF0,0xF0,0xF8,0xFC,0x60,0x60,0x30,
                  0x18,0x00,0x00,0x00,0x80,0xC0,0xE0,0xE0,0xF0,0xF0,0xF0,0xD8,0x58,0x58,0x58,0x58,
                  0x58,0xD8,0xD8,0x98,0xB0,0x30,0x70,0xE0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x07,
                  0x07,0x07,0x02,0x7F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xFC,0xFC,0xFC,
                  0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xFC,0xF8,0xF0,0xC0,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x01,0x00,0x04,
                  0x0D,0x1B,0x36,0x6D,0xDB,0xF6,0xED,0xFB,0xFE,0xFE,0xFF,0x7F,0x1F,0x07,0x01,0x00,
                  0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0xFC,0xFE,0xFE,
                  0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0xFC,0xE0,0xC0,0xC0,0xF8,0xFE,0xFF,0xFF,0xFF,
                  0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x3E,0xF8,0x01,0x37,
                  0x0C,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x60,0xFF,0xC7,0x03,0x03,0x03,0x03,0xE1,
                  0xFF,0x3F,0x0F,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x0F,0x3F,0x7F,0xFF,0xEF,
                  0xBF,0x7F,0xFF,0xC7,0x07,0x1F,0xFE,0xF8,0xB0,0x60,0x80,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x04,0x08,0x10,0x20,0x40,0x40,0x80,0x83,
                  0xFF,0xFF,0xFF,0xFF,0x83,0x40,0x40,0x20,0x10,0x08,0x04,0x03,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x03,0x07,0x0F,0x1F,0x3F,0x3F,0x7F,0xFF,
                  0xFF,0x7F,0x7F,0xFF,0xFF,0xFF,0xFF,0xDF,0x3F,0x3F,0x0F,0x61,0x3F,0x1F,0x2F,0x3F,
                  0x1F,0x0F,0x00,0x0F,0x07,0x03,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x1E,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x40,0x60,0x70,0x3C,0x1F,0x07,0x03,0x01,0x01,0x00,0x00,
                  0x01,0x07,0x07,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x44,0xEC,0x00,
                  0x7C,0x44,0x7C,0x00,0x7C,0x40,0x40,0x00,0x7C,0x44,0x38,0x00,0x7C,0x14,0x1C,0x00,
                  0x7C,0x40,0x40,0x00,0x78,0x24,0x78,0x00,0x7C,0x18,0x18,0x7C,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x20,0x20,0x20,0x20,0x10,0x04,0x07,0x00,0x01,0x00,0x00,0x00,0x01,
                  0x05,0x03,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
                  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
void main(void)
{
  Setup_System();
  GPIO_Write(GPIOA, 0x0000);
  GPIO_Write(GPIOC, 0x0000);
  delay(5);
  init_lcd();
  delay(5);
  
  while(1)
  {
    wrlattice(0x00,0x00);
    disphz(tab1);
    delay(1000);
   
    wrlattice(0xff,0x00);
    delay(1000);
   
    wrlattice(0x00,0x00);
    disphz(tab2);
    delay(1000);
   
    wrlattice(0x33,0x33);
    delay(2000);
    disphz(tab3);
    delay(1000);
   
    delay(3);
    GPIO_WriteBit(GPIOC,GPIO_Pin_5,(BitAction)(1-GPIO_ReadOutputDataBit(GPIOC,GPIO_Pin_5)));
    delay(3);
  }
}
void delay(int d)
{
  int i = 0;
  for ( ;d;--d)
  for (i = 0;i
544852010 回答时间:2010-8-12 18:37:11

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

hw_conf.c和hw_conf.h文件就是stm32单片机的时钟、I/O口和NVIC配置。
配置文件如下

hw_conf.c文件:

#include"stm32f10x_lib.h"
#include "hw_conf.h"
#include "OCM12232.h"

ErrorStatus HSEStartUpStatus;

void RCC_Configuration(void)
{
  RCC_DeInit();
  RCC_HSEConfig(RCC_HSE_ON);
  HSEStartUpStatus = RCC_WaitForHSEStartUp();

  if(HSEStartUpStatus == SUCCESS)
  {
    FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable);
    FLASH_SetLatency(FLASH_Latency_2);
    RCC_HCLKConfig(RCC_SYSCLK_Div1);
    RCC_PCLK2Config(RCC_HCLK_Div1);
    RCC_PCLK1Config(RCC_HCLK_Div2);
    RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9);
    RCC_PLLCmd(ENABLE);
    while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET)
    {
    }
    RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK);
    while(RCC_GetSYSCLKSource() != 0x08)
    {
    }
  }
  RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOC, ENABLE);
}

void GPIO_Configuration(void)
{
  GPIO_InitTypeDef GPIO_InitStructure;
  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_Init(GPIOA, &GPIO_InitStructure);

  GPIO_InitStructure.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5;
  GPIO_InitStructure.GPIO_Speed = GPIO_Speed_10MHz;
  GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
  GPIO_Init(GPIOC, &GPIO_InitStructure);
}

void NVIC_Configuration(void)
{
#ifdef  VECT_TAB_RAM
  NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0);
#else
  NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0);
#endif
}

void Setup_System(void)
{
RCC_Configuration();
GPIO_Configuration();
NVIC_Configuration();
}

hw_conf.h文件:

#ifndef   _hw_conf_H_
#define   _hw_conf_H_

extern void Setup_System(void);

#endif
废鱼 回答时间:2010-8-13 09:08:22

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

注意引脚配置要使用正确。既然在51上面都能用,说明在LCD配置上面出问题。你可以试着先测试最简单的显示。调试用过了再测试其他的。
544852010 回答时间:2010-11-19 11:47:25

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

搞定了的,帖子删不了啊
z11b22 回答时间:2011-3-24 09:25:06

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

能把那个搞定了的,发给我吗,谢谢啦
wangyin1226 回答时间:2011-4-13 23:16:45

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

可能是一些引脚的定义有错误,或者是你的程序时序出现问题
tlw2007 回答时间:2011-4-14 21:25:06

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

是怎么回事,楼主搞定了说明下问题在哪儿啊
k10k10k10-19309 回答时间:2011-4-14 23:00:02

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

呵呵,分不够送的!
gavin3613 回答时间:2011-7-8 16:04:55

回复:求高手帮忙看下stm32驱动12232液晶屏的问题

看看。。。。。。。。。。。
luyiya 回答时间:2011-7-18 22:51:56

RE:求高手帮忙看下stm32驱动12232液晶屏的问题

看看
544852010 回答时间:2012-3-20 12:17:00

回复:求高手帮忙看下stm32驱动12232液晶屏的问题

stm32单片机驱动金鹏12232液晶屏(SED1520控制器)

<strong>
stm32单片机驱动金鹏12232液晶屏(SED1520控制器)

OCM12232.c文件:

#include"stm32f10x_lib.h"
#include "OCM12232.h"

const unsigned char tab7[]={
  /*--  文字:  0  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,

/*--  文字:  1  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,

/*--  文字:  2  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,

/*--  文字:  3  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,

/*--  文字:  4  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,

/*--  文字:  5  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,

/*--  文字:  6  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,

/*--  文字:  7  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,

/*--  文字:  8  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,

/*--  文字:  9  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,

/*--  文字:  %  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,

/*--  文字:  .  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,
};


void Lcd12232delay(unsigned int Time)//延时函数
{
  unsigned int i,j;
  for ( i=0;i
544852010 回答时间:2012-3-20 12:17:40

回复:求高手帮忙看下stm32驱动12232液晶屏的问题

main.c文件:
#include"stm32f10x_lib.h"
#include "hw_conf.h"
#include"OCM12232.h"
const unsigned char tab1[]={
/*--  文字:  欢  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x14,0x24,0x44,0x84,0x64,0x1C,0x20,0x18,0x0F,0xE8,0x08,0x08,0x28,0x18,0x08,0x00,
0x20,0x10,0x4C,0x43,0x43,0x2C,0x20,0x10,0x0C,0x03,0x06,0x18,0x30,0x60,0x20,0x00,
/*--  文字:  迎  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x41,0xCE,0x04,0x00,0xFC,0x04,0x02,0x02,0xFC,0x04,0x04,0x04,0xFC,0x00,0x00,
0x40,0x20,0x1F,0x20,0x40,0x47,0x42,0x41,0x40,0x5F,0x40,0x42,0x44,0x43,0x40,0x00,
/*--  文字:  使  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x20,0xF0,0x1C,0x07,0xF2,0x94,0x94,0x94,0xFF,0x94,0x94,0x94,0xF4,0x04,0x00,
0x00,0x00,0x7F,0x00,0x40,0x41,0x22,0x14,0x0C,0x13,0x10,0x30,0x20,0x61,0x20,0x00,
/*--  文字:  用  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0xFE,0x22,0x22,0x22,0x22,0xFE,0x00,0x00,
0x80,0x40,0x30,0x0F,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x42,0x82,0x7F,0x00,0x00,
};
const unsigned char tab2[]={
  /*--  文字:  P  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,
/*--  文字:  S  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,
/*--  文字:  6  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,
/*--  文字:  4  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,
/*--  文字:  0  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,
};
const unsigned char tab3[]={
/*--  文字:  喷  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0xFC,0x04,0x04,0xFC,0x00,0x24,0xA4,0xFC,0xA4,0xBF,0xA4,0xFC,0xA4,0x24,0x20,0x00,
0x07,0x01,0x01,0x03,0x00,0x80,0x4F,0x20,0x18,0x07,0x08,0x10,0x2F,0xE0,0x40,0x00,
/*--  文字:  头  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x12,0x64,0x2C,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x01,0x81,0x41,0x21,0x11,0x09,0x05,0x03,0x05,0x19,0x31,0xE1,0x41,0x01,0x00,
/*--  文字:  测  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x08,0x31,0x86,0x60,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0x00,0xFF,0x00,
0x04,0xFC,0x03,0x00,0x80,0x47,0x30,0x0F,0x10,0x67,0x00,0x07,0x40,0x80,0x7F,0x00,
/*--  文字:  试  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x42,0xDC,0x08,0x00,0x90,0x90,0x90,0x90,0x90,0xFF,0x10,0x12,0x1C,0x10,0x00,
0x00,0x00,0x7F,0x20,0x10,0x20,0x20,0x1F,0x10,0x10,0x01,0x06,0x18,0x20,0x78,0x00,
/*--  文字:  仪  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x20,0xF0,0x0C,0x03,0x00,0x38,0xC0,0x01,0x0E,0x04,0xE0,0x1C,0x00,0x00,0x00,
0x00,0x00,0xFF,0x00,0x40,0x40,0x20,0x10,0x0B,0x04,0x0B,0x10,0x20,0x60,0x20,0x00,
/*--  文字:  !  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x5F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
const unsigned char tab4[]={
/*--  文字:  测  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x08,0x31,0x86,0x60,0x00,0xFE,0x02,0xF2,0x02,0xFE,0x00,0xF8,0x00,0x00,0xFF,0x00,
0x04,0xFC,0x03,0x00,0x80,0x47,0x30,0x0F,0x10,0x67,0x00,0x07,0x40,0x80,0x7F,0x00,
/*--  文字:  试  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x40,0x42,0xDC,0x08,0x00,0x90,0x90,0x90,0x90,0x90,0xFF,0x10,0x12,0x1C,0x10,0x00,
0x00,0x00,0x7F,0x20,0x10,0x20,0x20,0x1F,0x10,0x10,0x01,0x06,0x18,0x20,0x78,0x00,
/*--  文字:  中  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0xFC,0x08,0x08,0x08,0x08,0xFF,0x08,0x08,0x08,0x08,0xFC,0x08,0x00,0x00,
0x00,0x00,0x07,0x02,0x02,0x02,0x02,0xFF,0x02,0x02,0x02,0x02,0x07,0x00,0x00,0x00,
/*--  文字:  …  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
const unsigned char tab5[]={
  /*--  文字:  完  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x90,0x8C,0xA4,0xA4,0xA4,0xA5,0xA6,0xA4,0xA4,0xA4,0xA4,0x94,0x8C,0x04,0x00,
0x00,0x80,0x40,0x20,0x18,0x07,0x00,0x00,0x00,0x3F,0x40,0x40,0x40,0x70,0x00,0x00,
/*--  文字:  好  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x10,0xF0,0x1F,0x10,0xF0,0x80,0x82,0x82,0x82,0xF2,0x8A,0x86,0x82,0x80,0x00,
0x80,0x43,0x22,0x14,0x0C,0x73,0x20,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,
/*--  文字:  数  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x10,0x92,0x54,0x38,0xFF,0x38,0x54,0x52,0x80,0xF0,0x1F,0x12,0x10,0xF0,0x10,0x00,
0x42,0x42,0x2A,0x2E,0x13,0x1A,0x26,0x02,0x40,0x20,0x13,0x0C,0x33,0x60,0x20,0x00,
/*--  文字:  目  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0xFE,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0xFE,0x00,0x00,0x00,
0x00,0x00,0x00,0x7F,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x7F,0x00,0x00,0x00,
/*--  文字:  :  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
const unsigned char tab6[]={
/*--  文字:  正  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x02,0x02,0xC2,0x02,0x02,0x02,0x02,0xFE,0x82,0x82,0x82,0x82,0x82,0x02,0x00,
0x20,0x20,0x20,0x3F,0x20,0x20,0x20,0x20,0x3F,0x20,0x20,0x20,0x20,0x20,0x20,0x00,
/*--  文字:  确  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x84,0xE4,0x5C,0x44,0xC4,0x10,0xF8,0x97,0x92,0xF2,0x9A,0x96,0xF2,0x00,0x00,
0x01,0x00,0x3F,0x08,0x88,0x4F,0x30,0x0F,0x04,0x04,0x3F,0x44,0x84,0x7F,0x00,0x00,
/*--  文字:  率  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x0C,0x14,0xA4,0x04,0x64,0x35,0xAE,0x64,0x24,0x14,0xA4,0x14,0x04,0x04,0x00,
0x08,0x0A,0x09,0x08,0x08,0x0A,0x0B,0xFE,0x0A,0x0B,0x0C,0x08,0x09,0x0A,0x08,0x00,
/*--  文字:  为  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x10,0x10,0x12,0x14,0x1C,0x10,0xF0,0x9F,0x10,0x10,0x10,0x10,0xF8,0x10,0x00,
0x00,0x00,0x40,0x20,0x10,0x08,0x06,0x01,0x00,0x11,0x26,0x40,0x20,0x1F,0x00,0x00,
/*--  文字:  :  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x36,0x36,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

void main(void)
{
Setup_System();        //系统启动
  
init_lcd ();           //LCD初始化
  
all_operate(0x00);     //清屏
  
while(1)
{
all_operate(0x00);    //清屏
   
Displayhz(0,4,tab1);   //从左半屏首列开始在page和page+1页显示num个16*16的汉字(包括标点符号)--显示"欢迎使用"
   
    R_DisplayZF(0,5,5,tab2);  //右半屏从page页的column列开始显示Num个字符--显示&quotS640"
   
    Disp_xy_hz(2,0,6,tab3);  //从左到右跨界于page页column列开始显示Num个汉字--显示"喷头测试仪!"
   
Lcd12232delay(1000);
   
all_operate(0x00);  //清屏
   
Disp_xy_hz(1,30,4,tab4);  //从左到右跨界于page页column列开始显示Num个汉字--显示"测试中..."
   
Lcd12232delay(1000);  //延时
   
all_operate(0x00);  //清屏
   
Disp_xy_hz(0,5,5,tab5);  //从左到右跨界于page页column列开始显示Num个汉字--显示"完好数目:"
   
Disp_xy_hz(2,5,5,tab6);  //从左到右跨界于page页column列开始显示Num个汉字--显示"正确率为:"
   
Lcd12232delay(1000);  //延时
   
Disp_TestNum(0,15,0);  //右半屏显示测试数据
   
Lcd12232delay(1000);  //延时
  }
}
joedyzz 回答时间:2014-5-12 10:27:43

回复:求高手帮忙看下stm32驱动12232液晶屏的问题

谢谢
vivy 回答时间:2014-5-12 13:37:30

回复:求高手帮忙看下stm32驱动12232液晶屏的问题

你的背光有显示吗?也就是说接电源之后屏幕上有没有显示小黑点

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32Cube扩展软件包
意法半导体边缘AI套件
ST - 理想汽车豪华SUV案例
ST意法半导体智能家居案例
STM32 ARM Cortex 32位微控制器
关注我们
st-img 微信公众号
st-img 手机版