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

📄 smg.c

📁 avr基础程序大全
💻 C
字号:
#include"smg.h"
#include"delay.h"
#include <iom16v.h>
#include<macros.h>

uchar const  table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, 0x07,
		           0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71,0XFF};
uchar const LED_W[8] = {0,1,2,3,4,5,6,7};	
void smginit(void)
{
  DDRA=0XFF;
 DDRC=0XFF;
}
void show(uchar j,uchar k)
{
      PORTA = table[j];		 // i 值的 个位数
	 PORTC = LED_W[k];		 //点亮第一位数码管
		
		Delay_1ms(2);
}				   

⌨️ 快捷键说明

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