?? main_old.c
字號:
/************************************************************/
/* Function: */
/* */
/* Example Analogue convertor program for LPC2100 */
/* */
/* Demonstrates A/Dconversion in hardware mode with */
/* */
/* Oscillator frequency 12.000 Mhz */
/* Target board Keil MCB2100 */
/************************************************************/
#include <lpc210x.h>
#include "LCD1602.h"
float AD_r=0.66;
unsigned char Dis_Value[5];
int main(void)
{
PINSEL0=0x00000000;
PINSEL1=0x00000000;
IODIR= 0x7ff;
LCD_Initial();
GotoXY(0,0);
Dis_Value[1]=46;
Dis_Value[4]=0;
Dis_Value[0]= (unsigned char)(AD_r)%10+0x30;
Dis_Value[2]=(unsigned char)(AD_r*10)%10;
Dis_Value[3]=(unsigned char)(AD_r*100)%10;
Dis_Value[2]=(unsigned char)(AD_r*10)%10+0x30;
Dis_Value[3]=(unsigned char)(AD_r*100)%10+0x30;
Print("Volt: (V)");
while(1)
{
GotoXY(6,0);
Print(Dis_Value);
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -