Questions tagged [assembly]
Refer to the assembly (or assembler) language.
47 questions
-1
votes
2
answers
109
views
Removing the L from F_CPU in assembly
I am developing a mixed c++ /asm project.
In the asm I am using F_CPU to do some busy waiting as follows. However, by default, the F_CPU is defined with a trailing L (for long). The asm is not able to ...
0
votes
2
answers
394
views
Arduino IDE. How do I use labels in a macro?
It's the Arduino Uno. I've spent hours reading on the internet but found nothing yet. If you use a label in the macro, the 2nd time it's called you get a duplicate label error.
0
votes
1
answer
681
views
Is it possible to use assembly with arduino?
I want to learn assembly, but would like to learn by doing, is it possible to learn and make something useful with arduino hardware? I dont know where or how to start something like this.
0
votes
1
answer
146
views
Parallel I/O - maybe use Machine code function call
I'm a newbie to arduino but been programming lots.
I have a project where I would like to output 4 bits to adjacent pins and read 4 bits from another (4) adjacent pins. (Imagine a matrix keyboard ...
0
votes
1
answer
331
views
LED Blink in assembly with timer1 output compare interrupt not working
I was trying to have some fun with avr-assembly on my arduino and I tried the following codes to blink my LED
first I tried the ISR approach and when It didn't work I tried the CTC mode one,
both ...
1
vote
0
answers
2k
views
How to use LCD display HD44780 with arduino without using any library
My professor wants me to implement a display to an old project prototype we had laying around on the lab.
But he wants me NOT to use LiquidCrystal.h library or any other to achieve that.
I read ...
1
vote
2
answers
833
views
Am not able to call C++ function pointers from inline assembly
Due to some curiosity, I was trying to use some assembly with my Arduino MEGA 2560.
I am not able to invoke a function from a c++ function pointer array.
When I uncomment the call function, func_a ...
0
votes
0
answers
285
views
how do i convert to assembly code (AVR assembly) from arduino
i have code in the Arduino ide for a temperature sensor that shows the temperature on three 7 segment displays, it shows the temperature to one decimal point. using an arduino uno. I am struggling to ...
2
votes
1
answer
2k
views
How do I convert this program to assembly from c++
I am trying to implement a program in assembly code for an Arduino UNO. A potentiometer is used on an ADC pin for variable time (t). LED1 flashes for t seconds, then stays on for t seconds, then goes ...
1
vote
0
answers
63
views
My alterate flashing LED program is not working
I am trying to program my Arduino UNO ATMega 328p in assembler to implement a flashing pattern with two LEDs. When one LED is off, the other must be on. I have made a program but it is showing errors ...
0
votes
2
answers
93
views
Atmega collecting and relaying interrupt calls
I like to collect all possible interrupt and relay them to an alternative handler interrupt table what the user can set.
In order to do this i have to:
1) collect all/any interrup request
2) ...
0
votes
1
answer
2k
views
Arduino button-controlled LED with AVR Assembly
I am trying to make a simple button-controlled LED, but I cannot seem to get any input from the button that would change the state of the LED. In other words, the program keeps branching to lighton, ...
1
vote
1
answer
746
views
Assembly for loop repeating 2 times when it's only suppose to do it once
I'm programming an Arduino Nano so I belive that this question should be qualified for this SE.
I am trying to dim up an LED using a for loop in AVR assembly.
My problem is that the cycle is ...
0
votes
1
answer
2k
views
How to use arduino IDE to compile .s files
Hi I'm new to arduino and im using it to learn assembly for my computer hardware 101 class, I read online that I can make the IDE accept .s files and compile them to the board but I dont know how to ...
11
votes
10
answers
22k
views
Different ways (and the fastest) to compute sines (and cosines) in Arduino
I am using an Arduino Uno board to compute the angles of my system (robotic arm). The angles are actually 10 bit values (0 to 1023) from the ADC, using the full range of the ADC. I am only going to be ...
2
votes
1
answer
632
views
Using Arduino with Assembly on MacOS
I'm trying to use an Arduino UNO board with Assembly on MacOS, but I couldn't find any documentation about it.
How can I compile and upload Assembly files to the Arduino with MacOS?
1
vote
1
answer
3k
views
How to configure 2nd Quadrature Decoder IO pins in Arduino IDE
I am working to read two quadrature encoders using a single Arduino DUE, as part of my summer vacations project. According to the following link
http://atmel.force.com/support/servlet/fileField?id=...
1
vote
1
answer
1k
views
Force compiler to execute instructions sequentially?
Is there a way to force the Arduino compiler to compile individual commands sequentially? Looking at the disassembly, lines of the assembly code for different C/Arduino commands are mixed. I was ...
1
vote
1
answer
471
views
Working on a reaction test for the Arduino Uno using an led and an lcd shield
The situation involves some Asm inline practice and a basic circuit. The program turns an LED on after a somewhat random period of time then waits until the button is pressed to report back how many ...
2
votes
2
answers
5k
views
How to update multiple outputs simultaneously
I need to update simultaneously all the outputs of a specific port.
I am familiar with using micro-processors assembly language. After initializing a port (Data Direction Register), I can write to ...
1
vote
3
answers
669
views
How fast is an Arduino?
Can an Arduino Uno calculate the time that an assembly instruction will take in nanoseconds, not microseconds? I don't want to use a PC, because the calculation will be more accurate using an Arduino, ...
1
vote
2
answers
566
views
How is AVR Assembly in Eclipse or at Linux command line done?
I'm trying to learn AVR development in C and Assembly for the Arduino Uno (Atmel 328p microprocessor) in Linux.
I've found many good guides on how to install and setup the AVR plugin for Eclipse, ...
3
votes
1
answer
5k
views
Storing in a global variable using inline assembly
What I'm trying to do is pretty basic: I have a global variable and I'm trying to store some value in it (specifically, the SP_H and SP_L values).
The variable is an array of structs and I'm trying ...
2
votes
1
answer
5k
views
How to create delays in AVR assembly language
Hi i'm new to AVR assembly language so i was trying to get delay function to create 1 ms , 100us, and 1us delays to do that i need to figure out what to replace nop's with below here (mainboard ...