profor
Active member
Hello,
the name of thread might be wrong, but i dont know, how to name it better
First of all, what i want to do:
i need to feed 4-20mA module extracted from energy manager RMS621 with squarevawe signal. It is a tiny pcb soldered on main pcb which is powered +-12V and galvanicaly isolated from Altera Cyclone chip by optocoupler. By looking at the logic analyser i found out that the Cyclone feeds the module every 1,25ms with squarevawe signal with period of 7 us (might be different, i was using low sample rate on analyser).
By changing number of periods, the current output changes.
Do you have any idea, how to count PWM cycles and if it reaches, let say 200, stop PWM and then start it again when next 1,25 ms cycle should start?
thank You very much for Your help.
Teensy 3.2
the name of thread might be wrong, but i dont know, how to name it better
First of all, what i want to do:
i need to feed 4-20mA module extracted from energy manager RMS621 with squarevawe signal. It is a tiny pcb soldered on main pcb which is powered +-12V and galvanicaly isolated from Altera Cyclone chip by optocoupler. By looking at the logic analyser i found out that the Cyclone feeds the module every 1,25ms with squarevawe signal with period of 7 us (might be different, i was using low sample rate on analyser).
By changing number of periods, the current output changes.
Do you have any idea, how to count PWM cycles and if it reaches, let say 200, stop PWM and then start it again when next 1,25 ms cycle should start?
thank You very much for Your help.
Teensy 3.2