• 大小: 211KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-12
  • 语言: 其他
  • 标签: 51  LCD  

资源简介

51单片机实现480*800LCD驱动 包含画点画线及字符显示等内容

资源截图

代码片段和文件信息

#include “c8051F340.h“
#include 
#include 
#include 

#include 
#include 
#include 
#include 
#include 

xdata unsigned char Packet[64];   // Last packet received from host 
unsigned char f_down=0;
unsigned char f_debug=0;
unsigned char f_read=0;
unsigned char f_para=0;
unsigned char f_init=0;
unsigned char f_other=0;
unsigned char pic=0;
unsigned int  bf=0;
unsigned long int sd=1;

unsigned char VerifyCode0=0xaa;
unsigned char VerifyCode1=0x55;
unsigned char VerifyCode2=0xff;

/********************************************************************************/
code const UINT USB_VID = 0x10C4;
code const UINT USB_PID = 0xEA61;
code const BYTE USB_MfrStr[] = {0x1A0x03‘S‘0‘i‘0‘l‘0‘i‘0‘c‘0‘o‘0‘n‘0‘ ‘0‘L‘0‘a‘0‘b‘0‘s‘0};                       // Manufacturer String
code const BYTE USB_ProductStr[] = {0x100x03‘U‘0‘S‘0‘B‘0‘ ‘0‘A‘0‘P‘0‘I‘0}; // Product Desc. String
code const BYTE USB_SerialStr[] = {0x0a0x03‘C‘0‘5‘0‘1‘0‘F‘0};
code const BYTE USB_MaxPower = 15;            // Max current = 30 mA (15 * 2)
code const BYTE USB_PwAttributes = 0x80;      // Bus-powered remote wakeup not supported
code const UINT USB_bcdDevice = 0x0100;       // Device release number 1.00

/********************************************************************************/
void main(void)
{
#ifdef SD_DEMO_PIC
unsigned char n;
#endif

Devices_Init();
//MMC_SD_ReadSingleBlock(0);
while(KEY_STEP)
{
 // DispBand();
 //DispStr(“TEST BEGIN“00BLACKWHITE);

#ifdef READ_REG          
DispRegValue(0xbf6); //
#endif 

#ifdef USE_SD_INIT
SD_Init(); 
Delay(10);
#endif
 // WaitKey();Delay(200);           
// Delay(2000);
#ifdef SLEEP_TEST
EnterSLP();
WaitKey();Delay(200);
ExitSLP();
WaitKey();Delay(200);
#endif
// WaitKey();Delay(200);


        Dispframe();
WaitKey();Delay(200);

   DispColor(WHITE);
 StopDelay(30);

  DispColor(RED);
 StopDelay(30);
// WaitKey();Delay(200);

DispColor(GREEN);
 StopDelay(30);

DispColor(BLUE);
     StopDelay(30);

#ifdef DEBUG  
Debug();
#endif 

#ifdef EVAL_PIC
DispPic(pic_eval);
WaitKey();Delay(200);
#endif

#ifdef EXTEND_TEST
DispScaleHor1();
WaitKey();Delay(200);

DispScaleVer();
WaitKey();Delay(200);

DispScaleVer_Red();
WaitKey();Delay(200);

DispScaleVer_Green();
WaitKey();Delay(200);

DispScaleVer_Blue();
WaitKey();Delay(200);

DispScaleVer_Gray();
WaitKey();Delay(200);

DispGrayHor16();
WaitKey();Delay(200);

DispGrayHor32();
WaitKey();Delay(200);

DispScaleHor2();
WaitKey();Delay(200);

DispSnow();
WaitKey();Delay(200);

DispBlock();
WaitKey();Delay(200);
#endif

#ifdef SD_DEMO_PIC
 for(n=0;n<2;n++)
{
DispPicFrom

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

     文件      24452  2009-12-17 15:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\c8051F040.h

     文件      16486  2012-02-08 10:22  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\c8051F340.h

     文件     261754  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\lcd\lcd.c

     文件       1855  2011-07-14 16:16  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\lcd\lcd.h

     文件     374331  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\lcd.lst

     文件      58887  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\lcd.obj

     文件         70  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\lcd.__i

     文件     107866  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main

     文件      12377  2012-02-24 17:52  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.c

     文件       3364  2012-02-24 17:52  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.h

     文件      27519  2012-02-24 17:52  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.LST

     文件     101200  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.M51

     文件      33640  2012-02-24 17:52  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.OBJ

     文件       2879  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.Opt

     文件        486  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.plg

     文件       2307  2011-11-29 20:25  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main.Uv2

    .......      2864  2012-03-16 13:34  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main_Opt.Bak

     文件       2301  2011-09-19 11:58  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\main_Uv2.Bak

     文件       3540  2011-06-30 13:40  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\mmc_sd\mmc_sd.c

     文件        518  2011-06-01 11:30  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\mmc_sd\mmc_sd.h

     文件       8647  2012-02-24 17:53  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\mmc_sd.lst

     文件      13202  2012-02-24 17:53  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\mmc_sd.obj

     文件      40120  2012-02-24 17:53  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\NT35510_HSD4.3TN_16BIT(C8051F).hex

     文件      40635  2012-02-21 11:55  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\NT35510_HSD43_16BIT(C8051F).hex

     文件      33713  2012-03-22 20:21  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\OTM8009-A_HSD43(TN)_16BIT.hex

     文件        816  2011-07-15 14:01  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\readme.txt

     文件       5115  2009-12-17 15:22  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\STARTUP.A51

     文件        408  2012-02-08 09:08  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\Target 1.BAT

     文件       2153  2011-07-14 13:05  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\tp\tp.c

     文件         77  2011-07-13 12:37  HSD4.3TN_OTM8009A_MCU16bit)_C8051F\tp\tp.h

............此处省略13个文件信息

评论

共有 条评论