Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

Newbie Question: Controlling AX-12 using PIC18F452

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
2 postsPage 1 of 1
2 postsPage 1 of 1

Newbie Question: Controlling AX-12 using PIC18F452

Post by Starlight » Wed Oct 08, 2008 3:05 am

Post by Starlight
Wed Oct 08, 2008 3:05 am

Hi all. Currently I doing a quadruped robot using 12 number of AX-12 (3DOF). I'm not using the CM-5 and I wanna connect my AX-12 directly to PIC18F452. So how can I connect AX-12 to PIC18F and the recommended circuit will be like ? Thanks.

regards
Hi all. Currently I doing a quadruped robot using 12 number of AX-12 (3DOF). I'm not using the CM-5 and I wanna connect my AX-12 directly to PIC18F452. So how can I connect AX-12 to PIC18F and the recommended circuit will be like ? Thanks.

regards
Starlight
Robot Builder
Robot Builder
Posts: 21
Joined: Wed Oct 08, 2008 2:52 am

Post by StuartL » Thu Oct 09, 2008 7:59 am

Post by StuartL
Thu Oct 09, 2008 7:59 am

The circuit diagram for the CM-5 should give you some ideas. In short you need to be able to tri-state the TX pin so that you can receive data on the RX pin. The CM-5 itself uses a tri-state buffer to isolate it from the bus but this isn't necessary at all for AVRs as you can tri-state in hardware. I'm pretty sure you can do the same in the PIC.

I am wondering, though, if the PIC can do 1Mbit serial data natively. From memory they tend to run 20Mhz clocks with the CPU clock being clk/4. This would mean an internal clock of 5MHz. If this clock is the source for the serial port I wouldn't expect it to do 1Mbit very reliably.

If you can tri-state in hardware then you just need to make sure your PIC is 5v logic, connect the TX pin to RX pin and make SURE that the TX is never an output when you're reading data. It's probably also worth putting a low value resistor in series with the bus to avoid shorting out the PIC if something else is transmitting at the same time.
The circuit diagram for the CM-5 should give you some ideas. In short you need to be able to tri-state the TX pin so that you can receive data on the RX pin. The CM-5 itself uses a tri-state buffer to isolate it from the bus but this isn't necessary at all for AVRs as you can tri-state in hardware. I'm pretty sure you can do the same in the PIC.

I am wondering, though, if the PIC can do 1Mbit serial data natively. From memory they tend to run 20Mhz clocks with the CPU clock being clk/4. This would mean an internal clock of 5MHz. If this clock is the source for the serial port I wouldn't expect it to do 1Mbit very reliably.

If you can tri-state in hardware then you just need to make sure your PIC is 5v logic, connect the TX pin to RX pin and make SURE that the TX is never an output when you're reading data. It's probably also worth putting a low value resistor in series with the bus to avoid shorting out the PIC if something else is transmitting at the same time.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK


2 postsPage 1 of 1
2 postsPage 1 of 1