亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? glcd_i2c_batron.c

?? this document is source code for arm9 of atmel
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*-----------------------------------------------------------------------------
            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.c
/ Object              : Graphic LCD routines for Chip-On-Glass LCD Module.
/                     :
/ Version | mm | dd | yy | author :
/   1.0     11   07   06    PFi   : Creation
/   1.1     11   04   07    PFi   : START / STOP bit clean up according to new
/                                   TWI doc.
/
/-----------------------------------------------------------------------------
 1)Description:

 The functions below show how to communicate with the 96 X 40 DOTS GLCD module,
 BT 96040AV-SRE-12-I2C-COG from BATRON is based on the Philips PCF8558 display
 controller.

 The registers of GLCD are write only.

 2)Configuration and pins used in this example:

 ------| AT91 / IO  | GLCD / IO
 CLOCK | TWCK / PA3 | SCL / 5
 DATA  | TWD / PA4  | SDA / 1

 3) Remarks:

 This example runs in polling mode and makes no use of IRQs. To have further
 details  and implementation example about using IRQs, refer to any Interrupt
 project examples, like AT91SAM7Sxx-Interrupt-IAR4_XX-X_X
 available on www.at91.com --> KIT --> AT91SAM7S-EK --> Software

-----------------------------------------------------------------------------*/
/* Include Standard LIB  files */
#include "project.h"
#include "..\common\lib_twi.h"
#include "glcd_i2c_batron.h"

extern void AT91F_Wait_MicroSecond (unsigned int MicroSecond);

#include "font\full_5_x_7_charset.h" /* This character set contains */
                                     /* standard and extended codes */


/*-----------------------------------------------------------------------------
 This Function writes one charactere in a lcd page (LcdPage) and at the specific
 column address (X_Address).
 This function uses the TWI in Master write mode with multiple data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_PutChar(unsigned char c,
                        unsigned char LcdPage,
                        unsigned char X_Address)
{
   int i;
   unsigned int status;

   /* Enable Master Mode of the TWI */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the command + the Page Address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /* Wait until TXRDY is high to transmit the next data */
    status = AT91C_BASE_TWI->TWI_SR;
       while (!(status & AT91C_TWI_TXRDY_MASTER))
        status = AT91C_BASE_TWI->TWI_SR;

      /* Send X address (column address) */
      AT91C_BASE_TWI->TWI_THR = X_START+X_Address;

   /* Send bit to display a character by using the charset table */
   for ( i=0; i<5; i++ )
   {
     /* Wait for the Transmit ready is set to send the next data */
     status = AT91C_BASE_TWI->TWI_SR;
      while (!(status & AT91C_TWI_TXRDY_MASTER))
        status = AT91C_BASE_TWI->TWI_SR;
     /* Send the data to turn on the right pixels to display the character */
     AT91C_BASE_TWI->TWI_THR = charset[(c-32)][i];
   }


   /* Wait for the Transmit complete is set */
   status = AT91C_BASE_TWI->TWI_SR;
   while (!(status & AT91C_TWI_TXCOMP_MASTER))
     status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
 This Function writes a string in a lcd page at the specific column (X_Address)
 Max 19 characters per line/string.
 Do not use /r/n if sprintf function is used before calling AT91_Glcd_PutString
-----------------------------------------------------------------------------*/
void AT91F_Glcd_PutString(char *s,
                          unsigned char LcdPage,
                          unsigned char X_Address)
{
  while ( *s != 0 )
  {
     AT91F_Glcd_PutChar(*s++, LcdPage,X_Address);
     X_Address+=LCD_CHAR_WIDTH;
  }
}

/*-----------------------------------------------------------------------------
* This Function configure the video Mode the LCD.
* - Normal: Blank background and black characters.
* - Inverse : Blank characters black background.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_VideoMode(char VideoMode)
{

  AT91F_TWI_WriteSingle(AT91C_GLCD_I2C_ADDRESS, &VideoMode);

}

/*-----------------------------------------------------------------------------
* This Function clears a column (X_ADDRES) in a LCD page.
* This function uses the TWI in Master write mode with one data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearLcdColumn(unsigned char Column, unsigned char LcdPage)
{
    unsigned int status;

    /*  Enable Master Mode */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the LCD mode and the page to address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /*  Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send column address to access */
     AT91C_BASE_TWI->TWI_THR = Column;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send 0 to clear it */
    AT91C_BASE_TWI->TWI_THR = 0x0;

    /* Wait for the Transmit complete is set */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXCOMP_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
