python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Why the status flags in AVR are on after one's-complementing a zeroed register?
I have a code in assembly and I have to find out why the status flags are on
One of the codes is
LDI R16, 0
COM R16
the result was 0xFF
But I don’t understand why the S and C flags were on.
m A
Votes: 0
Answers: 1
Compiler optimizations disabled. Functions from <util/delay.h> won't work as designed
I am working on Firebird 5 module. That has Atmega2560, I am trying to compile this code and getting this warning.
(base) pawansrinivas@Pawans-MacBook-Air Experiment-3 % mkdir -p build
(base) pawansri...
Shruthi Balaji
Votes: 0
Answers: 2
i'm getting a (expected unqualified-id before "." token, in my arduino IDE just for typing ".global". here's the assembly code
#define __SFR_OFFSET 0x00
#include "avr/io.h"
.global START
.global BTN_LED
START:
SBI DDRB, 2
SBI DDRB, 3
SBI DDRB, 4
CBI DDRD, 2
CBI DDRD, 3
CBI DDRD, 4
RET
BTN_LED:
SBIC PIND, 2
RJMP R...
Lyan Zepar
Votes: 0
Answers: 0
avr-gcc undefined reference to function in linked object file
I have some code for handling all uart related functions and operations in a .h/.c pair that I usually include in my project. I have a makefile that compiles all of my .c files into .o files then link...
anon
Votes: 0
Answers: 1