# servo_rc_master_dedicated

Library for use with a dedicated RC servo PIC

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

Description

    This library controls an external PIC that works as a slave device
    and is a dedicated PIC to servo movements.

Sources

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

Notes

    Also see servo_rc_master library, this is not the main servo library.

Dependencies

No dependency found

## Summary

### Global variables/contants

- `var bit _servo_rc_master_dedicated_error at _servo_rc_master_dedicated_data : 7`
- `var bit _servo_rc_master_dedicated_ready4 at _servo_rc_master_dedicated_data : 0`
- `var byte _servo_rc_master_dedicated_data`
- `var bit _servo_rc_master_dedicated_ready3 at _servo_rc_master_dedicated_data : 2`
- `var bit _servo_rc_master_dedicated_error2 at _servo_rc_master_dedicated_data : 5`
- `const byte SERVO_RC_COMMAND_MOVE = 0`
- `var bit _servo_rc_master_dedicated_ready2 at _servo_rc_master_dedicated_data : 4`
- `const byte SERVO_RC_COMMAND_MIN = 96`
- `const byte SERVO_RC_COMMAND_REVERSE = 32`
- `var bit _servo_rc_master_dedicated_error4 at _servo_rc_master_dedicated_data : 1`
- `const byte SERVO_RC_COMMAND_MAX = 128`
- `const byte SERVO_RC_COMMAND_ON_OFF = 64`
- `var bit _servo_rc_master_dedicated_ready at _servo_rc_master_dedicated_data : 6`
- `var bit _servo_rc_master_dedicated_error3 at _servo_rc_master_dedicated_data : 3`

### Procedures

- `servo_rc_send_command_i2c(byte in servo_ic_address, byte in command, byte in command_data, byte in servo_num)`

### Functions

- `servo_rc_error_i2c(byte in servo_ic_address) return bit`
- `servo_rc_is_ready_i2c(byte in servo_ic_address) return bit`

## API details

### Global variables/contants

- `var bit _servo_rc_master_dedicated_error at _servo_rc_master_dedicated_data : 7`

  No documentation found

- `var bit _servo_rc_master_dedicated_ready4 at _servo_rc_master_dedicated_data : 0`

  No documentation found

- `var byte _servo_rc_master_dedicated_data`

      holds error & ready bit recieved from slave, internal use only

- `var bit _servo_rc_master_dedicated_ready3 at _servo_rc_master_dedicated_data : 2`

  No documentation found

- `var bit _servo_rc_master_dedicated_error2 at _servo_rc_master_dedicated_data : 5`

  No documentation found

- `const byte SERVO_RC_COMMAND_MOVE = 0`

      servo commands that you may pass to the send_command procedure

- `var bit _servo_rc_master_dedicated_ready2 at _servo_rc_master_dedicated_data : 4`

  No documentation found

- `const byte SERVO_RC_COMMAND_MIN = 96`

      set servo min movement

- `const byte SERVO_RC_COMMAND_REVERSE = 32`

      reverse servo command

- `var bit _servo_rc_master_dedicated_error4 at _servo_rc_master_dedicated_data : 1`

  No documentation found

- `const byte SERVO_RC_COMMAND_MAX = 128`

      set servo max movement

- `const byte SERVO_RC_COMMAND_ON_OFF = 64`

      turn servo on/off

- `var bit _servo_rc_master_dedicated_ready at _servo_rc_master_dedicated_data : 6`

  No documentation found

- `var bit _servo_rc_master_dedicated_error3 at _servo_rc_master_dedicated_data : 3`

  No documentation found

### Procedures

- `servo_rc_send_command_i2c(byte in servo_ic_address, byte in command, byte in command_data, byte in servo_num)`

      send a command to the dedicated servo pic such as move, reverse, on/off
      via I2C

### Functions

- `servo_rc_error_i2c(byte in servo_ic_address) return bit`

      Check if dedicated servo pic has an error via I2C. returns true/false. For
      internal use only.

- `servo_rc_is_ready_i2c(byte in servo_ic_address) return bit`

      Check if dedicated servo pic is ready via I2C. returns true/false

## Related samples

Here are the list of samples which use this library:

16f877a | 16f877a_servo_rc_master_dedicated_master_i2c.jal
18f452 | 18f452_servo_rc_master_dedicated_master_i2c.jal
18f4620 | 18f4620_servo_rc_master_dedicated_master_i2c.jal