/****************************************************************************** Jeannette_1.c 9-step pattern sequencer using the PIC16F684 * PORTA(RA0-RA2) will be the upper LEDs and PORTC will be the lower * 6 bit LEDs* This program is a light sequencer/chaser programmed with different * patterns using the Hi-Tech C compiler * Written by Marco Garza dba Picotek, 08/03/2011*****************************************************************************/#include #define flash_1() (PORTC=0x01, PORTC=0x00); #define flash_2() (PORTC=0x02, PORTC=0x00);#define flash_3() (PORTC=0x04, PORTC=0x00);#define flash_4() (PORTC=0x08, PORTC=0x00);#define flash_5() (PORTC=0x10, PORTC=0x00);#define flash_6() (PORTC=0x20, PORTC=0x00);#define flash_7() (PORTA=0x01, PORTA=0x00);#define flash_8() (PORTA=0x02, PORTA=0x00);#define flash_9() (PORTA=0x04, PORTA=0x00);/* setting the configuration fuses: ***, ***, brown out reset disabled, code unprotected, MCLR off, ***, watch dog off, internal clock */__CONFIG(FCMDIS & IESODIS & BORDIS & UNPROTECT & MCLRDIS & PWRTEN & WDTDIS & INTIO);/* first arg:higher 3 leds, 2nd arg:lower 6 leds, 3rd arg:on length*/void strobe(char upper, char lower, int duration){ int i; //counter for duration for (i=0; i<=duration; i++) { char led=0x01; //to be anded with A and C ports while (led < 64) { PORTA=(led & upper); PORTA=0; PORTC=(led & lower); PORTC=0; led = (led << 1); } }} /* simple delay */void pause(int value){ int p; for (p=0; p