最近刚开始学51单片机编程。学到按键扫描,在网上看到Etual 2008年总结的《新型按键扫描》的博文,很有感触。关于按键扫描的介绍和应用可以参照原文,本文只是我对程序的一些心得和体会。原文的链接找不到了,给个转载的:
http://blog.21ic.com/user1/379/archives/2010/68144.html
http://blog.ednchina.com/zp2009/983530/Message.aspx
源程序主要部分如下:
volatile unsigned char Trg;
volatile unsi