• 大小: 129KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-10
  • 语言: 其他
  • 标签: 240128  C  

资源简介

带有相关头文件,很好懂,看了就明白,其他的型号稍作修改就能用。

资源截图

代码片段和文件信息

#include
#include “stdio.h“
#include “string.h“
#include 
#include
#include
#include “Lcd_Port_Config.h“ 
unsigned int  PIC_ADD1;
unsigned int  PIC_ADD2;

const   char  flash_array[]    PROGMEM = {“ABCDEFGHIJKLMNOPQRSTUVW“};
const   unsigned int  flash_Hanzi[]    PROGMEM = {0123455689}; 
const   unsigned int  Mnew1_Hanzi[]    PROGMEM = {0123455689}; 
const   unsigned int  Mnew2_Hanzi[]    PROGMEM = {0123455689}; 


void PORT_INI() {
     DATA_INPUT();
LCD_CS_H();
LCD_RS_H();
LCD_WR_H();
LCD_RD_H();
LCD_RST_H();
LCD_FS_H();
LCD_CS_DDR |= 1< LCD_RS_DDR |= 1< LCD_WR_DDR |= 1< LCD_RD_DDR |= 1< LCD_RST_DDR |= 1< LCD_FS_DDR |= 1< }
void delay_Nms(unsigned int n)
{
while(n--)_delay_ms(1);
}

void   Read_Satur (unsigned char Mode)
  {
    unsigned char Satur = 0;
LCD_RS_H();
LCD_CS_L();
DATA_INPUT();
NOP();
NOP();
LCD_RD_L();
switch  (Mode)
  {
   case 1:
           while ((Satur & 0x03) == 0)
              {
                    LCD_RD_L();
                    Satur = DATA_PIN;
               }
               LCD_RD_H(); 
   return; 
       case 2:
           while ((Satur & 0x04) == 0)
              {
                    LCD_RD_L();
                    Satur = DATA_PIN;
               }
               LCD_RD_H(); 
   return; 
       case 3:
           while ((Satur & 0x08) == 0)
              {
                    LCD_RD_L();
                    Satur = DATA_PIN;
               }
               LCD_RD_H(); 
   return; 
   case 4:
           while ((Satur & 0x40) == 0)
              {
                    LCD_RD_L();
                    Satur = DATA_PIN;
               }
               LCD_RD_H(); 
   return; 
       case 5:
           while ((Satur & 0x80) == 0)
              {
                    LCD_RD_L();
                    Satur = DATA_PIN;
               }
               LCD_RD_H(); 
   return;
   default:                
           return;
    }
   }
void Write_Data (unsigned char DATA)
   {
    Read_Satur (1);
LCD_RS_L();
LCD_CS_L();
DATA_OUTPUT();
    DATA_PORT = DATA;
NOP();
NOP();
LCD_WR_L();
NOP();
NOP();
NOP();
NOP();
    LCD_WR_H();
}
void Write_CMD (unsigned char CMD)
   {
    Read_Satur(1);
LCD_RS_H();
LCD_CS_L();
DATA_OUTPUT();
    DATA_PORT = CMD;
NOP();
NOP();
LCD_WR_L();
NOP();
NOP();
NOP();
NOP();
    LCD_WR_H();
}

void LCD_WR_CMD2(unsigned int Addressunsigned int CMD)
   {
     Write_Data(Address);
     Write_Data(Address>>8);
     Write_CMD(CMD);
    }
void LCD_WR_CMD1(unsigned char DATA1unsigned int CMD)
   {
     Write_Data(DATA1);
     Write_CMD(CMD);
    }
void Write_Byte  (unsigned char X u

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       9741  2008-05-29 13:54  LCD_240128_DRIVER\asiic_text.h

     文件       3914  2008-09-30 17:04  LCD_240128_DRIVER\DRIVER.aps

     文件        238  2008-09-30 17:04  LCD_240128_DRIVER\driver.aws

     文件       2250  2008-08-14 10:49  LCD_240128_DRIVER\GB_TEXT.h

     文件       1475  2008-09-29 16:27  LCD_240128_DRIVER\Lcd_Port_Config.h

     文件     152022  2008-07-05 21:54  LCD_240128_DRIVER\pic_temp.h

     文件      49247  2008-05-30 10:28  LCD_240128_DRIVER\qidong.h

     文件        345  2008-08-28 07:58  LCD_240128_DRIVER\test1.aws

     文件       4390  2008-10-05 09:46  LCD_240128_DRIVER\DRIVER.c

     文件       1904  2008-10-05 09:46  LCD_240128_DRIVER\default\Makefile

     文件      12387  2008-09-30 17:04  LCD_240128_DRIVER\default\test1.map

     文件     405584  2008-09-27 15:37  LCD_240128_DRIVER\default\test1.lss

     文件         13  2008-09-27 15:37  LCD_240128_DRIVER\default\test1.eep

     文件       9224  2008-09-30 17:04  LCD_240128_DRIVER\default\DRIVER.o

     文件      13159  2008-09-30 17:04  LCD_240128_DRIVER\default\test1.elf

     文件      13362  2008-09-30 17:04  LCD_240128_DRIVER\default\test1.hex

     文件       1198  2008-10-05 09:46  LCD_240128_DRIVER\default\dep\DRIVER.o.d

    ..AD...         0  2008-10-05 10:57  LCD_240128_DRIVER\default\dep

    ..AD...         0  2008-10-05 10:57  LCD_240128_DRIVER\default

     目录          0  2008-10-05 10:57  LCD_240128_DRIVER

----------- ---------  ---------- -----  ----

               680453                    20


评论

共有 条评论