Hi, Can anyone please give a C program for 8051 that can drive two DC motors with time delay?? That is two motors have to run for 5secs and stop for 5 secs. I have a program to interface the motors using l293d but cannot understand how to implement the timer for running and stopping.
</i PLEASE HELP>
Most of the basic 8051 family controllers are based on 11.0592MHz clock, so i calculated machine cycles according to that frequency and given the example.
...are based on... are based on the crystal oscillator used. Important note: CPU clock frequency = crystal oscillator frequency/12 and CPU clock time period = 1/CPU clock frequency
Also, i would prefer using a timer to generate a delay as compared to generating a delay by using a software code.
@Rajat Saha refer to any text book. Mazidi is good for starters.
CPU clock frequency = crystal oscillator frequency/12 here you go again,
for the old steam driven '51 that is true, but for most modern derivatives it is BLATANTLY FALSE