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

Write C program to CM5, what should I learn?

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

Write C program to CM5, what should I learn?

Post by CrowXP » Thu Oct 18, 2007 1:19 pm

Post by CrowXP
Thu Oct 18, 2007 1:19 pm

Hello everyone, I was trying to write C program to control my Bioloid.But I discover that there some codes I can't understand which was in the example program.
Like:
#define CHECK_TXD0_FINISH bit_is_set(UCSR0A,6)
What does the "UCSR0A" means? I have no idea about that, so I couldn't know what does this line doing.

Or:
DDRE |= (BIT_RS485_DIRECTION0|BIT_RS485_DIRECTION1);
There are more troubles for me. Althought after reading
http://winavr.scienceprog.com/avr-gcc-t ... r-gcc.html
, I know about that was defining the PORTD's input/output. But I got more questions, why use PORTD? can I use other port? ( althought I don't know how many ports does CM5 have)

This troubled me for some weeks. Does there have any toturial for the new robot programmer like me? I want to study more informations about embedded system. But I can't find the informations about ATmega128, most of the web-sites/books are talking about 8051.
Thanks for reading my poor English. :oops:
Hello everyone, I was trying to write C program to control my Bioloid.But I discover that there some codes I can't understand which was in the example program.
Like:
#define CHECK_TXD0_FINISH bit_is_set(UCSR0A,6)
What does the "UCSR0A" means? I have no idea about that, so I couldn't know what does this line doing.

Or:
DDRE |= (BIT_RS485_DIRECTION0|BIT_RS485_DIRECTION1);
There are more troubles for me. Althought after reading
http://winavr.scienceprog.com/avr-gcc-t ... r-gcc.html
, I know about that was defining the PORTD's input/output. But I got more questions, why use PORTD? can I use other port? ( althought I don't know how many ports does CM5 have)

This troubled me for some weeks. Does there have any toturial for the new robot programmer like me? I want to study more informations about embedded system. But I can't find the informations about ATmega128, most of the web-sites/books are talking about 8051.
Thanks for reading my poor English. :oops:
CrowXP
Newbie
Newbie
Posts: 2
Joined: Thu Oct 18, 2007 12:54 pm

Post by Robo1 » Thu Oct 18, 2007 9:41 pm

Post by Robo1
Thu Oct 18, 2007 9:41 pm

Hi most of that stuff your mentioned are to set and read from the chips registers, have a look at avrfreaks.com and also the manual. Depending on what you want to learn try getting an atmega128 on a breakout board and have a play.


Bren
Hi most of that stuff your mentioned are to set and read from the chips registers, have a look at avrfreaks.com and also the manual. Depending on what you want to learn try getting an atmega128 on a breakout board and have a play.


Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by Bullit » Fri Oct 19, 2007 11:53 am

Post by Bullit
Fri Oct 19, 2007 11:53 am

This should help.
This should help.
Bullit
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 291
Joined: Wed May 31, 2006 1:00 am
Location: Near robot

Post by CrowXP » Fri Oct 26, 2007 11:22 am

Post by CrowXP
Fri Oct 26, 2007 11:22 am

Thanks for your replies. Yes, I have get the Atmega128's menual. And there are so many informations in it, but a little too more. Maybe I need to study it for some days to get the informations I needed. Thanks anyway.
Thanks for your replies. Yes, I have get the Atmega128's menual. And there are so many informations in it, but a little too more. Maybe I need to study it for some days to get the informations I needed. Thanks anyway.
CrowXP
Newbie
Newbie
Posts: 2
Joined: Thu Oct 18, 2007 12:54 pm


4 postsPage 1 of 1
4 postsPage 1 of 1