Skip to main content
Filter by
Sorted by
Tagged with
4 votes
2 answers
131 views

I have a weird problem when doing inline asm and compiling/linking with avr-g++ (version 16, fresh from the Git). I think this might be a bug of the tool chain, but I wanted second opinions in case I ...
krab5's user avatar
  • 105
0 votes
1 answer
44 views

My implementation of an API function doing a simple SPI transfer, offering a void *intfPtr parameter to pass a "device descriptor" which I am using to pass the I/O port and pin for SPI chip ...
Torsten Römer's user avatar
0 votes
1 answer
101 views

When programming for an AVR compatible micro controller, such as the Atmega328p, you're facing an error after successfully building and uploading a first time, but all subsequent times result in an ...
Alessandro Nardinelli's user avatar
0 votes
0 answers
60 views

The YL-69 sensor(for soil moisture using a comparator circuit LM-393) is functional. When tested with C code on the Arduino IDE, it prints the correct values on the serial monitor. However, when ...
Cecilia Brito's user avatar
0 votes
1 answer
70 views

#define __SFR_OFFSET 0 #include <avr/io.h> .global main main: ldi R16, 0xFD ; Set PD1–PD6 as outputs, PD0 as input out DDRD, R16 ldi R16, 0x01 ; Enable pull-up resistor on ...
Lerato Shiburi's user avatar
-1 votes
1 answer
49 views

.include "m8def.inc" .org 0x0000 rjmp RESET .org 0x0020 rjmp TIMER0_OVF_ISR RESET: ldi r16, low(RAMEND) out SPL, r16 ldi r16, high(RAMEND) out SPH, r16 ldi ...
11a4-Hạo Khiêm Trần's user avatar
1 vote
1 answer
110 views

I'm just wondering if there is a way I can tell the compiler that I want to create a static array inside the .data section of the Arduino's SRAM, where the array's size is calculated using the size of ...
Logan Seeley's user avatar
0 votes
2 answers
172 views

I'm making a library for Arduino Uno in Rust from scratch. Currently, there's a basic Serial.write print example in the src/main.rs, which on compilation is around 500 bytes (cargo b --release). $ avr-...
zombiesauce's user avatar
1 vote
2 answers
109 views

I am experiencing somewhat a peculiar phenomenon. I am trying to get an ATtiny24A into sleep mode. I had a working code before, but through revisions and testing of other parts of my program it seems ...
Charles Florestal's user avatar
4 votes
1 answer
77 views

On the avr-gcc website (https://gcc.gnu.org/wiki/avr-gcc#Frame_Layout) it says that the frame pointer (Y register) is off by one byte so Y+1 points to the bottom of the frame. However when I compiled ...
golden bananas's user avatar
3 votes
2 answers
118 views

AVR has both ADC (Add with Carry) and ROL (Rotate Left through Carry) instructions. However, it seems to me like ROL is not needed at all, and ADC r, r fulfills the same purpose. As far as I can tell, ...
NyxCode's user avatar
  • 798
3 votes
1 answer
96 views

The following code doesn't work in ATmega4809: #include <avr/io.h> #include <util/delay.h> void f(const char str[]) { if (str[0] == 'a'){ // <-- here is the problem!!! The program ...
Antonio's user avatar
  • 651
1 vote
1 answer
315 views

I'm trying to program an ATmega328P Arduino Uno "bare metal" to print to serial over the USB connection to my computer, however I only see replacement characters (�) being printed, both when ...
Troglobyte's user avatar
1 vote
1 answer
287 views

I have an ATtiny1626 code that I'm in the early stages of just getting the modules going on my custom board for my client. I had some issues with my interrupts being called indefinitely over and over. ...
MSSJCODER's user avatar
4 votes
2 answers
195 views

I'm trying to build a table of "missing" AVR instructions by device. For want of any available documentation, I've been comparing the source-code of avra, gavrasm and avrlass and I don't ...
Andy Preston's user avatar
0 votes
1 answer
111 views

I am trying to learn SPI on an Arduino Uno (ATmega 328 MCU). I'm working in the Arduino IDE however I am programming in actual C, not the Arduino library. I have setup SPI functions from looking at ...
Chandler Thornton's user avatar
-1 votes
1 answer
187 views

I'm writing an emulator for the ATMEGA328P, and after looking through the datasheet I could not find the specific address at which the PC is located, a ton of information is mentioned on other ...
Mrmudkip's user avatar
  • 111
2 votes
2 answers
140 views

I am programing for ATtiny13 and I have to do a lot of saturating additions. Trying to optimize them, it seems that avr-gcc just doesn't know how to optimize anything at all. All of this was tried ...
Kryštof Vosyka's user avatar
0 votes
1 answer
91 views

So i'm trying to change the first element of an array that i'm storing in sram and i checked if the data after compile is equal to the value of pre-initialaztion and it wasn't equal. so this my code: ....
user avatar
-1 votes
1 answer
171 views

I'm trying to replicate that earbuds functionality that consists in a multifunctional button. If you press this button x amount of times, in a period of time, the earbud will do something depending on ...
Carlos Leonel Rivas Pimentel's user avatar
0 votes
2 answers
277 views

Using Microchip Studio, I have implemented a code snippet to send a character via UART using ATmega2560 and a USB-to-TTL device. The code for sending a character is as follows: void USART0_Init(...
Muhammad Fouad Alharoon's user avatar
4 votes
2 answers
767 views

In a program, I have a lot of arrays of different length strings, and each array is declared as an array of pointers to those strings, like: static const char * num_tab[] = {"First", "...
Robert Wallner's user avatar
-1 votes
2 answers
480 views

Everyone, I am working with ATtiny85 using Arduino IDE. Recently I was learning about RTOS. I want to ask if it possible to run RTOS on ATtiny85 microcontroller? According to my knowledge it may be ...
Muaaz Ul hassan's user avatar
1 vote
2 answers
155 views

I am trying to achieve communication between an AVR128DB28 microcontroller and an SD card over SPI.I'm programming it in Microchip Studio, programming is done through an MPLAB SNAP over UPDI. The ...
n0rmi's user avatar
  • 111
0 votes
1 answer
107 views

I disassembled some C++ code with the avr-gcc compiler in godbolt and often found calls to libgcc subroutines like __udivmodhi4 or __mulhi3. Where can I find good and insightful documentation about ...
Lars Schubert's user avatar

1
2 3 4 5
48