avr Questions

5

Solved

I am using SIM900 GSM module connect to my AVR Microcontroller. I tested it with FT232 to see transmitting data. First Micro sends AT it will response OK AT OK AT+CMGF=1 OK AT+CMGS="+9893XXXXXX" r...
Gwendolyngweneth asked 3/2, 2014 at 8:38

5

Solved

I've heard about people using light sensors, geiger counters, and other physical sensors to generate random numbers, but I'm skeptical. Is there really a way to generate random numbers from taking ...
Anhydrite asked 2/6, 2012 at 17:58

4

Solved

Is it possible to make Google Protocol Buffers work in Arduino? I have been trying for about a week and can't make it work, and I would like to know if it's even possible.
Schoolmarm asked 13/6, 2012 at 4:4

2

Solved

I have several 2D arrays in PROGMEM. I want to store them into another array, hence having a PROGMEM array of 2d PROGMEM arrays. Then I want to read the data out. Here's what I have void myFunc() {...
Commune asked 19/6, 2016 at 3:48

1

Solved

How exactly do the V and S flags function on the ATMEGA328? The ATMEGA328 has separate sign (S), carry (C), 2's complement overflow (V) and negative (N) flags. N is the MSB (corresponding to the si...
Constituent asked 26/4, 2022 at 21:45

9

Solved

The C99 standard introduces the following datatypes. The documentation can be found here for the AVR stdint library. uint8_t means it's an 8-bit unsigned type. uint_fast8_t means it's the fastest...
Smithereens asked 28/1, 2016 at 7:15

0

Any calculations x / y (where both operands are 32bit floats) yield 0 in Rust when I compile for the AVR ISA. Specifically, I use avr_hal for interacting with the Arduino. I read unsigned integer v...
Rattlebrain asked 21/2, 2022 at 12:0

9

Solved

In an embedded systems unit that I'm taking at uni next year, we will learn that dynamic data structures are a bad thing to have in an embedded system program. But the lecture notes don't go ...
Hunch asked 12/11, 2009 at 22:40

2

When I search I found 7yr old results talking about a fork of clang instead of clang itself. Using avr-gcc I can compile and upload my code with avr-gcc a.cpp -DF_CPU=16000000 -mmcu=atmega2560 -Wal...
Doretha asked 29/12, 2020 at 2:1

2

Solved

Larger memories have higher decoding delay; why is the register file a part of the memory then? Does it only mean that the registers are "mapped" SRAM registers that are stored inside th...
Mildamilde asked 12/10, 2020 at 22:17

1

gcc fails to compile the code below, while clang compiles ok. I have no control on the macro PORTB, as it is in a 3rd party library (avr). Is it a gcc bug? How can I work around it in gcc? As a wo...
Timekeeper asked 14/1, 2019 at 1:5

4

Solved

Looking for recommendations and some reference code for encrypting byte array in C. The problem is that I have to fit into 1KByte memory along with other routines and MCU is only 8MHz. So the size ...
Eachelle asked 3/1, 2013 at 10:17

8

Solved

Can somebody suggest me any disassembler for Atmel AVR 8-bit microcontrollers? There are opensource projects for this? Thanx.
Humming asked 28/2, 2011 at 11:8

3

Solved

Is it possible to use an AVR port as a variable which can be passed around? For example LED myLed(PORTA,7); //myLED hooked to PORTA, Pin 7 I would like to make LED be able to take any PORT / P...
Machiavelli asked 4/12, 2012 at 13:30

4

Ever since I heard about google's new language Go I wanted to use it for microcontroller programming. In particular Atmel AVR micro-controllers like the Atmega series. Is there a Go port for this a...
Davena asked 13/11, 2009 at 1:19

1

I was looking at the documentation on the Atmel website and I came across this example where they explain some issues with reordering. Here's the example code: #define cli() __asm volatile( "cli"...
Gormless asked 18/6, 2016 at 14:6

9

Solved

I would like to know if performing a logical right shift is faster when shifting by a power of 2 For example, is myUnsigned >> 4 any faster than myUnsigned >> 3 I appreciate that...
Weatherbeaten asked 16/9, 2010 at 11:46

8

Solved

I'm trying to compile some code for an ATmega328 micro, and I want use the libraries and the core of Arduino. I'm using CMake. I have gotten to compile the core library and all objects of my code a...
Barnsley asked 18/11, 2011 at 20:43

2

Solved

Consider the following snippet: static constexpr uint8_t a = 0; static constexpr const int8_t *b = reinterpret_cast<const int8_t *>(&a); This fails to compile with error: a reinterpret...
Lowminded asked 25/1, 2020 at 20:48

2

Solved

I have some code which should read the values of a couple of ADC pins, each time around the commutator loop. static uint16_t adc0; static uint16_t adc1; void init(void) { ... hw_configure_adcs(...
Macias asked 17/11, 2016 at 11:9

20

Solved

I'd like to be able to unit test my Arduino code. Ideally, I would be able to run any tests without having to upload the code to the Arduino. What tools or libraries can help me with this? There i...
Bromeosin asked 23/4, 2009 at 8:43

3

Solved

When trying to address individual bytes inside an uint64, AVR gcc⁽¹⁾ gives me a strange prologue/epilogue, while the same function written using uint32_t gives me a single ret (the example function...
Hobbema asked 4/9, 2019 at 1:9

2

Solved

I want to declare pin definition in global header as a simple line like: #define STATUS_LED B,7 Then I want to pass this pin definition to function above: CMBset_out(STATUS_LED); I don't know...
Unemployment asked 26/7, 2019 at 8:31

3

Solved

First off I would like to say that I am new to sublime text editor and I love it. I have no experience with JSON, however it does not seem difficult at all. I am trying to write a build system th...
Daff asked 9/10, 2013 at 21:30

2

I am playing a bit with avr microcontrollers and C++14. While trying to implement a C++ wrapper for the io pins I stumbled upon an error. The idea was, to let the wrapper take the sfrs as template...
Assassinate asked 10/12, 2016 at 15:34

© 2022 - 2025 — McMap. All rights reserved.