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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? lcd_v1.2.c

?? MSP430f2013 ADC, LCD drivers using 74168 shift registers
?? C
字號(hào):
/*=============================================================================
//   File : LCD_V1.1.c                                                       //
//                                                                           //
//   Abstract: The source file containing the required control and disp fun  //
//   Compiler : IAR Embedded Work Bench                                      //
//                                                                           //
//   Author : Kuberappa.M.Sajjan                                             //
//   E-mail : kuber@unifiest.com                                             //
//                                                                           //
//                                                                           //
=============================================================================*/




/*---------------------------- Preprocessor Directives ----------------------*/
#include "io430.h"
#include "datatypes_v1.1.h"
#include "lcd_v1.1.h"





/*--------------------------- Macros and Constants --------------------------*/

#define   LCD_DELAY_1          {UINT lcd_delay; for(lcd_delay = 0;\
                               lcd_delay<9600;lcd_delay++);}
#define   LCD_DELAY_2          {UINT lcd_delay; for(lcd_delay = 0;\
                               lcd_delay<7500;lcd_delay++);}    


#define   LCD_DATA_DELAY       {UCHAR lcd_data_del;for(lcd_data_del = 0;\
                                lcd_data_del<0x75;lcd_data_del++);} 





/*-------------------------- Global Variable Declarations -------------------*/







/*-------------------------- Function Prototypes ----------------------------*/

/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      port_initialisation()                                                  = 
=                                                                             =
=     Design Description: This function Initialises the GPIO                  =
=     Inut Parameters : None                                                  =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/
void port_initialisation(void)
{
  LCD_DATA_DIR = OUT_BIT;         // Set the O/P Direction for LCD Data bit
  LCD_CLK_DIR = OUT_BIT;          // Set the O/P Direction for LCD clock bit
  RS_DIR = OUT_BIT;               // Set the O/P Direction for LCD RS bit
  EN_DIR = OUT_BIT;               // set the O/P Direction for LCD EN bit   
}

/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_initialisation()                                                   = 
=                                                                             =
=     Design Description: This function Initialises the LCD Display           =
=     Inut Parameters : None                                                  =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/


void lcd_initialisation(void)
{
  port_initialisation();          // Initialise the Port Direction for LCD 
  
  lcd_data(FUNCTION_SET,CLR);     // Send the Function Set Command
  LCD_DELAY_1;                    // Wait for some delay   
  lcd_data(CLEAR_DISPLAY,CLR);    // Clear Display
  LCD_DELAY_1;                    // Wait for some delay 
  lcd_data(CURSOR_ON,CLR);        // Cursor On
  LCD_DELAY_1;                    // Wait for some delay
  lcd_data(ENTRY_MODE,CLR);       // Address on the LCD
}


/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_data()                                                             = 
=                                                                             =
=     Design Description: This function writes the data and control byte on   =
=                         the display                                         =
=     Inut Parameters : UCHAR,UCHAR                                           =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/

void lcd_data(UCHAR write_byte,UCHAR cmd)
{
  if(SET == cmd)                  // if the par cmd is 1  
  {
    RS = SET;                     // set the RS bit for data display on the LCD   
  }
  else if(CLR == cmd)             // if the par cmd is 0
  {
    RS = CLR;                     // clr the RS bit for write the contr on the 
                                  // LCD
  }
  convert_data(write_byte);      // Convert byte into bits  
  EN = SET;                      // Set the En signal
  LCD_DATA_DELAY;                // wait for some transition
  EN = CLR;                      // Send Low pulse to Enable the Latch
}


/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      convert_data()                                                          = 
=                                                                             =
=     Design Description: This function sends the data interms of bits.       =
=     Input Parameters : UCHAR                                                =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/



