Shop OBEX P1 Docs P2 Docs Learn Events
Serial Servo Controller Control Using PIC16F84 w/ Hitech C Compiler — Parallax Forums

Serial Servo Controller Control Using PIC16F84 w/ Hitech C Compiler

junjun Posts: 2
edited 2008-11-06 00:14 in Robotics
Hi there,

currently, I'm using PIC16F84 and serial servo controller to control two servo motors.

According to the manual, the number of lines between the servo controller and PIC are three for a serial connection.

Probably I will use three B ports (0~2) to make a connection. Then, what am I going to do?

I do read the manual but I don't clearly understand how I use "SC" and "!" commands through three lines.

Can anyone provide simple C codes to speed and position control?

I appreciate your help. Thanks. Jun

burger.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-10-15 04:57
    The 3 lines from the serial servo controller are +5V supply for the controller (not the servos), ground for the controller (common with the servo ground), and a +5V logic true logic serial connection at 2400 Baud. The "!SC" is the first 3 bytes of a servo controller command sent as asynchronous serial characters.

    We cannot provide you with PIC or C code. These forums are for support of Parallax products including their microcontrollers. The documentation for the serial servo controller goes into detail on the format of the servo commands and includes sample code in Parallax Stamp Basic. Microchip has support forums for PIC users and I believe Hitech has similar forums for their C compiler. You should ask there about transmitting data in serial format at 2400 Baud, 8 bits, 1 stop bit, normal (true) +5V logic levels. The Baud is jumper selectable between 2400 Baud and 38.4KBaud with the default at 2400 Baud.

    Post Edited (Mike Green) : 10/15/2008 5:03:10 AM GMT
  • junjun Posts: 2
    edited 2008-11-05 20:46
    stop bit is two.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-06 00:14
    As far as I know, the serial servo controller expects 1 stop bit. If the PIC sends two stop bits, it won't affect anything. The extra stop bit just allows extra time for the receiver to process the data just received.
Sign In or Register to comment.