Comments by Katlv Z.

  • Advanced hobby servo control using only a timer and interrupts

    Advanced hobby servo control using only a timer and interrupts

    - 9 December 2013

    Thanks Jan. Yes, no point to let the MCU sitting around
    -Katlv

  • Advanced hobby servo control using only a timer and interrupts

    Advanced hobby servo control using only a timer and interrupts

    - 5 December 2013

    Thanks for the reply Jan.

    Apologies for my bad English. Guess I was listening too much Japanese Songs XD. Yes, all the servo control pulses are done in an interrupt loop. So consider that a typical servo control pulse is in range from 0.5ms to 2.5ms. So the longest interrupt loop for controlling those servos is about 2.5ms. But u can reduce the idle time by at least 0.5ms becuase the only thing the MCU doing is set some pins high at the stating 0.5ms period. Therefore, what i did in my code is:
    a) Start a new 20ms period, do the sorting and set all the needed pins.
    b) put the minimal value into a Timer Counter waiting for the overflow and leave the interrupt.
    c) Once the minimal pulse reach to its end, come back to the interrupt and start to reset everybody

    Hope that helps. And thx again for your tutorial!

  • Advanced hobby servo control using only a timer and interrupts

    Advanced hobby servo control using only a timer and interrupts

    - 4 December 2013

    Very nice tutorial! Thank you so much!!

    Just one thought that you probably already implemented in your product. Since you have sorted all your pulse and know the minimal required time, u can release that time period to do other things. So here is how i implement it. 1) sort the pulse time. 2) write that minimum pulse (minus) some of that to variable. 3) put that variable into a Timer for overflow interrupt....

New Products

Breakout for JST SH-Style Connector, 3-Pin Male Side-Entry (2-Pack)
DRV8263H Single Brushed DC Motor Driver Carrier
TPS2116 Power Multiplexer Carrier with USB Type-C Connector (non-USB priority)
APM81815 Step-Down Voltage Regulator Carrier, 12V Out
Pololu Basic 2-Channel SPDT Relay Carrier with 12VDC Relays, Terminal Blocks, and JST SH-Style Top-Entry Connector
ACS37041KLHBLT-010B3 Current Sensor Compact Carrier -10A to +10A, 3.3V
JST SH-Style Cable, 4-Pin, Female-Female, 63cm
ACS37042KLHBLT-030B3 Current Sensor Compact Carrier -30A to +30A, 3.3V
12V Step-Up Voltage Regulator U3V9F12
ACS37800KMACTR-030B3-I2C Power Monitor Carrier with Secondary I²C Isolation (Soldered Terminal Block)
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors