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

Programming using PIC18F452

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

Programming using PIC18F452

Post by Starlight » Thu Feb 05, 2009 2:19 am

Post by Starlight
Thu Feb 05, 2009 2:19 am

Hi. Currently I'm using the PIC18F452 as my controller without using the CM5. From the user's manual, the example.c are written using Atmega128. So does anyone have the sample program of c using PIC18F452 ? Thanks .
Hi. Currently I'm using the PIC18F452 as my controller without using the CM5. From the user's manual, the example.c are written using Atmega128. So does anyone have the sample program of c using PIC18F452 ? Thanks .
Starlight
Robot Builder
Robot Builder
Posts: 21
Joined: Wed Oct 08, 2008 2:52 am

Post by i-Bot » Thu Feb 05, 2009 2:09 pm

Post by i-Bot
Thu Feb 05, 2009 2:09 pm

I would suggest you are far better using the ATMega128 instead of the PIC18F452. Entry cost for using ATMega is low for boards, C compiler, debug, etc. Plus you now have the library from RandomMatt too.

If you must use the PIC, then first work on the Serial port routines as these are greatest challenge to get working especially at 1M. After that, just use the ATMega C code as example.
I would suggest you are far better using the ATMega128 instead of the PIC18F452. Entry cost for using ATMega is low for boards, C compiler, debug, etc. Plus you now have the library from RandomMatt too.

If you must use the PIC, then first work on the Serial port routines as these are greatest challenge to get working especially at 1M. After that, just use the ATMega C code as example.
i-Bot
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1142
Joined: Wed May 17, 2006 1:00 am

HELP in ID and baud rate setup !!!

Post by Starlight » Tue Feb 10, 2009 8:06 am

Post by Starlight
Tue Feb 10, 2009 8:06 am

Hi. Thanks for i-Bot's advise. btw, the circuit with PIC18F452 have been done, and I didn't have time to rework the circuit using ATMega128. Now my problem is how can I setup the ID of AX-12 and set the baud rate of AX-12 (default is 1Mbps) to 500Kbps ? any sample of C language or assembly to work on ? I'm using the MPLAB IDE for programming. Thanks. I'm really appreciate for someone who can help me on these problem.
Hi. Thanks for i-Bot's advise. btw, the circuit with PIC18F452 have been done, and I didn't have time to rework the circuit using ATMega128. Now my problem is how can I setup the ID of AX-12 and set the baud rate of AX-12 (default is 1Mbps) to 500Kbps ? any sample of C language or assembly to work on ? I'm using the MPLAB IDE for programming. Thanks. I'm really appreciate for someone who can help me on these problem.
Starlight
Robot Builder
Robot Builder
Posts: 21
Joined: Wed Oct 08, 2008 2:52 am

Re: HELP in ID and baud rate setup !!!

Post by StuartL » Wed Feb 11, 2009 11:48 am

Post by StuartL
Wed Feb 11, 2009 11:48 am

Starlight wrote:Hi. Thanks for i-Bot's advise. btw, the circuit with PIC18F452 have been done, and I didn't have time to rework the circuit using ATMega128. Now my problem is how can I setup the ID of AX-12 and set the baud rate of AX-12 (default is 1Mbps) to 500Kbps ? any sample of C language or assembly to work on ? I'm using the MPLAB IDE for programming. Thanks. I'm really appreciate for someone who can help me on these problem.


The AX-12 pdf file has many examples of the packets, including how to set the baud rate to 500kbps. You'll have to figure out how to drive the PIC serial port in half duplex mode (tristate on receive, drive on TX) at the right speed but as soon as you've achieved that all should be well.
Starlight wrote:Hi. Thanks for i-Bot's advise. btw, the circuit with PIC18F452 have been done, and I didn't have time to rework the circuit using ATMega128. Now my problem is how can I setup the ID of AX-12 and set the baud rate of AX-12 (default is 1Mbps) to 500Kbps ? any sample of C language or assembly to work on ? I'm using the MPLAB IDE for programming. Thanks. I'm really appreciate for someone who can help me on these problem.


The AX-12 pdf file has many examples of the packets, including how to set the baud rate to 500kbps. You'll have to figure out how to drive the PIC serial port in half duplex mode (tristate on receive, drive on TX) at the right speed but as soon as you've achieved that all should be well.
StuartL
Savvy Roboteer
Savvy Roboteer
Posts: 350
Joined: Mon Jun 04, 2007 3:46 pm
Location: Thatcham, Berkshire, UK


4 postsPage 1 of 1
4 postsPage 1 of 1