#include
sbit KEY=P3^3;
void DelayUs2x(unsigned char t)
{
while(--t);
}
void DelayMs(unsigned int t)
while(t--) {
DelayUs2x(245);
void main (void)
bit stop = 1;
char xx = 127;
while (1) {
if(!KEY) {
DelayMs(10);
while(!KEY);
stop = !stop;
if (stop) xx = _cror_(xx, 1);
else xx = _crol_(xx, 1);
P0 = xx; DelayMs(500);
#include
#include
sbit KEY=P3^3;
void DelayUs2x(unsigned char t)
{
while(--t);
}
void DelayMs(unsigned int t)
{
while(t--) {
DelayUs2x(245);
DelayUs2x(245);
}
}
void main (void)
{
bit stop = 1;
char xx = 127;
while (1) {
if(!KEY) {
DelayMs(10);
if(!KEY) {
while(!KEY);
stop = !stop;
}
}
if (stop) xx = _cror_(xx, 1);
else xx = _crol_(xx, 1);
P0 = xx; DelayMs(500);
}
}