2)program logic:i know that we are just switching on/off the
motors.but i could not understand the delay routine.why is the
count value being set in the main program & again in the
subroutine? what is the watchdog timer about?
3)function of the zeners and is it a 12v or 1.2v zener.
please can someone help me with these doubts as early as
possible.
It's just a 38KHz oscillator using the two opamps, the BC547 is a simple transistor switch to turn the IR LED's on and off at the oscillator frequency.
2)program logic:i know that we are just switching on/off the
motors.but i could not understand the delay routine.why is the
count value being set in the main program & again in the
subroutine? what is the watchdog timer about?
I would suggest that the one in the main program could be removed, it was probably used before it was added to the subroutine instead. But it won't do any harm, you could easily just leave it in. Certainly in my PIC code you often get bits left in which aren't needed, but if it's not broken, why bother fixing it?.
The WDT is used to reset the program if it locks up, it's a simple hardware timer (just an RC one) which resets the PIC after a certain time. So in any time dependent sections (like the delay loop) you need to reset it (with CLRWDT) periodically to prevent it reseting the PIC. If the code gets locked in an endless loop somewhere (which doesn't include a CLRWDT) the WDT will restart the program.
3)function of the zeners and is it a 12v or 1.2v zener.