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

📄 lcd1.c

📁 Interfacing AVR to LED, Tact switch+7-segment, Matrix Keypad, HD44780 Character LCD and LED dot matr
💻 C
字号:

/***************************************************
Chip type           : ATmega16
Program type        : Application
Clock frequency     : 8.000000 MHz
Memory model        : Small
External SRAM size  : 0
Data Stack size     : 256
*****************************************************/

#include <mega16.h>
#include <delay.h>
#include <stdio.h>
#include <stdlib.h>
#include <lcd.h>

#asm
   .equ __lcd_port=0x1B ;PORTA
#endasm 

    int num=1385;
    char str[5];

void main(void)
{ 
    
    itoa(num,str);
    
    lcd_init(16);

    lcd_gotoxy(0,0);    
    lcd_putsf("Number="); 

    lcd_gotoxy(7,0);                   
    lcd_puts(str); 

while(1);

}

⌨️ 快捷键说明

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