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

📄 glcd_i2c_batron.h

📁 this document is source code for arm9 of atmel
💻 H
字号:
/*-----------------------------------------------------------------------------
*         ATMEL Microcontroller Software Support  -  ROUSSET  -
*------------------------------------------------------------------------------
* The software is delivered "AS IS" without warranty or condition of any
* kind, either express, implied or statutory. This includes without
* limitation any warranty or condition with respect to merchantability or
* fitness for any particular purpose, or against the infringements of
* intellectual property rights of others.
*------------------------------------------------------------------------------
* File Name           : glcd_i2c_batron.h
* Object              : glcd_i2c_batron header file
*
* Version | mm | dd | yy | author :
*  1.0      11   07   06    PFi   : Creation
*
*------------------------------------------------------------------------------
*/
#ifndef glcd_i2c_batron_h
#define glcd_i2c_batron_h

#include <stdio.h>


/* ----------------------- External Function Prototype ----------------------*/

/* GLCD (PCF8558) slave address: 7-bit slave addresses: 0x3D
   Internal hardcoded address: 011110
   External addrress SA0, internaly wired to 1 in the module
   Therefore, the complet slave address is:
   | 0 | 1 | 1 | 1 | 1 | 0 | 1 |
   |MSB| - | - | - | - | - |LSB|
*/

#define AT91C_GLCD_I2C_ADDRESS  0x3D<<16

/*
Graphic LCD control byte, address register definition
INSTRUCTION     |D7|D6|D5| D4 | D3 | D2 | D1 | D0 | DESCRIPTION
                -----------------------------------
Display control |0 |E |D | PD | V  | Y2 | Y1 | Y0 | Y addr vector, disp control
                -----------------------------------
X address       |0 |            X address         | set column address
                -----------------------------------
*/
/* COMMANDS: Display Control */

#define LCD_POWER_DOWN  0x10  /* default value:  LCD ON -> PD bit = 0 */
#define VER_ADDRESSING  0x8   /* LCD definition becomes 40 x 96 */
#define BLANK           0x0   /* All segment OFF */
#define Inverse         0x20  /* Blank characters black background. */
#define All_segments_on 0x40
#define Normal          0x60  /* Blank background and black characters. */


/* Page Address in the LCD: Y0, Y1 and Y2 define the Y address vector
   address of the display RAM. A Page is 8 x 96 */
#define LCD_PAGE_0      0x0
#define LCD_PAGE_1      0x1
#define LCD_PAGE_2      0x2
#define LCD_PAGE_3      0x3
#define LCD_PAGE_4      0x4

/* X address: The X address points to the columns.
   The range of X is 0 to 100 (64H).*/

#define X_START 1
#define X_END  (X_START+X_LCD_MAX)
#define X_LCD_MAX  96
#define Y_LCD_MAX  40
#define LCD_CHAR_WIDTH  5
#define LCD_PAGE_HEIGHT  8


/* Function prototyping */
extern void AT91F_Glcd_PutChar(unsigned char c,
                               unsigned char LcdPage,
                               unsigned char X_Address);

extern void AT91F_Glcd_PutString(char *s, unsigned char LcdPage, unsigned char X_Address);

extern void AT91F_Glcd_ClearLcd(void);

extern void AT91F_Glcd_ClearLcdColumn(unsigned char Column, unsigned char LcdPage);

extern void AT91F_Glcd_ClearLcdPage(unsigned char LcdPage);

extern void AT91F_Glcd_VideoMode(char VideoMode);

extern void AT91F_Glcd_ClearChar(unsigned char Column, unsigned char LcdPage);

extern void AT91F_Glcd_DisplayBitmap(unsigned char *Image,
                                     unsigned int X_Location,
                                     unsigned int LcdPageStart,
                                     unsigned int X_Size,
                                     unsigned int Y_Size);

extern void AT91F_Glcd_Reset (const AT91PS_PIO pPio,int PioID,int Twck,int Twd);


#endif

⌨️ 快捷键说明

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