test.c

来自「atmel atmega8的18b20 1602显示的检测温度显示系统prote」· C语言 代码 · 共 44 行

C
44
字号

#include <avr/io.h>
#include "mydelay.h"
#include "LCD1602.h"




#define BIT0	(0x01)
#define BIT1	(0x02)
#define BIT2	(0x04)
#define BIT3	(0x08)

#define BIT4	(0x10)
#define BIT5	(0x20)
#define BIT6	(0x40)
#define BIT7	(0x80)



int main(void)
{
	unsigned char i,c;
	
	DDRC = 0xFF;

	DelayUs(50);		
	i=0x01;

	//LCD_init ();

	//LCD_write_string(0,0,"Hello!");
	while(1)
		{
		if(i==0)i=0x01;

		DelayMs(50);
		PORTC = ~i;
		i = i<<1;
		
		}
}

⌨️ 快捷键说明

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