A product powered by pic 12F675 microcontroller. The circuit drives 6-8 leds separated into two groups which can be red and blue, imitating a police type rear-front flasher.
below is the CCS C code for the project
#include <12F675.h>
#fuses INTRC_IO,NOWDT,NOPROTECT,NOMCLR
#use delay(clock=4000000)
//#use rs232(baud=9600, xmit=PIN_a5, rcv=PIN_a4)
#ROM 0x3ff = {0x3480}
#define kucukdelay 30
#define buyukdelay 60
void main() {
while(TRUE) {
// printf("A");
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11111100);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
OUTPUT_A(0b11001111);
delay_ms(kucukdelay);
OUTPUT_A(0b11111111);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
delay_ms(buyukdelay);
}
}