lcd.~h

来自「使用iccavr的例子」· ~H 代码 · 共 51 行

~H
51
字号
/* ATmega103 lcd.h file 

   Author : Robert Stuart 
   Company : PDL Industries 
   Date of Creation : 26 August 1999
*/

/* includes */
#include <iom103.h>
#include <stdio.h>
#include <string.h>
#include "logic.h"

/* constants for initialising and controlling the lcd */
#define INSTRUCTION 	0x00
#define DATA 		0x01
#define FUNCTION_SET 	0x38
#define DISPLAY_CLEAR 	0x01
#define DISPLAY_ON 		0x0C
#define BUSY_FLAG 		0x80
#define FIRST_LINE 		0x80
#define SECOND_LINE 	0xC0

/* "Lcd_Status" options */
#define LCD_OK 		0x01
#define LCD_UPDATE 		0x02
#define LCD_BUSY 		0x04
#define LCD_INITIALISE 	0x08
#define LCD_QUEUE		0x10

/* External Variables */
extern const char *LCDHeader1;
extern const char *LCDHeader2;
extern char LCDStatus;

/* Local variables */
static unsigned char LCDCounter;
static unsigned char LCDLine;
static char LCDStr1[17];
static char LCDStr2[17];
static char LCDQueueStr1[17];
static char LCDQueueStr2[17];

/* Local prototypes */
void InitScreen( void );
void ConfigureLCD( void );
void WriteToScreen( void );
void WriteToDevice( char, unsigned char );
char ReadDevice( unsigned char );
void CheckIfBusy( void );

⌨️ 快捷键说明

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