⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 2402.h

📁 用AVR M8控制PT2134音频芯片的程序,显示是LCM2402,还带有有红外遥控功能.
💻 H
字号:
//--------------------------------------------------------------------------------
                           //file:2402 4 line
//--------------------------------------------------------------------------------
#ifndef  __2402_H__
#define  __2402_H__

//--------------------------------------------------------------------------------
#include <avr/io.h> //MCU

//--------------------------------------------------------------------------------
#define uchar unsigned char 

#define LCD_PORT  PORTB    
#define LCD_DDR   DDRB     
#define LCD_PIN   PINB 

#define RS         4 
//#define RW         5  
#define EN         5
#define LCD_DATA       ((1<<0)|(1<<1)|(1<<2)|(1<<3))  
  
#define SETBIT(x,y)   (x|=(1<<y))      //set bit y in byte x 
#define CLRBIT(x,y)   (x&=(~(1<<y)))   //clear bit y in byte xx 
//-------------------------------------------------------------------------------

void Delay_10ms(uchar _time) ;  
void out_dataline(uchar line) ;
void write_command(unsigned char com) ;
void write_data(unsigned char data) ;
void LCD_init(void) ;
void LCD_set_addr(unsigned char x,unsigned char y);
void LCD_write_char(unsigned char X,unsigned char Y, unsigned char data);
void LCD_write_string(unsigned char X,unsigned char Y,unsigned char *s) ;


//===============================================================================
#endif  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -