Questions tagged [assembly]

Refer to the assembly (or assembler) language.

An assembly (or assembler) language, often abbreviated asm, is a low-level programming language for a computer, or other programmable device, in which there is a very strong (generally one-to-one) correspondence between the language and the architecture's machine code instructions.

47 questions
11
votes
10 answers

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 operating in the 1st quadrant (0 to 90 deg),…
3
votes
1 answer

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 to access one of those structs. This is what I am…
user8006
3
votes
1 answer

Arduino Uno R3 assembly code to push a button and turn on a LED

I've been trying this for days without success... I need to turn on a LED on portb when a button in portd is pushed. Cabling works, I've tested it with Arduino IDE and it works like a charm. This is what I got so far: .global main .equ LED, PB5 .equ…
mcflurry
  • 41
  • 4
2
votes
1 answer

Loading code to a mega 2560

As part of my application, I need to be able to update the code on my mega 2560 in the field with a download from the internet. I have found this code in the AT Mega 2560 data sheet ;-the routine writes one page of data from RAM to Flash ; the…
Thom
  • 173
  • 1
  • 8
2
votes
1 answer

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 off and another LED(LED2) goes on for t seconds…
user58745
  • 47
  • 1
  • 4
2
votes
0 answers

Low Level programming - MKR Fox1200

I'm working on a project using this board and wish to do so on a low level ,as in enabling certain registers to enable interrupts etc. I can't seem to find the correct header files to support programming in this manner (Can't recognise the register…
Patrick
  • 21
  • 1
2
votes
1 answer

Trying to run Timer1 in ATmega2560 with assembly

I have a slight problem with Timer1 in arduino (ATmega2560) while coding it in assembly. I try to run the Timer1 in CTC mode - I configure everything well in my opinion, but the TCNT1 just doesn't increment each clock cycle, as it should. I checked…
skorejen
  • 123
  • 3
2
votes
2 answers

How get assembler/preprocessed code for library

I am using https://github.com/sudar/Arduino-Makefile project with https://github.com/ladislas/Bare-Arduino-Project to compile my Arduino projects from Linux command line. I put as much as possible functionality to libraries for reuse (and use the…
gilhad
  • 1,466
  • 2
  • 11
  • 20
2
votes
1 answer

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?
Dan
  • 23
  • 3
2
votes
7 answers

Building an AtMega328p from Transistors

I'm a little new to circuitry, and the Arduino in itself! From what I know, I think that it might be possible to actually build one (the processor itself, of course) from transistors. This isn't a practical question, of course, but it would be an…
Dimitry M
  • 31
  • 1
  • 4
2
votes
2 answers

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 that port and all outputs will update…
Marla
  • 600
  • 1
  • 4
  • 11
2
votes
3 answers

Programing in Assembly for the Digispark

I've been given a digispark and am looking to write straight assembly code for it. Anyone know how to get started with this? I've been successful in getting the Arduino IDE set-up but would really like to avoid writing assembly in-line...
2
votes
1 answer

Interleave Assembly and Source for avr-objdump

Trying to get avr-objdump to generate a listing that interleaves the assembly with the source code. I've tried a bunch of debugging arguments in different configurations but I can't seem to get it. The best I could do was getting it to interleave…
Ashlyn Black
  • 339
  • 1
  • 9
2
votes
1 answer

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 arduino uno r3 ATmega328 Thank you. "delay_ms%=: …
user3669884
1
vote
1 answer

Blinking a led using assembly language at different frequencies using two push buttons

I want to blink a led using assembly language and arduino I want the circuit to have a normal state of 5 hz blinking frequency Then use two push buttons to increase or decrease the blinking frequency The up button will increment the blinking…
1
2 3 4