Add calculation for pin high/low time in high-voltage-booster #2

Closed
opened 2019-02-28 17:59:33 +01:00 by Ruakij · 1 comment
Ruakij commented 2019-02-28 17:59:33 +01:00 (Migrated from gitea.railduction.eu)

Calculate the next tick for the high-voltage-booster based on the defined tick time interval and a PWM frequency to boost in.

Calculate the next tick for the high-voltage-booster based on the defined tick time interval and a PWM frequency to boost in.
Ruakij commented 2019-03-05 13:21:51 +01:00 (Migrated from gitea.railduction.eu)

Added calculation for high/low-time:

boost_highVoltage_nextTick = clock() + F_CPU * 1/(boost_frequency/2)



The nextTick should then be half of the period-time of the given frequency



1/frequency gives period-time

Added calculation for high/low-time:<br> <code>boost_highVoltage_nextTick = clock() + F_CPU * 1/(boost_frequency/2)</code><br> <br> The nextTick should then be half of the period-time of the given frequency<br> <br> 1/frequency gives period-time
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Ruakij/Geigercounter#2
No description provided.