# servo_rc_master

servo control library

Author | Matthew Schinkel, copyright © 2009..2019, all rights reserved.
Adapted-by | Rob Jansen
Compiler | 2.5r3

Description

    This library controls up to 24 servos that are the type used in
                 radio control (RC). This is the main servo library.

Sources

    http://www.horrorseek.com/home/halloween/wolfstone/Motors/svoint_RCServos.html

Dependencies

No dependency found

## Summary

### Global variables/contants

- `var bit servo_1_on at servo_1_to_8_on : 0`
- `var bit servo_2_reverse at servo_reverse : 1`
- `var bit servo_5_reverse at servo_reverse : 4`
- `var bit servo_7_on at servo_1_to_8_on : 6`
- `var bit servo_2_on at servo_1_to_8_on : 1`
- `var bit servo_8_on at servo_1_to_8_on : 7`
- `var bit servo_8_reverse at servo_reverse : 7`
- `var bit servo_4_on at servo_1_to_8_on : 3`
- `var byte _servo_1_to_8_number_count = 0`
- `var bit servo_7_reverse at servo_reverse : 6`
- `var bit _servo_1_to_8_isr_count = 0`
- `var byte servo_1_to_8_on = 0xFF`
- `var bit _servo_clock`
- `var byte servo_reverse = 0x00`
- `var bit servo_6_on at servo_1_to_8_on : 5`
- `var bit servo_6_reverse at servo_reverse : 5`
- `var bit servo_5_on at servo_1_to_8_on : 4`
- `var bit servo_3_reverse at servo_reverse : 2`
- `var bit servo_4_reverse at servo_reverse : 3`
- `var bit servo_1_reverse at servo_reverse : 0`
- `var bit servo_3_on at servo_1_to_8_on : 2`

### Procedures

- `servo_move_percent(byte in percent, byte in servo_number)`
- `servo_move(byte in location, byte in servo_number)`
- `servo_init()`

Private

- `_servo_1_to_8_set_level(byte in servo_1_to_8_num, bit in level)`
- `_servo_isr()`

### Functions

## API details

### Global variables/contants

- `var bit servo_1_on at servo_1_to_8_on : 0`

  No documentation found

- `var bit servo_2_reverse at servo_reverse : 1`

  No documentation found

- `var bit servo_5_reverse at servo_reverse : 4`

  No documentation found

- `var bit servo_7_on at servo_1_to_8_on : 6`

  No documentation found

- `var bit servo_2_on at servo_1_to_8_on : 1`

  No documentation found

- `var bit servo_8_on at servo_1_to_8_on : 7`

  No documentation found

- `var bit servo_8_reverse at servo_reverse : 7`

  No documentation found

- `var bit servo_4_on at servo_1_to_8_on : 3`

  No documentation found

- `var byte _servo_1_to_8_number_count = 0`

      ISR servo control count 0 to 7

- `var bit servo_7_reverse at servo_reverse : 6`

  No documentation found

- `var bit _servo_1_to_8_isr_count = 0`

      ISR step count (0 - servo pulse / 1 - idle state)

- `var byte servo_1_to_8_on = 0xFF`

      use these variables to turn servo's on or off

- `var bit _servo_clock`

      clock selection bit needed for different timer types

- `var byte servo_reverse = 0x00`

      use these bit variables to reverse servo direction

- `var bit servo_6_on at servo_1_to_8_on : 5`

  No documentation found

- `var bit servo_6_reverse at servo_reverse : 5`

  No documentation found

- `var bit servo_5_on at servo_1_to_8_on : 4`

  No documentation found

- `var bit servo_3_reverse at servo_reverse : 2`

  No documentation found

- `var bit servo_4_reverse at servo_reverse : 3`

  No documentation found

- `var bit servo_1_reverse at servo_reverse : 0`

  No documentation found

- `var bit servo_3_on at servo_1_to_8_on : 2`

  No documentation found

### Procedures

- `servo_move_percent(byte in percent, byte in servo_number)`

      Move the servo using a percentage value 0 to 100

- `servo_move(byte in location, byte in servo_number)`

      Move a servo to any location from 0 to 255

- `servo_init()`

      Initialize  the servo

Private

- `_servo_1_to_8_set_level(byte in servo_1_to_8_num, bit in level)`

      Sets servo level high or low. Servo numbers 0 to 7
      only set level if servo_1_to_8_x_on = true

- `_servo_isr()`

  No documentation found

### Functions

## Related samples

Here are the list of samples which use this library:

16f877a | 16f877a_servo_rc_master.jal
16f877a | 16f877a_servo_rc_master_dedicated_slave_i2c.jal
18f452 | 18f452_servo_rc_master_dedicated_slave_i2c.jal
18f452 | 18f452_servo_rc_master.jal
18f4620 | 18f4620_servo_rc_master.jal
18f4620 | 18f4620_servo_rc_master_dedicated_slave_i2c.jal