Instruction cycle

Hi,
I am generating pulse output through 8051 microcontroller using assembly langauge.
I don't wnat to use any timer for time delay, I would like to use instruction delays as follows...

CLR portbit......3 cycles
NOP..............1 cycle
NOP..............1 cycle
NOP..............1 cycle
SETB portbit.....3 cycles
NOP..............1 cycle
NOP..............1 cycle
NOP..............1 cycle
CLR portbit......3 cycles

6cycles
---| |-------|
|-------| |
6cycles

OFF time = 1+1+1+3
ON time = 1+1+1+3

Is it my calculation is correct here?.
SETB portbit.....3 cycles will be added into OFF time or ON time?

Please comment on this...

Thanks in advance
Rajesh

Parents Reply Children
More questions in this forum