AVR单片机仿真100例

源代码在线查看: 8×8led点阵屏显示数字.c

软件大小: 15957 K
上传用户: yangbaochun
关键词: AVR 100 单片机仿真
下载地址: 免注册下载 普通下载 VIP

相关代码

				//-----------------------------------------------------------------
				//  名称: 8×8LED点阵屏显示数字
				//-----------------------------------------------------------------
				//  说明: 8×8LED点阵屏循环显示数字0-9,刷新过程由定时器中断完成
				//   
				//-----------------------------------------------------------------
				#define F_CPU 4000000UL
				#include 
				#include 
				#include 
				#define INT8U   unsigned char
				#define INT16U  unsigned int
				
				//数字0~9的8x8点阵编码
				const INT8U Table_OF_Digits[] = 
				{  
					0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,//0	 
					0x00,0x08,0x38,0x08,0x08,0x08,0x3E,0x00,//1	
					0x00,0x3C,0x42,0x04,0x08,0x32,0x7E,0x00,//2	
					0x00,0x3C,0x42,0x1C,0x02,0x42,0x3C,0x00,//3	
					0x00,0x0C,0x14,0x24,0x44,0x3C,0x0C,0x00,//4	
					0x00,0x7E,0x40,0x7C,0x02,0x42,0x3C,0x00,//5	
					0x00,0x3C,0x40,0x7C,0x42,0x42,0x3C,0x00,//6	
					0x00,0x7E,0x44,0x08,0x10,0x10,0x10,0x00,//7	
					0x00,0x3C,0x42,0x24,0x5C,0x42,0x3C,0x00,//8	
					0x00,0x38,0x46,0x42,0x3E,0x06,0x3C,0x00 //9	
				};
				
				//------------------------------------------------------------------
				// 主程序
				//------------------------------------------------------------------
				int main() 
				{  
				
				
				
				
				
				
				
				
				
				
				} 
				
				//------------------------------------------------------------------
				// T0定时器中断控制LED点阵屏刷新显示
				//------------------------------------------------------------------
				ISR (TIMER0_OVF_vect)
				{    
				
				
				
				
				
				
				
				
				
				
				
				
				
				
				}
							

相关资源