/******************************************************************************
*
* Description : 4 key control led flow
* key1 -- start
* key2 -- stop
* key3 -- up->down
* key4 -- down->up
*
* Author : [email protected]
*
* Date : 2006-12-3
*
******************************************************************************/
#include "reg51.h"
#include "INTRINS.H"
typedef unsigned int uint_t;
typedef unsigned char uchar_t;
uchar_t key(void);
void mydelay(uint_t delay_time);
void main()
{
uchar_t key_v;
bit start = 0;
bit updown = 0;
uchar_t out_data = 0xfe;
for(;;){
key_v = key();
switch(key_v){
case 0xfb:{
start = 1;
*
* Description : 4 key control led flow
* key1 -- start
* key2 -- stop
* key3 -- up->down
* key4 -- down->up
*
* Author : [email protected]
*
* Date : 2006-12-3
*
******************************************************************************/
#include "reg51.h"
#include "INTRINS.H"
typedef unsigned int uint_t;
typedef unsigned char uchar_t;
uchar_t key(void);
void mydelay(uint_t delay_time);
void main()
{
uchar_t key_v;
bit start = 0;
bit updown = 0;
uchar_t out_data = 0xfe;
for(;;){
key_v = key();
switch(key_v){
case 0xfb:{
start = 1;