??? 11/24/04 15:20 Read: times |
#81854 - Here is the configuration. Responding to: ???'s previous message |
Hi oleg, Thanks for your reply, and time you are spending sending replies.
Here is my configuration function I call this function only once from main at start up. sfr IPH=0xb7; /*Initializing the envoirment*/ void init_ios(void) { ioport=0xf0; P3=0xff; FIREPORT=1; IE=0; RCAP2H=0xfa; //ADC sampling 20 samples per cycle RCAP2L=0xca; T2CON=0x00; TMOD=0x21; //Timer 0 in 16 bit timer 1 8 bit autoreload. TH1=0x7a; //system timer ticks once 100us. TF1=0; IP=0x08; //Timer 1 priority set. IPH=0x08; IE=0x00; EA=1; //Enabling global interrupts. ET1=1; //Enabling timer 1 interrupt. TR1=1; //Start timer 1. IT0=1; //Interrupt 0 level triggered. IE0=0x00; //Clear External Interrupt 0 Flag. } Although the above function showed only timer 1 interrupt being enabled but in my program I am also using timer 0 and timer 2 interrpts but those interrupts are not always active. My main program actiavtes these interrupts as and when needed and disables them when not needed. Timer 2 in 16 bit auto reload mode is being used for readin ADC PCF8591 through soft I2C routine. and timer 0 is used for timeout of an user set interval upon this time out interval system stops the work and ask user what to do next? If needed tell me I will post those ISR's also. The important thing to note is that I am setting Highest interrupt priority of timer 1 interrupt synchronising the timer 1 values ever zero cross but still the thyristor output is flickering. Thanks & Regards, Prahlad Purohit |