simply, the circuit is a 38KHz signal generator for an IR remote project. the output signal should be gated by an MCU according to IR timing intervals recorded earlier. the design with the 4148 diode is for duty cycle control.
first, I tried the left section (simple gating) alone. it worked but the timings were a little (up to 30 us) offset in randomly both directions.
-- I deduced the problem may be that the gated signal, may start at any point of wave, not essentially at a low to high transition.
then, I used the right hand section to override trigger/threshold. so when the input gating signal is low, the threshold is kept high, the capacitor stays charged and output (and IRLED) is forced low. when the Gate signal goes high, the reverse story happens.
the problem is, the timings are a lot more (up to milliseconds) distorted in this case. so here are the obvious questions :
- is the deduced idea of bad behavior correct ?
- is the suggested solution correct ?
- in case of "NO" for the previous questions, is there any idea how to do that on a 555 (or similar one chip, general purpose oscillator) ?
the output signals out of MCU are correct. can't use mcu for 38khz signal generation.