* This Function clears a char in a page @ location X.
* This function uses the TWI in Master write mode with multiple data.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearChar(unsigned char Column, unsigned char LcdPage)
{
    unsigned int status,i;

    /* Enable Master Mode */
    AT91C_BASE_TWI->TWI_CR = AT91C_TWI_MSEN|AT91C_TWI_SVDIS ;

    /* Set the TWI Master Mode Register */
    AT91C_BASE_TWI->TWI_MMR =  AT91C_GLCD_I2C_ADDRESS & ~AT91C_TWI_MREAD;

    /* Send the LCD mode and the page to address */
    AT91C_BASE_TWI->TWI_THR = Normal+LcdPage;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send column address to access */
     AT91C_BASE_TWI->TWI_THR = Column;

    /* Wait for the Transmit ready is set to send the data */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXRDY_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

    /* Send 0 to clear each lcd colum for a 5 x 7 char */
    for ( i=0; i<5; i++ )
    {
      /*  Wait for the Transmit ready is set to send the next data */
      status = AT91C_BASE_TWI->TWI_SR;
        while (!(status & AT91C_TWI_TXRDY_MASTER))
          status = AT91C_BASE_TWI->TWI_SR;
      /* Send the data to turn on the right pixel to display the character */
      AT91C_BASE_TWI->TWI_THR = 0x0 ;
    }

    /* Wait for the Transmit complete is set */
    status = AT91C_BASE_TWI->TWI_SR;
    while (!(status & AT91C_TWI_TXCOMP_MASTER))
      status = AT91C_BASE_TWI->TWI_SR;

}

/*-----------------------------------------------------------------------------
* This Function clears a LCD page by sending 0 to all pixels address.
-----------------------------------------------------------------------------*/
void AT91F_Glcd_ClearLcdPage(unsigned char LcdPage)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三区四区不卡 | 成人99免费视频| 日日夜夜精品视频天天综合网| 欧美精品一区二| 亚洲精品一区在线观看| 国产色婷婷亚洲99精品小说| 久久久精品tv| 国产精品久久久久久久久免费桃花| 国产精品久久久久久久久晋中 | 国产精品一卡二卡在线观看| 成熟亚洲日本毛茸茸凸凹| 国产麻豆视频精品| 美国十次了思思久久精品导航| 中文字幕在线观看一区| 欧美熟乱第一页| 91尤物视频在线观看| 精品一区二区三区免费视频| 亚洲精品视频在线| 一区二区三区在线播放| 国产精品久久久久久久久免费相片| 日韩欧美国产高清| 精品国产区一区| 欧美r级电影在线观看| 精品va天堂亚洲国产| 欧美国产精品v| 国产精品系列在线| 亚洲乱码中文字幕| 亚洲另类春色国产| 午夜精品一区二区三区免费视频| 欧美不卡激情三级在线观看| 日韩美一区二区三区| 国产又粗又猛又爽又黄91精品| 国产精品一级在线| 成人久久18免费网站麻豆 | 欧美午夜宅男影院| 欧美日韩五月天| 日韩一区二区三区电影| 久久久电影一区二区三区| 中文字幕国产精品一区二区| 不卡av在线免费观看| 不卡av电影在线播放| 99在线精品一区二区三区| 欧美日韩一区在线| 日韩欧美成人激情| 亚洲欧洲av在线| 青青草91视频| 91浏览器打开| 精品不卡在线视频| 亚洲在线观看免费视频| 极品少妇一区二区| 欧美人与禽zozo性伦| 亚洲图片一区二区| 久久99国产精品久久99| 久久激五月天综合精品| 免费人成网站在线观看欧美高清| 国产欧美日韩不卡免费| 亚洲一区二区三区四区不卡| 另类小说视频一区二区| 国内久久精品视频| 成人18精品视频| 精品久久人人做人人爽| 欧美变态口味重另类| 午夜精品久久一牛影视| 欧美性猛片aaaaaaa做受| 亚洲欧美一区二区三区极速播放| 99久久国产综合精品麻豆| 国产欧美日韩综合| 国产精品小仙女| 一区视频在线播放| 国产精品一品二品| 日韩精品一区二区在线| 日韩福利电影在线观看| 久久国产乱子精品免费女| 91精品国产综合久久国产大片| 一级做a爱片久久| 在线不卡免费欧美| 久久se精品一区二区| 97精品国产露脸对白| 亚洲免费观看视频| 丁香桃色午夜亚洲一区二区三区 | 亚洲视频一二区| 欧美视频精品在线| 激情小说亚洲一区| 91精品在线免费观看| 国产一区二区三区四区五区美女 | 午夜国产精品一区| 欧美一区二区三区在线观看| 中文欧美字幕免费| 日韩丝袜情趣美女图片| 亚洲成人免费在线| 欧美激情在线一区二区| 欧美日韩国产成人在线免费| 高清免费成人av| 日日夜夜精品视频免费| 国产婷婷色一区二区三区在线| 国产精品一区二区男女羞羞无遮挡| 亚洲精品综合在线| 日韩欧美一区电影| 午夜精品国产更新| 亚洲一区二区视频| 99久久久国产精品| 国产精品综合二区| 欧美bbbbb| 日韩成人av影视| 性做久久久久久| 成人欧美一区二区三区1314| 亚洲精品在线观看视频| 日韩欧美中文字幕精品| 欧美日本一区二区在线观看| 成人激情免费网站| av影院午夜一区| 粗大黑人巨茎大战欧美成人| 国产麻豆91精品| 日韩高清一区在线| 久久99久久久久| 久久精品国产秦先生| 久久久亚洲高清| xnxx国产精品| 欧美国产一区二区在线观看| 中文字幕第一区第二区| 亚洲美女偷拍久久| 日韩影院精彩在线| 国产三级一区二区三区| 中文字幕在线一区免费| 一区二区三区四区蜜桃| 日韩视频在线一区二区| 久久精品一区二区三区四区| 日本一区二区三区免费乱视频| 国产拍欧美日韩视频二区| 亚洲欧洲成人自拍| 看国产成人h片视频| 国产成人av一区二区三区在线| 粉嫩高潮美女一区二区三区| 成人av免费观看| 精品美女一区二区三区| 国产精品久久久久天堂| 久久久久久免费| 亚洲一线二线三线视频| 福利一区福利二区| 欧美精选一区二区| 日韩高清不卡一区| 精品久久久影院| 丁香另类激情小说| 亚洲精品免费在线| 欧美高清一级片在线| 国产伦精品一区二区三区视频青涩 | 欧美做爰猛烈大尺度电影无法无天| 一区二区视频免费在线观看| 欧美日韩一区二区在线视频| 国产尤物一区二区| 亚洲精品视频在线观看网站| 欧美一区二区精品久久911| 国产成人综合网站| 亚洲一区二区黄色| www一区二区| 欧美日韩国产高清一区二区三区 | 久久久噜噜噜久久中文字幕色伊伊| 成人免费高清视频| 免费不卡在线视频| 伊人一区二区三区| 国产婷婷色一区二区三区| 7777精品伊人久久久大香线蕉的 | 国产在线精品国自产拍免费| 亚洲免费资源在线播放| 国产婷婷色一区二区三区| 欧美夫妻性生活| 色一情一伦一子一伦一区| 国产成人精品免费看| 蜜臀av性久久久久av蜜臀妖精| 亚洲免费观看视频| 一区二区三区在线播放| 日韩理论电影院| 亚洲第一狼人社区| 一区二区三区日韩欧美| 久久蜜臀精品av| 99精品一区二区三区| 日韩电影在线观看一区| 国产色综合久久| 91麻豆精品国产综合久久久久久| 成人精品高清在线| 免费成人性网站| 亚洲主播在线播放| 亚洲精品乱码久久久久| 一级做a爱片久久| 日本欧美一区二区三区| 七七婷婷婷婷精品国产| 老司机精品视频在线| 国产成人免费在线| 91麻豆高清视频| 欧美欧美欧美欧美首页| 精品粉嫩超白一线天av| 中文字幕成人av| 亚洲福中文字幕伊人影院| 日韩电影在线免费观看| 色综合 综合色| 精品欧美一区二区久久| 国产欧美一区二区精品性| 国产精品免费视频网站| 亚洲成年人影院| 国产999精品久久|