Questions tagged [avr]

AVR is the family of microcontrollers used in Arduino boards.

Filter by
Sorted by
Tagged with
0
votes
3answers
555 views

Arduino UNO USART problems

I need to send 6 bytes value from Arduino UNO to the actuator using serial port in order to make it extends. I have added a button to send the data. For example, 0 20 1 1 0 0. The communication ...
1
vote
1answer
4k 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 ...
-3
votes
1answer
56 views

Pllzz help me with this error i m using Arduino uno r3 on win 10 [closed]

Error picture on screen jdhvdixbdicjdhdojchdishcishcheoshcjd
-1
votes
1answer
1k views

What Are The Differences Between Arduino Language and Standard C for MCU? [duplicate]

What the differences between Arduino language and standard C used for MCU programming (like AVR).I heard Arduino language is C.What happen if i use Arduino language with bare-bones AVR chips.Or with ...
1
vote
1answer
5k views

My Digispark board won't show up in Ports tab in Arduino IDE (OSX)

I bought a Digistump/Digispark board online and when i received it, I plugged it into my iMac to see if it works. I went to the apple in the top left corner and clicked "About this Mac". Then I ...
1
vote
1answer
53 views

A confusion with setting timers

I was reading a tutorial on timers. My aim is to generate 16MHz pulse output from the pin 8. Here is the code I modified from the tutorial (I use Arduino's ATmega328P): #include <avr/io.h> #...
0
votes
1answer
355 views

A question on physical locations of the registers in ATmega328P

When I read about registers I always encounter the following illustration: So there are 32 registers in the above diagram. They are processor registers. But in the data-sheet of ATmega328P at page ...
1
vote
3answers
459 views

Problem with transmitting 2 byte data in correct way

I'm using Atmel Studio with Atmega328P. I'm trying to send the decimal number 876 continuously from the micro-controller. This was just to learn. To send 876 I need two bytes which is: 0x036C = ...
-1
votes
3answers
99 views

Problems creating 10Hz pulse wave

I'm trying to make a 10Hz pulse wave output at Arduino's pin 9 by using the following code I wrote: #define F_CPU 16000000UL #include <avr/io.h> //Defines pins, ports, etc. #include <util/...
1
vote
3answers
188 views

Can I port a project built on Arduino Uno to a standalone ATmega328 using the exact same code?

I'm building an IoT power usage monitor in which the data is logged using a RTC and an SD card module and a web app hosted on an ESP8266 gives access to this data. My question is can I use the exact ...
1
vote
3answers
865 views

Understanding writing to input pins and pull up resistors

I am new to Arduino, and am trying to understand the following code. The question is: Is my understanding correct, or if not, what is happening here? I have to reverse engineer an existing ...
1
vote
1answer
648 views

Analog inputs on ATtiny85 don't work

I want to use a ATtiny85 to check the voltage of two 12 V batteries (later to control a relay). Therefore I'm using the analogRead() function. For programming I'm using an Arduino Mega 2560 board. // ...
3
votes
2answers
170 views

What does an arduino sketch translate to before compilation?

I've been experimenting with Arduino on both esp8266 and AVR chips. The structure of the .ino file usually looks like this: #include "Arduino.h" #include "ESP8266WiFi.h" ##Some includes void setup() ...
0
votes
1answer
1k views

Help: convert Arduino code to avr-gcc code [closed]

I need to convert Arduino code to avr-gcc code. This is code: #include <Servo.h> Servo myservo; void setup() { myservo.attach(11); } void loop() { myservo.write(67); } I use Arduino ...
2
votes
1answer
6k 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 ...
0
votes
2answers
155 views

Using Arduino libraries for adding more functionalities to a bootloader

I have a short question to ask before putting time for research. I have an Arduino Leonardo with the LUFA mass storage bootloader flashed. Now what I need to do is to add more functionalities to the ...
3
votes
1answer
2k views

How is the bootloader activated when device is running?

For the sake of specificity I am referencing my question to Arduino. It applies to all AVRs with hardware USB and a bootloader though. The bootloader is capable of receiving new program data over the ...
0
votes
1answer
115 views

Programming ATMega328p using VP812 programmer (for AVR/Atmel chips)

I bootloaded an ATMega328p (the one that uses the basic Arduino bootloader). Then, I used the VP812 for dumping other programs written in C (in Atmel Studio). The process of erasing, blank test, ...
1
vote
4answers
1k views

Reset and Remove Arduino ATmega328P?

So I have 2 Arduinos, and im wanting to remove the chip from one and reset it to like it came from the factory and then breadboard it and attempt to program it using an AVR programmer (Or maybe an ...
0
votes
1answer
157 views

Problem with uploading LUFA MassStorage .hex file to Leonardo

I have been trying to make my Leonardo board to work as a USB device. So I started with compiling the open source LUFA USB library demo "MassStorage" for the Leonardo board settings. Since I'm using ...
0
votes
1answer
22 views

8 bit arduinos: What happens to the data in registers during a function call? During an interupt?

If I have one function that uses registers heavily calling another that does the same thing, what happens? Does the data get destroyed? What, then, would happen on return to the first function? Is ...
1
vote
2answers
167 views

Temperature sensor and LCD

I have a project which uses a DS18B20 temperature sensor and an LCD with an I2C interface on it. I have connected the sensor to my micro-controller (the DS18B20 has a 12-bit digital output) to the ...
0
votes
1answer
3k views

10 bit PWM on Arduino UNO

I am using this code to make 10 bit PWM on port number 9, it seems like everything printed is 0,1022 rather than printing 0, 512, 1023. Is there a problem in my code ? I wired pin9 to A3 to get the ...
0
votes
1answer
58 views

Problem with microSD SPI mode in AVR

I'm trying to read a microSD block. But I don't know why it doesn't work. I do: CS_UP; for(uint8_t i = 0; i <14; i++){ /* Send 74+ clocks */ spi_tranceiver(0xff); } _delay_ms(1); /* Wait 1 ms ...
1
vote
1answer
2k views

AVR timer overflow interrupt not working

My problem is an interrupt service routine (ISR) that seemingly never executes! Here's some info on my set up: I am flashing an avr attiny85. I have the bare bones of a project set up so far with ...
0
votes
1answer
114 views

avr-gcc -D is ignored

Im trying to use XCode to compile avr program with arduino libs but seems like something wrong with my Makefile because it throws me warnings like # warning "F_CPU not defined for <util/delay.h&...
0
votes
2answers
979 views

Arduino uno board not detected when connected via USB no matter what OS

I was working with Arduino in Win 8.1, when suddenly it stopped work. I tried to reinstall the drivers and IDE several times, but it didn't solved. In Win 8.1, when I plug the arduino, I get the pop ...
0
votes
1answer
159 views

Using Atmel Studio with Arduino Starter Kit (Uno MCU)

Can someone tell me if it's possible AND safe to use Atmel Studio with Arduino Starter Kit? I'm a newbie to firmware in general and I don't want to "brick" my Arduino Uno Microcontroller. I don't ...
0
votes
1answer
353 views

BASCOM-AVR stk500_2_ReceiveMessage(): timeout: -1

Arduino Uno R3 Windows 10 Bascom AVR The ON is alright. The LED flickers now and then. The RX and TX flickers when I press the program button on Bascom but then disappears almost immediately. ...
0
votes
2answers
543 views

From Wiring to pure C

I'm using the Teensy 2.0 (atmega32u4) and decided to switch from Arduino IDE with Wiring to pure C. I think it's much more useful to master programming microcontrollers on that level. Wiring seems to ...
1
vote
2answers
2k views

AVR (Arduino Uno) Serial.print and Serial.println only printing 1 or 2 chars

I first used the Arduino IDE but now I'm using PlatformIO which is awesome. But I have some big trouble with Serial.print() and Serial.println(). To show this error I have the following example code: ...
1
vote
1answer
795 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 ...
2
votes
1answer
1k views

Uploading .hex to ATTiny13 using Arduino

I would like to upload a .hex to ATTiny13V (or '13A) using Arduino Uno R3. I think I know everything to do, but ATTiny13 ISP support and Arduino IDE is a bit search-and-find, and I have some grey-...
0
votes
3answers
2k views

Why can't the Atmel ATtiny family delay over a minute?

I have some really simple code and tested on an 8 MHz ATtiny85 and ATtiny2313. It's basically a blocking blink: int relayPin = 7; long offPeriod = 1 * 60 * 1000; long onPeriod = 1 * 60 * 1000; ...
2
votes
1answer
89 views

Issues graduating to AVR-C [closed]

I'm trying to make the transition from coding in the Arduino language to AVR-C, but I'm having some issues with my microcontrollers. I don't have an ISP, so I'm using one of my Arduino UNOs with the ...
-1
votes
1answer
251 views

Atmega328P and Arduino Studio and Pololu AVR - not working

I have standalone ATMega328p and I'm using external 16MHz oscillator, I hooked up and I triple checked my connections for Pololu AVR programmer and I make sure that I select a proper programmer \ ...
0
votes
3answers
817 views

Is the Arduino bootloader really the Atmel bootloader? Can I use Flip to upload?

I've been asked to do a small project using an Ada BlueFruit board. It has a ATMega32U4. The 32U4 comes from the factory with a bootloader pre-installed. I've never used an Arduino before, but I have ...
1
vote
1answer
62 views

Complete Bread board arduino

I bought a ATmega328 microcontroller and burn the bootloader. Now I want to upload code directly from pc to the microcontroller on bread board. I have max232 ic for the communication but I recently ...
2
votes
5answers
1k views

Good book/reference for AVR coding in pure C/C++?

Can someone recommend a good book/reference for going vanilla (i.e. not using arduino simplified language) on e.g. ATtiny85? I will need to use the equivalents of analogRead() and digitalRead() quite ...
2
votes
1answer
420 views

Cannot enter programming mode on Arduino Uno

I have an Arduino Uno that I've been programming with an AVR Dragon through Atmel Studio 7. I did two things in close proximity, and I'm not entire sure which action is the culprit. I tried using the ...
0
votes
2answers
468 views

does eeprom_write_block function of avr.eeprom.h writes a NULL terminated string or we have to manually null terminate it

http://www.nongnu.org/avr-libc/user-manual/group__avr__eeprom.html I am trying to figure out that if we use eeprom_write_block function or eeprom_update_block function do we need to manually null ...
1
vote
1answer
121 views

Unable to replicate Arduino code into ATmega8 code

I am trying to replicate an LTC Audio Decoder code from Arduino Uno into AVR ATmega8 which I got from here. My Arduino Uno code is working great. Here is my Arduino Uno code: #define one_time_max ...
0
votes
1answer
268 views

Porting ATMega8 AVR based program to Intel Curie Processor

I'm currently trying to port a program called 'ArduinoUSBLinker' to work on my Arduino 101 (which has an Intel Curie CPU instead of the standard ATMega CPU). The program is used to flash ESCs without ...
2
votes
5answers
226 views

can homemade arduino be powered up with battery?

I am new to arduino. It is costly for me to buy an arduino uno board. Therefore I am going to make a Arduino with breadboard at my home. I also want to make my Arduino portable. Arduino Uno boards can ...
0
votes
1answer
46 views

IO Control and Configuration

I am using Eclipse to program a ATMega2560 and would like to stay away from the Arduino library, While looking through AVR Examples I have seen the syntax #include <avr/io.h> PORTD.0 = 1 or ...
-1
votes
1answer
204 views

AVR has no vprintf_P?

Well this was unexpected. AVR libc has many the variants of printf, including vprintf, but is missing vprintf_P. Is this really just not present or implemented elsewhere?
3
votes
1answer
936 views

How to use printf with Arduino's serial ports without an intermediary buffer?

How to use printf with Arduino's streams without an intermediary buffer? The following seems unnecessary: char buf[256]; sprintf(buf, ...); Serial.print(buf); Is there a way to connect ...
1
vote
0answers
41 views

Why am I only receiving the first address byte? (I2C Protocol)

Expecting the slave to ACKnowledge and return data, but it does not. This is my protocol. This is my Datasheet. Also FYI I'm on an Arduino Fio but I am not inheriting the Arduino library. #include &...
1
vote
1answer
198 views

How do I use SNAP protocol, correctly?

I've reviewed the documentation I'm still a little lost when it comes to applying the functions. Each of the redundancy check methods take in an unsigned char and return an unsigned char. Shouldn't ...
1
vote
1answer
1k views

How do I use an AtTiny85 (or other AtTiny) with Arduino?

Please mind that this is an "example" question. How to make a "tiny arduino"? I've ordered a bunch of ATtiny85's off E-bay, they're like tiny Arduino's. I've set up the latest Arduino IDE and would ...