#include "reg51.h"
#include "intrins.h"
#define u8 unsigned char
#define u16 unsigned int
sbit Pump = P1^1;
sbit Up_aerate = P1^2;
sbit Up_staleness = P1^3;
sbit Down_Aerate = P1^4;
P1M1 = 0x00;
P1M0 = 0xFF;
void delay_us (u16 t)
{
int i;
while(t--)
{
_nop_();
_nop_();
i=1;
while(--i);
}
}
void delay_ms (u16 ms)
{
while(ms--)
{
delay_us(1000);
}
}
void main()
{
while(1)
{
Pump = 1;
delay_ms(6000);
Pump = 0;
delay_ms(6000);
Pump = 1;
Up_aerate = 1;
delay_ms(6000);
Up_aerate = 0;
delay_ms(6000);
Up_aerate = 1;
Up_staleness = 1;
delay_ms(6000);
Up_staleness = 0;
delay_ms(6000);
Up_staleness = 1;
}
}