Joe, Now I understand. We don't have to worry about having a reset pulse=20 that is too short. Go high, wait one instruction, go back low. Put this=20 in the main loop. It will always be 400ns long. Correct? Thanks, rich! On 7/18/2014 6:10 AM, IVP wrote: >> Well the PWM is out. Are you trying to say that we only need >> the 20ns? What if we are off a little bit and the reset pulse is only >> 19ns long. Wouldn't it be better to use a longer pulse to insure >> that we always meet that 20ns requirement? > The instruction cycle time is 200ns, so you can't have a pulse shorter > than that. The shortest safest piece of code is > > bsf pulse > nop > bcf pulse > > which will give you at least 400ns > > Note the NOP in the middle. Because of the read-modify-write > issue on the PICs without an output latch, a NOP is recommended > > http://www.piclist.com/techref/readmodwrite.htm > > And my real-world submission to the SX list > > http://www.piclist.com/techref/scenix/sxrmw.htm > > Joe --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .