Questions tagged [avr]

AVR refers to two families of either 8- or 32-bit RISC microcontrollers

The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to One-Time Programmable ROM, EPROM, or EEPROM used by other microcontrollers at the time.

External links:

2091 questions
18
votes
4 answers

Undefined reference to 'operator delete(void*)'

I'm new to C++ programming, but have been working in C and Java for a long time. I'm trying to do an interface-like hierarchy in some serial protocol I'm working on, and keep getting the error: Undefined reference to 'operator delete(void*)' The…
Bracket
  • 362
  • 1
  • 2
  • 9
18
votes
7 answers

Fast Hypotenuse Algorithm for Embedded Processor?

Is there a clever/efficient algorithm for determining the hypotenuse of an angle (i.e. sqrt(a² + b²)), using fixed point math on an embedded processor without hardware multiply?
Tim
  • 4,014
  • 3
  • 28
  • 39
18
votes
8 answers

Protocols used to talk between an embedded CPU and a PC

I am building a small device with its own CPU (AVR Mega8) that is supposed to connect to a PC. Assuming that the physical connection and passing of bytes has been accomplished, what would be the best protocol to use on top of those bytes? The…
user3458
18
votes
9 answers

how bad is it to use dynamic datastuctures on an embedded system?

So 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 into why. Now i'm working on a moderate scale,…
Lyndon White
  • 24,284
  • 15
  • 77
  • 126
16
votes
3 answers

Using Google 'Protocol Buffers' in Arduino

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.
Manuel Araoz
  • 14,795
  • 21
  • 67
  • 91
15
votes
4 answers

AT+CMGS returns ERROR

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" returns ERROR and doesn't show ">" Could anybody…
Mohammad Farahi
  • 866
  • 3
  • 12
  • 32
14
votes
2 answers

Compilation gcc 4.6.2 (cannot compute suffix of object files)

Problem when compiling gcc 4.6.2: checking for avr-gcc... /data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/data/data6/soft/src_build/gcc-4.6.2/host-x86_64-unknown-linux-gnu/gcc/…
Alex T
  • 1,647
  • 4
  • 17
  • 25
14
votes
4 answers

C - AVR - Simple PORTB, DDRB, PINB explanation

I am working on school project and need to learn the basics of C with a AVR atmega controller. I don't understand how everything is set up. For example PORTB, PORTD, DDRB; DDRD, PINB, PIND and stuff like that. And I don't know how everything works…
Mike_NotGuilty
  • 2,081
  • 4
  • 26
  • 57
14
votes
1 answer

AVR 8bit, C standard compliance regarding bit accessing of SFRs

One of my colleagues ran in some strange problems with programming an ATMega, related to accessing input - output ports. Observing the problem after some research I concluded we should avoid accessing SFR's using operations which may compile to SBI…
Jubatian
  • 2,031
  • 10
  • 21
14
votes
3 answers

Arduino Uno PWM pins conflict

I built this motor shield based on the L298N chip to control two motors of a tank. It uses pins 5 and 6 for one motor, and pins 10 and 11 for the other. While trying to add a TSOP 4838 in order to control the tank with an IR remote I noticed that…
binar
  • 1,177
  • 1
  • 11
  • 24
14
votes
4 answers

Go port to the AVR architecture?

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 architecture?
hacim
  • 281
  • 1
  • 3
  • 9
13
votes
2 answers

Is there a way to pass multiple values to macro function as single defined macro value in C?

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 how to approach this - MY_PIN is in proper format to be…
bajtec
  • 145
  • 5
13
votes
8 answers

Atmel AVR Disassembler

Can somebody suggest me any disassembler for Atmel AVR 8-bit microcontrollers? There are opensource projects for this? Thanx.
Eugene Burtsev
  • 1,427
  • 4
  • 23
  • 44
13
votes
4 answers

Is it possible to generate random numbers using physical sensors?

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 measurements of the physical world (using an…
Harlo Holmes
  • 4,905
  • 1
  • 20
  • 19
12
votes
1 answer

Speed comparison eeprom-flash-sram

Currently coding for atmel tiny45 microcontroller and I use several lookup tables. Where is the best place to store them? Could you give me a general idea about the memory speed differences between sram-flash-eeprom?
kostaspap
  • 245
  • 3
  • 10