by boenklon2 » Tue May 31, 2011 6:33 am
by boenklon2
Tue May 31, 2011 6:33 am
hi im a student from indonesia
i have a really really weird problem with my dynamixel. i want to control dynamixel AX-12 with Atmega162
i use Codevision AVR
peripheral that i use is
1. Atmega 162 with crystal 16 MHz and 2 usart (usart0 and usart1*but i just use usart0))
2. Dynamixel AX-12
i make a really-really simple program to make sure the every byte sent succefully. i just want to make the dynamixel move.
this is the setting that i used.
1. i use atmega162 usart0 with baudrate 57600
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: On
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 57600
UCSR0A=0x00;
UCSR0B=0x18;
UCSR0C=0x86;
UBRR0H=0x00;
UBRR0L=0x10;
2. dynamixel with id 1 and baudrate 57600 (i change this via controller CM-5)
then the sample code i made form codevision AVR
i put this before while(1)
i made this porogram really easy because i tried another code but never work:(:( and i just want to make sure the data being sent correctly
---sample code----- i put this before while(1) that generated by codevision AVR to prevent looping------
putchar(0xFF); // header
putchar(0xFF); // header
putchar(0x01); // ID
putchar(0x05); // length
putchar(0x03); // write instruction
putchar(0x1E); // goal position
putchar(0x52); // position that i want
putchar(0x02); // to give to dynamixel
putchar(0x84); // check sum
i simulate in isis proteus, check with virtual terminal (simulation) *byte correct* and already check (and make sure) my instruction with terminal CV AVR that connect to atmega 162 sent correctly(real life) *sent byte correct*.(i check it with Tx pin connect to USB Programmer then i connect USB Programmer to PC)
but why when i sent this instruction code to dynamixel it doesnt move the servo??please guys help me i got stuck over 4 days. i tried everything (many methods) but never work.dynamixel never respond my instruction.but when i used cm-5 it work.
is it ok if i connect Atmega 162 Tx pin to Data pin Dynamixel??
i already used the schematic that provided in AX-12 datasheet which used 74HC126 and 74HC04 but it never work.
i already make variation with the baudrate (19200,38400,5670,112500 )but it never work
i already make buffer in Tx and Rx interrupt but it never work
i already change the hexa in putchar to decimal, ex putchar(255);putchar(1); but it never work
i have already read the atmega8535 with dynamixel, even he just sent the packet like me and he can control it why i cant control it:(:(
please i really really need ur help guys.
hi im a student from indonesia
i have a really really weird problem with my dynamixel. i want to control dynamixel AX-12 with Atmega162
i use Codevision AVR
peripheral that i use is
1. Atmega 162 with crystal 16 MHz and 2 usart (usart0 and usart1*but i just use usart0))
2. Dynamixel AX-12
i make a really-really simple program to make sure the every byte sent succefully. i just want to make the dynamixel move.
this is the setting that i used.
1. i use atmega162 usart0 with baudrate 57600
// USART0 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART0 Receiver: On
// USART0 Transmitter: On
// USART0 Mode: Asynchronous
// USART0 Baud Rate: 57600
UCSR0A=0x00;
UCSR0B=0x18;
UCSR0C=0x86;
UBRR0H=0x00;
UBRR0L=0x10;
2. dynamixel with id 1 and baudrate 57600 (i change this via controller CM-5)
then the sample code i made form codevision AVR
i put this before while(1)
i made this porogram really easy because i tried another code but never work:(:( and i just want to make sure the data being sent correctly
---sample code----- i put this before while(1) that generated by codevision AVR to prevent looping------
putchar(0xFF); // header
putchar(0xFF); // header
putchar(0x01); // ID
putchar(0x05); // length
putchar(0x03); // write instruction
putchar(0x1E); // goal position
putchar(0x52); // position that i want
putchar(0x02); // to give to dynamixel
putchar(0x84); // check sum
i simulate in isis proteus, check with virtual terminal (simulation) *byte correct* and already check (and make sure) my instruction with terminal CV AVR that connect to atmega 162 sent correctly(real life) *sent byte correct*.(i check it with Tx pin connect to USB Programmer then i connect USB Programmer to PC)
but why when i sent this instruction code to dynamixel it doesnt move the servo??please guys help me i got stuck over 4 days. i tried everything (many methods) but never work.dynamixel never respond my instruction.but when i used cm-5 it work.
is it ok if i connect Atmega 162 Tx pin to Data pin Dynamixel??
i already used the schematic that provided in AX-12 datasheet which used 74HC126 and 74HC04 but it never work.
i already make variation with the baudrate (19200,38400,5670,112500 )but it never work
i already make buffer in Tx and Rx interrupt but it never work
i already change the hexa in putchar to decimal, ex putchar(255);putchar(1); but it never work
i have already read the atmega8535 with dynamixel, even he just sent the packet like me and he can control it why i cant control it:(:(
please i really really need ur help guys.