void convert_data(UCHAR convdata)
{
  UCHAR convert = 0;
  UCHAR rol = 0;
  
  while(rol<EIGHT)                // Send the Eight Bit
  {  
     LCD_CLK_BIT = CLR;           // Send Intially low Clk
     if((convdata&0x80)== 0)      // Its check the MSB bit is One or       
     {                            // Zero  
       LCD_DATA_BIT = CLR;        // If Zero, sends the Zero to Shift 
     }
     else 
     {
       LCD_DATA_BIT = SET;        // Other Wise sends One
     }
     LCD_CLK_BIT = SET;           // Sends the Clock as high
     convdata = convdata<<1;      // Shift the data for once left
     rol++;                       // Increment the count for   
  }
}


/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_displaydata()                                                      = 
=                                                                             =
=     Design Description: This function sends the string of data to LCD       =
=     Input Parameters : UCHAR, UCHAR, UCHAR                                  =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/

void lcd_displaydata(UCHAR row ,UCHAR col, const UCHAR *str)
{
  
  lcd_cursor(row,col);            // Position the cursor at required position
  while('\0'!= *str)              // Check for the end bytes
  {
    lcd_data(*str,SET);           // Display the Character    
    str++;                        // Increment the Pointer
  }
}


/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_cursor()                                                           = 
=                                                                             =
=     Design Description: This function puts the position for LCD to Disp     =
=     Input Parameters : UCHAR, UCHAR                                         =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/


void lcd_cursor(UCHAR row, UCHAR col)    // It position the Cursor to req position
{
  switch(row)                            // check the row value
  {
     case 1: lcd_data(0x80 + col-1,CLR);  // If row one put cursor to req col
     break;
     case 2: lcd_data(0xC0 + col-1,CLR);  // If row one put cursor to req col
     break;
     default:
     break;
  }
}


/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_displayfloat                                                       = 
=                                                                             =
=     Design Description: This function displays the float value on Display   =
=     Input Parameters : UCHAR, UCHAR, FLOAT                                  =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/

/*void lcd_displayfloat(UCHAR row, UCHAR col,FLOAT data)
{
  
  ULONG data_l,val;
  UCHAR disp_val = 0;
  float fltval;
  
  fltval = data;
  lcd_cursor(row,col);
  // The modification is on 12.12.08 From Kuber
  // Displaying the voltage on the display with five precisions
  
  // Displaying the First higher byte
  
  data_l = data*100000;
  val = data_l/100000;
  disp_val = val;
  disp_val = disp_val + ASCII;
  lcd_writedata(disp_val);
 
  
  // Displaying the second higher byte after decimal point
  data_l = data_l - val*100000;
  val = data_l/10000;
  disp_val = val;
  disp_val = disp_val + ASCII;
  lcd_writedata(disp_val);
 
  
  // Displaying the third higher byte

  data_l = data_l - val*10000;
  val = data_l/1000;
  disp_val = val;
  disp_val = disp_val + ASCII;
  lcd_writedata(disp_val);
  
  // Displaying the fourth higher byte
  
  data_l = data_l- val*1000;
  val = data_l/100;
  disp_val = val;
  disp_val = val+ASCII;
  lcd_writedata(disp_val);
   lcd_writedata('.');

  
  // Displaying the Fifth higher byte
  
  data_l = data_l - val*100;
  val = data_l/10;
  disp_val = val;
  disp_val = val +ASCII;
  lcd_writedata(disp_val);
  
  // Displaying the Lowest byte 
  disp_val = val%10;
  disp_val = disp_val + ASCII;
  lcd_writedata(disp_val);
  
}*/

/*=============================================================================
=     FUNCTION_NAME:                                                          =
=      lcd_displayfloat                                                       = 
=                                                                             =
=     Design Description: This function displays the wt on the Display        =
=     Input Parameters : UCHAR, UCHAR, FLOAT                                  =
=     Return Type:                                                            =
=                                                                             =
=============================================================================*/

