160,487 posts were found in 1,098ms.


(Multiple bars can be delimited by spaces)
(Multiple users can be delimited by spaces; IP addresses can contain * wildcards.)

Reply: 【教训】if ((A&0x10)==0)必须打括号!

7/22 · 不能写成if (A&0x10==0)

【教训】if ((A&0x10)==0)必须打括号!

7/22 · A&0x10必须加上括号,否则出错

【程序】AVR独立键盘

7/22 · //这是我编写的
#include <iom16v.h>
#include <macros.h>
unsigned char num=0;
unsigned char const s8[16]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,0x88,0x83,0xc6,0xa1,0x86,0x8e};
void delay_ms(unsigned int k)
{...

Reply: 【程序】8位数码管显示

7/22 · 从这个程序可以看出,单片机执行程序非常快的。

夜神月

7/22

Reply: 如果流水灯的数量比较多,可以考虑参考矩阵键盘的方法

7/22 · 回复:2楼
整片单片机可以驱动128个

Reply: 如果流水灯的数量比较多,可以考虑参考矩阵键盘的方法

7/22 · 还可以参考数码管的方法。
8位的数码管一共用了16个IO口,数一数上面的LED数量,为64个LED!
也就是说16个IO口就能驱动64个LED

Reply: 竟然没人了

7/22

【程序】8位数码管显示

7/22 · #include <iom16v.h>
#include <macros.h>
unsigned char const NUM[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90};
void delay_ms(unsigned int k)
{
   unsigned int i,j;
  for (i=0;i<k;i++)...

竟然没人了

7/22