# servo_rc_slave

RC Servo Slave

Author | Matthew Schinkel - borntechi.com, copyright © 2009, all rights reserved.
Adapted-by |
Compiler | >=2.4m

Description

    This library allows your PIC to read pulses given by a RC
                 receiver. Connect your PIC to a rc receiver the same way you
                 would connect a RC servo. This library will output a value
                 dependant on where your fingers are moving the controls
                 on your remote transmitter. PIC will read the pulse width
                 at the receiver.

Sources

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

Dependencies

No dependency found

## Summary

### Global variables/contants

- `const _SERVO_SLAVE_NUM_OF_INPUTS = SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_0 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_1 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_2 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_3`
- `var byte _servo_slave_off_count[_SERVO_SLAVE_NUM_OF_INPUTS]; = 0`
- `var byte servo_slave_is_valid[_SERVO_SLAVE_NUM_OF_INPUTS]; = TRUE`

### Procedures

- `servo_slave_timer_isr()`
- `servo_slave_init()`

### Functions

- `servo_slave'get(byte in input_num) return byte`

## API details

### Global variables/contants

- `const _SERVO_SLAVE_NUM_OF_INPUTS = SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_0 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_1 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_2 + SERVO_SLAVE_USE_INT_ON_CHANGE_PIN_3`

  No documentation found

- `var byte _servo_slave_off_count[_SERVO_SLAVE_NUM_OF_INPUTS]; = 0`

  No documentation found

- `var byte servo_slave_is_valid[_SERVO_SLAVE_NUM_OF_INPUTS]; = TRUE`

      some vars

### Procedures

- `servo_slave_timer_isr()`

      interrupt to detect if no pulse is available.

- `servo_slave_init()`

      Initialize the servo

### Functions

- `servo_slave'get(byte in input_num) return byte`

      Outputs the value of the rc pulse input

## Related samples

Here are the list of samples which use this library:

16f877 | 16f877_servo_rc_slave.jal
16f877a | 16f877a_servo_rc_slave.jal
18f452 | 18f452_servo_rc_slave.jal
18f4525 | 18f4525_servo_rc_slave.jal
18f4550 | 18f4550_servo_rc_slave.jal
18f4620 | 18f4620_servo_rc_slave.jal