robi10101298
New Member
This is what I've done, but it's blinking 3 times, than 4 times, 3 times than 4 times....Just use a for loop with delays.
Mike.
C:
if(SW1 == 0) // pressed
{
for(i=0; i<3; i++){
if(OCR1AH == 0x4C)
{TCNT1H=0; TCNT1L=0; OCR1AH = 0x13; OCR1AL = 0x10;} //0x1310
else if(OCR1AH == 0x13)
{TCNT1H=0; TCNT1L=0; OCR1AH = 0x2F; OCR1AL = 0xA9;} //0x2fa9
else
{TCNT1H=0; TCNT1L=0; OCR1AH = 0x4C; OCR1AL = 0x40;} //0x4C40
}
delay_ms(1000);
}
Last edited: