ok thank blueroomelectronics!
How can I program it using C? cause only one interrupt is available (RB0).. I want to make this three timers to control 3 states of processes..
and do you know how to make the pins switch on for how many seconds then it switches off?I'll use it to drive the motors of my system..
Added after 11 minutes:
here is my program and it doesnt work
#include<pic.h>
int B,C,D;
int decode[10]={0,1,2,3,4,5,6,7,8,9};
main()
{
TRISA=0x2F;
TRISB=0x00;
TRISC=0x00;
TRISD=0x00;
while(1)
{
if (RA0){B++;}
if (RA1){B--;}
if (RA2){C++;}
if (RA3){C--;}
if (RA4){D++;}
if (RA5){D--;}
PORTB=decode;
PORTC=decode[C];
PORTD=decode[D];
}
}
Port A only sets the time for each to countdown..