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

CM5 turn LED on ??

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

CM5 turn LED on ??

Post by ben2008 » Mon Dec 07, 2009 10:30 pm

Post by ben2008
Mon Dec 07, 2009 10:30 pm

Hi and sorry,
this question is very common i guess, but i did not find an answer in at least 2h.

how can i turn an LED on the CM5 (atmega128) on?

I already programmed a lot with AVR and C and get my robo to do funny things ... i also got an time interrupt .. but ... i dont get that leds to blink ...

i tried something like this

Code: Select all
DDRE = 0;              //set port E to input direction
PORTE |= _BV(PE4);    //enable pull-up resistor 4
EIMSK |= _BV(INT4);   //enable interrupt 4

PORTD = PIND ^ ( 1 << PD7 );
   
PORTC &= ~_BV(PC3);  //turns AUX-LED on
PORTC &= ~_BV(PC4);  //turns AUX-LED on
PORTC &= ~_BV(PC5);  //turns AUX-LED on
PORTC &= ~_BV(PC6);  //turns AUX-LED on


I dont know exactly what i am doing by editing PORTC oder DDRE but i only want to get that led on (any led on the cm5)
Hi and sorry,
this question is very common i guess, but i did not find an answer in at least 2h.

how can i turn an LED on the CM5 (atmega128) on?

I already programmed a lot with AVR and C and get my robo to do funny things ... i also got an time interrupt .. but ... i dont get that leds to blink ...

i tried something like this

Code: Select all
DDRE = 0;              //set port E to input direction
PORTE |= _BV(PE4);    //enable pull-up resistor 4
EIMSK |= _BV(INT4);   //enable interrupt 4

PORTD = PIND ^ ( 1 << PD7 );
   
PORTC &= ~_BV(PC3);  //turns AUX-LED on
PORTC &= ~_BV(PC4);  //turns AUX-LED on
PORTC &= ~_BV(PC5);  //turns AUX-LED on
PORTC &= ~_BV(PC6);  //turns AUX-LED on


I dont know exactly what i am doing by editing PORTC oder DDRE but i only want to get that led on (any led on the cm5)
ben2008
Newbie
Newbie
Posts: 1
Joined: Mon Dec 07, 2009 10:24 pm

1 postPage 1 of 1
1 postPage 1 of 1