void lcd_display_float_wt(UCHAR row,UCHAR col, FLOAT Float)
{
  UINT Int_disp;                  // Declare the Variable for internal use

  lcd_cursor(row,col);            // Position the cursor at required position

  Int_disp = Float*10;            // Convert the Float value into integer
  send_float_disp(Int_disp,100);  // Send the Higher nibble for display
  
  Int_disp = Int_disp%100;        // Get the reminder from the integer value 
  send_float_disp(Int_disp,10);   // send the Second higher nibble for display
  lcd_data('.',SET);              // Put the decimal point after two valuews
  
  Int_disp = (Int_disp%10);       // Get the lower nibble
  send_float_disp(Int_disp,1);    // Display on the display
 }



void send_float_disp(UINT int_disp, UCHAR div)
{
 
  int_disp = int_disp/div;         //  Convert the byte into nibble
  lcd_data((int_disp + ASCII),SET);// Display the value on the Display
}




























/* The modification in this file is Grounding the RW signal on LCD Display always
   Also giving the 5 digit precision on the LCD */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美吻胸吃奶大尺度电影| 91女厕偷拍女厕偷拍高清| 欧美精品一区二区三区一线天视频 | 精品欧美久久久| 成人福利视频在线| 天堂成人免费av电影一区| 欧美大胆一级视频| 欧美探花视频资源| 国产河南妇女毛片精品久久久| 国产精品不卡一区| 欧美一区二区三区在| a级精品国产片在线观看| 日韩高清欧美激情| 亚洲成av人片一区二区三区| 国产精品久久久久久久久久久免费看 | 99久久夜色精品国产网站| 亚洲成人在线免费| 亚洲欧美一区二区三区极速播放| 精品国产乱码久久久久久免费| 色综合视频在线观看| 风间由美中文字幕在线看视频国产欧美 | 亚洲国产高清在线观看视频| 欧美精品一区二区三区蜜桃| 亚洲精品一区在线观看| 欧美一级精品大片| 亚洲精品在线观| 精品国内二区三区| 久久久综合激的五月天| 久久久国产精品午夜一区ai换脸| 欧美日韩黄色一区二区| 欧美日韩国产免费| 精品91自产拍在线观看一区| 国产拍揄自揄精品视频麻豆| 国产精品久久久久永久免费观看| 欧美国产成人精品| 香蕉久久一区二区不卡无毒影院 | 久久影音资源网| 国产精品九色蝌蚪自拍| 亚洲成人综合网站| 国产精品综合二区| 在线视频你懂得一区| 日韩一级成人av| 亚洲制服欧美中文字幕中文字幕| 久久99精品久久久久久国产越南| 国产一区在线精品| 欧美色图一区二区三区| 久久精品一区蜜桃臀影院| 午夜久久久久久电影| 国产传媒欧美日韩成人| 欧美天堂亚洲电影院在线播放| 91麻豆精品国产91| 尤物在线观看一区| 成人avav影音| 国产日韩v精品一区二区| 一区二区三区欧美视频| 成人高清伦理免费影院在线观看| 欧美一区二区视频在线观看2020 | 亚洲精品美腿丝袜| 成人亚洲精品久久久久软件| 日韩欧美在线综合网| 首页综合国产亚洲丝袜| 欧美午夜片在线观看| 亚洲色大成网站www久久九九| 国内精品久久久久影院色 | 久久亚洲捆绑美女| 精品亚洲免费视频| 久久久精品一品道一区| 国产真实乱对白精彩久久| 久久精品夜夜夜夜久久| 国产九色sp调教91| 欧美国产1区2区| 91丨porny丨国产| 亚洲男人的天堂在线aⅴ视频| 99久久久国产精品| 婷婷激情综合网| 久久久久久麻豆| 色综合一区二区| 蜜桃一区二区三区在线| 精品噜噜噜噜久久久久久久久试看| 另类欧美日韩国产在线| 久久久久久久国产精品影院| a级精品国产片在线观看| 爽爽淫人综合网网站| 欧美极品美女视频| 欧美日韩久久不卡| 成人小视频在线| 午夜伊人狠狠久久| 中文成人av在线| 色呦呦国产精品| 国产精品一二三四五| 视频一区二区三区入口| 国产精品久久久久aaaa樱花| 欧美日韩电影在线播放| 成人精品视频一区二区三区| 午夜精品久久久久久久久久| 国产精品动漫网站| 欧美v亚洲v综合ⅴ国产v| 在线免费观看日韩欧美| 激情综合色综合久久综合| 一区二区三区中文字幕电影| 国产网站一区二区| 精品少妇一区二区三区在线播放| 色婷婷亚洲综合| 91视频在线看| 色呦呦网站一区| 91黄色在线观看| 欧美在线短视频| 欧美日韩在线三区| 欧美精品vⅰdeose4hd| 欧美一区二区在线不卡| 欧美精品第1页| 日韩一区二区精品在线观看| 制服丝袜亚洲精品中文字幕| 欧美另类一区二区三区| 欧美综合一区二区| 欧美一区二区视频在线观看2022| 制服.丝袜.亚洲.中文.综合| 色哟哟国产精品| 欧美精品1区2区3区| 精品日韩一区二区| 亚洲欧洲日韩女同| 亚洲专区一二三| 日韩1区2区3区| 国产伦精品一区二区三区免费 | 天堂蜜桃一区二区三区| 韩国精品主播一区二区在线观看 | 美脚の诱脚舐め脚责91| 成人免费黄色在线| 国产日产欧美一区| 首页综合国产亚洲丝袜| 国产suv一区二区三区88区| 欧美日韩国产小视频| 国产精品女人毛片| 久久成人免费日本黄色| 欧美一级夜夜爽| 成人18视频在线播放| 色999日韩国产欧美一区二区| 国产欧美一区二区精品性色超碰| 国产成人av电影在线播放| 久久久久9999亚洲精品| 日本特黄久久久高潮| 欧美性受xxxx| 中文字幕一区二区在线播放| 激情综合亚洲精品| 337p粉嫩大胆噜噜噜噜噜91av| 一区二区三区国产豹纹内裤在线| 成人免费视频国产在线观看| 精品国产污网站| 久久国产三级精品| 亚洲精品一区二区三区影院 | 香蕉成人啪国产精品视频综合网| 欧美三级三级三级| 国模少妇一区二区三区| 中文字幕色av一区二区三区| 日本韩国欧美三级| 麻豆精品在线看| 一区二区三区四区高清精品免费观看| 91久久线看在观草草青青| 免费的国产精品| 国产精品久线在线观看| 在线精品视频小说1| 丝袜亚洲另类丝袜在线| 久久蜜桃av一区精品变态类天堂 | 国产成人小视频| 日韩精品电影在线观看| 一区二区三区中文在线观看| 久久99精品久久久久久动态图 | 中文字幕二三区不卡| 久久欧美一区二区| 欧美福利视频一区| 色噜噜偷拍精品综合在线| 国产一区二区三区国产| 三级久久三级久久| 亚洲制服丝袜av| 国产精品护士白丝一区av| 久久婷婷国产综合国色天香| 5858s免费视频成人| 精品视频一区二区三区免费| 97精品视频在线观看自产线路二| 精品在线一区二区三区| 午夜日韩在线电影| 亚洲一区二区欧美日韩| 一区二区三区四区国产精品| 国产精品全国免费观看高清| 欧美激情一区二区三区在线| 国产精品五月天| 国产精品萝li| 久久伊人中文字幕| 日韩一二三四区| 国产欧美日韩激情| 亚洲欧美另类久久久精品2019| 亚洲精品久久7777| 亚洲综合丝袜美腿| 五月综合激情网| 看电视剧不卡顿的网站| 成人免费va视频| 欧美日韩中文国产| 久久久久久久综合日本| 国产精品久久久久久久久动漫 | 国产精品免费久久|