Click here to Skip to main content
15,881,882 members
Everything / AVR

AVR

AVR

Great Reads

by raddevus
Steps for building a device you can add to your existing garage door, which implements an atmega328, bluetooth (hc-05) and relay module which will allow you to open your garage door from any paired Android device.
by Mike Hankey
Part 2 in an on going series of article featuring an Autonomus Rover
by Bernhard Nebel
A tutorial for people who finally want to debug their Arduino projects that run on AVR MCUs using the GNU project debugger GDB
by Dharmateja Challa
Tip on how to simulate external interrupts using Atmel Studio 7 for AVR Atmega MCUs

Latest Articles

by Bernhard Nebel
A tutorial for people who finally want to debug their Arduino projects that run on AVR MCUs using the GNU project debugger GDB
by Bernhard Nebel
Link-time optimization and debugging OO programs do not work very well together, at least on AVR MCUs.
by Matt McGuire
Using an Arduino Nano to control all the working lights on an old 1978 Suzuki GS500
by Mohiuddin Awan
I am presenting a new implementation of Arduino GPIO functions which are faster and more efficient than the original functions.

All Articles

Sort by Score

AVR 

27 Jul 2016 by raddevus
Steps for building a device you can add to your existing garage door, which implements an atmega328, bluetooth (hc-05) and relay module which will allow you to open your garage door from any paired Android device.
19 Jan 2014 by Mike Hankey
Part 2 in an on going series of article featuring an Autonomus Rover
12 Mar 2022 by Bernhard Nebel
A tutorial for people who finally want to debug their Arduino projects that run on AVR MCUs using the GNU project debugger GDB
21 Jun 2016 by Dharmateja Challa
Tip on how to simulate external interrupts using Atmel Studio 7 for AVR Atmega MCUs
6 Jan 2022 by Bernhard Nebel
Link-time optimization and debugging OO programs do not work very well together, at least on AVR MCUs.
15 Sep 2014 by George Jonsson
You should decide on a format that works for you.The first choice you have is to decide between a binary or ASCII protocol.Both have their pros and cons, but simply putASCII is more readable, easier to debug and good if you want to hook your device up with HyperTerminal.It is a bit...
23 Sep 2020 by Richard MacCutchan
There is even an online reference: Beginner's introduction to AVR assembler language[^].
23 Sep 2020 by OriginalGriff
It's pretty simple: so simple I'm not giving you any code! Think about a for loop: for (a ; d ; c) b; a is the intialiazer: set a register to the number of elements in the array. Hint: ldi, anyone? b is the body of code inside the loop....
23 Apr 2021 by CPallini
You could start reading a tutorial on AVR registers. See, for instance AVR I/O Register Configuration - Tutorials[^].
11 Sep 2014 by Member 11075997
hi guys ...i have a problem with c# serial component ! i want to send data with atmega16 into pc receive that with c# and show on a textbox ! i use this code for c# :using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using...
11 Sep 2014 by User 59241
Where you open the port add the line:serialPort1.DataReceived += new SerialDataReceivedEventHandler(serialPort1_DataReceived);http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.datareceived(v=vs.110).aspx[^]Use BeginInvoke()instead of Invoke().You should examine...
15 Sep 2014 by Member 11075997
hello guys! this is my brief avr source code : int main(void){ sei();//Enable global interrupt USART_Init(MYUBRR ); DDRB |=(0
15 Sep 2014 by OriginalGriff
Getting the data in C# is simple: just set up a SerialPort class instance, and handle the DataRecieved event. In that, you can fetch data byte-by-byte or as a group, and do with it what you will.Alternatively, set up a background worker thread to read data byte-by-byte from the SerialPort by...
8 Sep 2015 by Sheriyar Siddiqui
I send signal from one MCU board to another using two wires from Tx of frist to Rx of second and vice versa, it did great as i was able to see result on LCD.Then i wanted to try wireless as i have to make a project next month to use in it.So i purchased RF 433MHz Transmitter and Receiver...
10 Apr 2017 by Jochen Arndt
From the Arduino - ReleaseNotes[^]: Quote: ARDUINO 1.6.13 - 2016.11.22 ... avr: set default values for "upload.verify" and "program.verify" (allows compatibility with older IDE). It seems that you need board version 1.6.13 if you don't want to install a newer IDE version.
15 Nov 2017 by Member 13523184
Hi, i have to make a code to send a data from visual to AVR to MCU and show it on 8 LED 7 segment display. This is my C# code, right now i can't check, if is it working so can you tell me, if is it possible to send data like this? 1st code And if is here someone, who can do Assembly...
26 Jan 2018 by OriginalGriff
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself. Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which...
26 Apr 2018 by Member 13799356
Hello every one . I want to blink three different Led with master and slave avr eith spi protocol I have interfaced the two avr with spi protocol the problem is when i press one of the three push buttons the three leds blinks. Because the receive condition is the same for the three leds . So i...
26 Apr 2018 by Jochen Arndt
This is rather unclear without knowing what you have done so far. But all you have to do is sending data that indicates which button has been pressed. This requires the definition of a "protocol" that defines the meaning of the data transferred via SPI.
1 Nov 2019 by Member 14611851
I'm writing assembly code for the ATMEGA328P (arduino uno). i have a example from a book. 'Adjust the previous assignment so that the LED stays on even when you release the button. The LED must remain lit until the other button is pressed' the previous assignment was: 'Create a program that...
3 Oct 2019 by OriginalGriff
Start by reading up on the timer - and we have no idea which one that is, we don;t even know what processor family you are using, much less the actual model, or the rest of your hardware - and work out how to program it to a 0.5 second interval. This calculation will complete the last part of...
3 Oct 2019 by Richard MacCutchan
You can find many samples at Tinkercad | From mind to design in minutes[^]
3 Oct 2019 by Mike Hankey
It appears you're using an Atmel chip, possibly an ATmega328P? Look in the datasheet, it will become your best friend, in the section on 16-bit timers (TIMER1) under the Modes of operation/Clear Timer on Compare section 13.9.2 page 125 and you will find the formula for the values you will need...
1 Nov 2019 by Mike Hankey
Write you assignment in C and then look at the .lss file for the assembler code the compiler outputs.
23 Apr 2021 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us...
27 Apr 2021 by Dave Kreskowiak
You might want to try forums dedicate to AVR if you're looking for someone to write code for you.
18 Oct 2022 by Rick York
How are we supposed to know? There is no timer visible in this excerpt of code. What is going to happen is the processor is going to spin in the while loop until the OFC1A bit is set in TIFR1. The bit shift operator (
2 Dec 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
30 Jun 2018 by Matt McGuire
Using an Arduino Nano to control all the working lights on an old 1978 Suzuki GS500
24 Nov 2013 by Mike Hankey
A start to finish project outlining the steps and pitfalls of creating an autonomous rover.
5 Mar 2014 by Mike Hankey
Learn the basic of the AVR micro controller and the assembly language
13 Aug 2016 by Mohiuddin Awan
I am presenting a new implementation of Arduino GPIO functions which are faster and more efficient than the original functions.
26 Aug 2015 by Christophe Duparquet
This article introduces a hardware abstraction tool for microcontroller programming.
2 Apr 2014 by Jan Dolinay
This tip shows how to find out the memory usage for Arduino program
23 Apr 2021 by Dave Kreskowiak
This is a bunch of bit shifts, basically just changing numbers, but what does this actually mean to the hardware attached to the board? Only the person who wrote that code and put the hardware together will know.
23 Apr 2021 by Julian Lambertin Gutierrez
int main(void) { DDRD=0B00000000; DDRB |=(1
10 Apr 2017 by Member 13118314
I am using IDE 1.6.9 after updating Arduino AVR Boards to v. 1.6.12, I can no longer upload to board. Going back to v. 1.6.11 and it works again.Tried this on Arduino Mega2560 and Nano. Same result.Any idea? i have just bought Arduino products from this site www.w11stop.com/ard-uino in pakistan....
4 Oct 2019 by Member 14611851
Write a program that makes all LEDs blink with a 0.5 second period(in assembly). Use the 16-bit timer 1uit (a) to determine the interval. Generate an interrupt every 0.5 seconds by counting the counter until an "output compare match" is reached. Indicate in your answer how you calculated the...
4 Oct 2019 by Member 14611851
.include "m328Pdef.inc" .def saveSR=r17 .def temp=r18 .org 0x0000 rjmp init .org OC1Aaddr rjmp TIMER init: ldi R16,high(RAMEND) out SPH, R16 ldi r16, low(RAMEND) out SPL, R16 ldi temp, high(31250) sts OCR1AH, temp ldi temp, low(31250) sts OCR1AL, temp ldi temp, (1
23 Sep 2020 by imrolis
New to AVR assembly programing language and using Atmel Studio 7. I've done other assignments which they are very simple and easy to complete but I have no idea where to start using arrays and for loops. Write a program using a FOR loop type...
27 Apr 2021 by Member 14674342
... display temperature on 20 x 4 LCD Anybody got and AVR Assembler code ? Cheers, Peter What I have tried: banging my head against a wall, but that only hurts....
2 Dec 2022 by ABX ENGINEERING
Write an assembly program to find the length of a string. The string is stored in the program memory and the length will be stored in the data memory What I have tried: I have tried but i did not get any understanding
19 Jul 2022 by Hamid Valinejad
I have a question about linking C and JavaScript languages. I have a variable like 'X' in my C program. I could use html, CSS and JavaScript inside my C code therefore I can show whatever I want inside a browser. Well there is my problem! I have...
20 Jul 2022 by Member 15078716
Here is an example to directly answer your question: Your question,"Importing C language variable to javascript". I am not certain that I understand your explaination of the need, so I am attempting to answer the posted question itself...
18 Oct 2022 by Waqas Ch
void delay() { TCNT1H = 0; TCNT1L = 0; OCR1A= 15625; TCCR1A = 0; TCCR1B = 0x05; while((TIFR1&(1