Questions tagged [avr]

AVR is the family of microcontrollers used in Arduino boards.

Filter by
Sorted by
Tagged with
9
votes
4answers
54k views

Arduino compatible's serial port not showing Mac OSX

I bought an Arduino-compatible Freaduino board atmega8 (I selected the board type as Arduino ng or older atmega8). I installed the Arduino IDE on Mac OS X and the FTDI drivers. But my serial port ...
7
votes
3answers
27k views

I2C 2 way communication between Arduino Uno and Arduino Mega

If I remove the transmission code from slave this works properly but I need to transmit from slave. Here is my master code #include <Wire.h> void setup() { Wire.begin(3); Wire.onReceive(...
2
votes
2answers
52 views

Change the fuses of an Arduino Uno (can an Arduino Uno change its own fuses?)

For now, I'm using an Arduino Uno alone including its 328p (no other external chip to program). I would like to change its fuses to internal 8 Mhz clock (because then I'll move the 328p out of the ...
2
votes
1answer
5k views

How to convert Arduino example sketch to a complete c++ project?

I'm experimenting something new with my Arduino Leonardo. I removed its original bootloader and flashed it with LUFA mass storage example with added functionalities(now its a firmware). I'm trying to ...
1
vote
1answer
715 views

Atmega328p programming with Arduino libraries

I'm trying to use the serial communication to work between a naked AVR Atmega328p and a computer (OS X and Linux Ubuntu). I can program the atmega (using a pololu programmer), I make it blink a LED ...
1
vote
2answers
3k views

Unable to flash bootloader on ATmega32U4 with AVR dragon

I am flashing a naked ATmega32U4, but the process fails in the end where it is verifying. avrdude -c dragon_isp -p m32u4 -P usb -U flash:w:Caterina-Micro.hex -U lfuse:w:0xff:m -U hfuse:w:0xd8:m -U ...
1
vote
1answer
3k views

How does avrdude burn a bootloader much quicker than the Arduino IDE?

To burn a bootloader to the Arduino Micro (ATMega32u4), I'm using an Arduino Uno with the ArduinoISP program uploaded to it. 1st case: Arduino IDE Very straightforward, using the ArduinoISP sketch ...
0
votes
2answers
979 views

What's the difference between DDRB and pinMode?

It's my understanding that the following lines are equivalent. They seem to be interchangeable in my sketch: DDRB = 1<<DDB0; and pinMode(0, OUTPUT); Is the first form (DDRB...) setting a ...
0
votes
2answers
2k views

32u4 timer 4 pwm frequency help

I have extracted the following code from the multiwii project. It generates a ~490-500hz pwm signal on pin 6 which is used to drive an esc. I want to change this frequency down to 50Hz to drive a ...
0
votes
1answer
122 views

parse intel hex into SPI commands for arduino ICSP AVR

I'm attempting to use the arduino as an ICSP AVR to flash hundreds of ATMEGA's 90USB162. I'm having some difficulties when trying to do the actual flashing of the chip. I've go all the wires done ...
0
votes
2answers
675 views

Arduino analogWrite source code explanation

The source code for the analogWrite function looks like this: void analogWrite(uint8_t pin, int val) { ... sbi(TCCRnA, COM0x); OCRnx = val; ... } Where n is which timer (0, 1, 2...) ...