Skip to main content
Post Closed as "Needs more focus" by Kwasmich, Glorfindel, MatsK, MichaelT, Juraj
deleted 18 characters in body
Source Link
Mikael Patel
  • 8k
  • 2
  • 16
  • 21

I am new to using an Arduino and I am trying to program my it to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a working program in c++ but I need to convert it to assembly. I have an Arduino UNO ATmega 328p

Here is my c++ program:

 const int led = 13;
 
 const int led2 = 12;

  void setup()

  {
 
    pinMode(led, OUTPUT);
 
    pinMode(led2, OUTPUT);

 
 }

 void loop() {
 
   digitalWrite(led, HIGH);    
 
   delay(1000);       
 
   digitalWrite(led, LOW);    

{

   digitalWrite(led2, HIGH);
 
   delay(1000);
 
   digitalWrite(led2, LOW);}

 }

I am new to using an Arduino and I am trying to program my it to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a working program in c++ but I need to convert it to assembly. I have an Arduino UNO ATmega 328p

Here is my c++ program:

 int led = 13;
 
 int led2 = 12;

  void setup()

  {
 
pinMode(led, OUTPUT);
 
pinMode(led2, OUTPUT);

 
}

void loop() {
 
digitalWrite(led, HIGH);    
 
delay(1000);       
 
digitalWrite(led, LOW);    

{

digitalWrite(led2, HIGH);
 
delay(1000);
 
digitalWrite(led2, LOW);}

}

I am new to using an Arduino and I am trying to program my it to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a working program in c++ but I need to convert it to assembly. I have an Arduino UNO ATmega 328p

Here is my c++ program:

 const int led = 13;
 const int led2 = 12;

 void setup() {
    pinMode(led, OUTPUT);
    pinMode(led2, OUTPUT);
 }

 void loop() {
   digitalWrite(led, HIGH);    
   delay(1000);       
   digitalWrite(led, LOW);    
   digitalWrite(led2, HIGH);
   delay(1000);
   digitalWrite(led2, LOW);
 }
Source Link

I need help programming my arduino in assembly

I am new to using an Arduino and I am trying to program my it to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. The program needs to be done in assembly. I have a working program in c++ but I need to convert it to assembly. I have an Arduino UNO ATmega 328p

Here is my c++ program:

 int led = 13;

 int led2 = 12;

  void setup()

 {

pinMode(led, OUTPUT);

pinMode(led2, OUTPUT);


}

void loop() {

digitalWrite(led, HIGH);    

delay(1000);       

digitalWrite(led, LOW);    

{

digitalWrite(led2, HIGH);

delay(1000);

digitalWrite(led2, LOW);}

}