AVR is a 8- and 32-bit microcontroller core developed by Atmel. AVR was chosen as microcontroller for the popular Arduino SBCs.

learn more… | top users | synonyms

0
votes
1answer
39 views

Controlling AC devices using ATmega8

I have an microcontroller ATmega8, TRIAC MOC3083 and thyristor M166P. I need to develop and device which will turn on/off lamp(220V). But while I'm developing I don't want work with AC 220V now, DC ...
2
votes
3answers
54 views

Playing sounds on an AVR MCU [on hold]

I never had to deal with sound and I am pretty sure some of you guys have some experience in that kind of application. My question is more about getting some tips on the different ways to implement ...
0
votes
0answers
32 views

How to get an ENC28J60 to work?

For starters: Yes I know I'm about to reinvent the wheel with the following task ahead. I want to create my own library for the ENC28J60 for an AVR (ATMEGA1284P). So I've been browsing the net for ...
0
votes
4answers
83 views

Is it possible to power AVR micro project with just one coin cell battery?

My current project setup is: ATmega328P micro with 32 LEDS driven by 4 8-bit shift registers. System without LEDs draws 20mA of current continuously. With all LEDs lit at the same time, it draws ...
0
votes
2answers
58 views

Driving Mains Load Through A Relay [on hold]

I am looking into driving a mains load (for now a table lamp but later on high current devices such as a water pump) and would like to know what kind of relay would be best suited for the purpose The ...
1
vote
4answers
81 views

Blink LED example does not work

I'm trying to run standard Blink LED example on Atmega8A, but my LED doesn't blink. Here is my circuit: And here is my code: ...
0
votes
1answer
28 views

How to put these together and do I need a PWM expander?

I'm having here an Atmega8 a PSM42BYGHW603 stepper motor the L298 stepper motor driver ...
1
vote
2answers
132 views

Removable MCU for a PCB

I am trying to make my first PCB, an would like to program an ATmega328P-PU using my Arduino and a breadboard and transfer it to my printed circuit board. My problem is that either I will make a ...
2
votes
1answer
52 views

ATmega32U4: no output

I've got a little problem with a board I designed. What I tried to achieve is to control some LEDs with a microcontroller featuring an Arduino bootloader so that you can program it with the Arduino ...
0
votes
0answers
24 views

AVR Error Handling: I2C, SPI etc

How would one go about handling errors in AVR interfaces that do not specifically provide any acknowledgement scheme? For example, I have an I2C temperature sensor which I poll every 1 hour. So every ...
0
votes
1answer
54 views

No response from AVR microprocessor while programming

I've been attempting to program a few different micro-controllers using nothing but an FTDI 5V TTL cable and self-written software to bitbang the needed pins on the chips. Until now I had success only ...
0
votes
3answers
62 views

ATmega8 USB programmer

I bought this USB programmer: USBasp USBISP 3.3V / 5V AVR Programmer USB ATMEGA8 . But I can't understand how to connect it. This picture has got 9 circle inputs and 1 square input but all the ...
2
votes
0answers
30 views

AVR Flash Writing Error

Got a very strange error while trying to write to ATmega128. Below are the results for 3 cases (using different software but the same USBASP programmer and the same HEX file) Case 1 : AVRDUDESS 2.3: ...
1
vote
4answers
104 views

Control strong DC motor with microcontroller

Could anyone explain to me what it takes to control a strong DC motor with e.g. an AVR? For example if I have a 24V Motor with 5A or more. How can I build such a circuit? Especially if I want to ...
1
vote
3answers
94 views

How can I make a latch in AVR without interrupts?

I want to make a simple circuit that when you press a pushbutton, an LED lights up stays lit until the button is pressed again. I haven't delved into interrupts yet on AVR, and was wondering whether ...
1
vote
1answer
53 views

ATmega128 Extended I/O

This is my fist time working with a "bigger" micro controller, ATmega128. So far I've worked with ATmega328, ATmega8 etc. Reading through the datasheet, I didn't understand couple of points That ...
3
votes
1answer
97 views

ATtiny External Clock not working

So, I've been wanting to break away from the arduino abstraction for a while now. I made a board that has an ATtiny10 on it with a crystal and an output. I cannot for the life of me understand what ...
1
vote
3answers
224 views

Why usb to serial port converter can’t program avr microcontroller?

With a serial port or parallel port in pc programming avr microcontroller is very easy and cheap. Problem is, no modern computer come with serial or parallel port. So, usb to serial converter should ...
0
votes
0answers
92 views

USBasp: Why can I program ATtiny13A but not Atmega8A?

I am using USBasp V 2.0 LC Technology with slow SCK jumper connected. The firmware is not updated. I don’t know if I need to update the firmware. I have successfully programmed ATtiny13A, though ...
0
votes
1answer
21 views

How to check the source of reset in ATMEGA644p

I am trying to find the source of reset for ATMEGA644p, but I couldn't find the way to do it! MCUCSR gives error in atmel studio as not declared and the datasheet also doesn't have it.
0
votes
2answers
78 views

Arithmetic Overflow ATmega328

I have written the following function to calculate the current timestamp (since 00h Jan 1 1900). The output I get is: ...
3
votes
1answer
33 views

Speed and Position Control for high-volt Elektro Motor with AVR

Is there anything that one can purchase to control speed and position of a high voltage electro motor? I am quite a bit of a noob at this but I could think of a circuit using photo-sensors or ...
3
votes
1answer
61 views

AVR - ATmega16 - Timer config

Trying to figure out the timer setup in Atmel Studio 6 for an ATmega16 microcontroller. And I just don't get it. I am trying to create a TickCount similar to GetTickCount() Retrieves the number of ...
1
vote
1answer
39 views

Understand Atmega168P Datasheet

I am in the process of reading through the above mentioned doc from here. In page-21, second paragraph in section 8.5 I/O Memory, line 6 is given as below: ...
0
votes
1answer
47 views

Understanding AVR assembler instruction

From here, I have the following example: ...
1
vote
0answers
34 views

AVR: Usage of Force Output Compare bits

Currently I'm dealing with Tiny2313 for my project. Timer runs in CTC (WGM12) mode so OCR1A is used to set TOP of the timer. I want to use OCR1B to generate output signal. In documentation is ...
2
votes
1answer
87 views

EEPROM Write Limit [duplicate]

Just curious as to why do non volatile memories like EEPROM in an AVR have a write limit ? Also is this limit per location/adress in the memory or on the memory as a whole ?
0
votes
1answer
51 views

Plug-and-play usb-midi controller. How?

I am wondering how plug-and-play usb-midi controllers are created? To the moment I've created a simple midi controller based on Arduino Uno, but I am not able to use it directly. I have to use ...
0
votes
1answer
92 views

Read DS2401 with ATmega 32 and a 1-Wire protocol

DS2401 is a 64-bit ROM memory that used as a hardware-serial-number. [Datasheet : here] It has only two pin. One of them is ground and one of them is Data/Power pin. So for communicate with this chip ...
4
votes
1answer
97 views

AVR ATMega I/O pin overcurrent protection

I want protect I/O pin against overcurrent to make circuit more robust. Atmel's AVR040: EMC Design Considerations discusses internal overvoltage protection in General I/O Pin Protection paragraph. But ...
0
votes
1answer
48 views

Clearing Flag Bits By Writing 1

Most of the interface devices have various flag bits (that can also raise interrupts if that functionality is provided) used to check the status of the device/operation. Usually they are cleared by ...
0
votes
1answer
123 views

Current draw at digital output pin differences in two equally coded segments -probable cause?

I measured the current output of an Arduino Duemilanove (with an ATmega168) in two cases and found out that the currents differ strongly. The following code creates an output of 72mA at pin 13 ...
1
vote
1answer
61 views

Simulate DS2401 with ATmega32?

I have a DS2401 and an ATmega32. I can read the its contents with my AVR micro-controller. I want to know, Is it possible to simulate the DS2401 with my ATmega32? I mean is it possible to connect ...
0
votes
1answer
45 views

One-Wire data transfer with a DS2401 via AVR [closed]

I've an ATMEGA32 and a DS2401 (64 bit ROM - Silicon serial number). I want to read its contents. Can anyone help me giving me a clue, sharing a pdf tutorial link for One-Wire communication or a ...
0
votes
1answer
41 views

NRF24L01+ IRQ Issue

I am testing the functionality of NRF24L01+ and for my purposes I have configured it as PTX, No Auto ACK. I am able to communicate with the chip just fine and able to configure all the registers ...
0
votes
0answers
32 views

AVR SPI Issue (No data being received from slave)

I am trying to communicate to NRF24L01+ radio module using SPI on ATMega328. When things did not work out, I started analyzing the SPI signals using my logic analyzer. The SPI it set for 1Mhz, MSB ...
1
vote
1answer
76 views

AVR Embedded Webserver + Time

I have the task of implementing an embedded webserver (using ATMega328). Broadly, the system would provide the following functionality Allow user to change system parameters using the web interface ...
2
votes
2answers
90 views

Interrupt Management - Large AVR Projects

This is for the more experienced one's out there. I am currently involved with a large AVR project (using ATMega328) and it's getting confusing with respect to interrupts. The project involves ...
6
votes
1answer
731 views

Are pointers treated differently in AVR compared to say x86?

Microcontroller: ATtiny13 IDE: Atmel Studio I'm trying to write a Hello World application by writing high to port PB4. This works fine: ...
1
vote
1answer
60 views

AVR bootloader restarts on interrupt

For a quite while, I've been using an avr ATmega324PA controller and Atmel studio to write the programs. we wrote a TCP bootloader. It works fine without any interrupt. Later we did add an external ...
1
vote
1answer
71 views

AVR USART Garbage Data

I have been having issues with my AVR USART. Using a PL2303 USB adapter with the following connections to the AVR What I am seeing is Garbage data (mostly of 0xFF or 0xF7 or 0xE7) even when the ...
0
votes
1answer
67 views

Ethernet chip with integrated tcp/ip stack [closed]

I would like to ask what Ethernet chips are popular for an embedded webserver project. Features needed ... integrated tcp/ip stack support ntp protocol php support Basically the main purpose of ...
3
votes
3answers
350 views

What is an easy way to program an ATtiny microcontroller in C without an ISP?

I understand the "most raw" method to program an AVR microcontroller is probably with an ISP such as the AVRISP mkII. However, I'm after a method that doesn't involve me having to purchase a $40 tool ...
1
vote
0answers
48 views

Why am I getting verification errors with avrude?

I am constantly getting verification errors with avrdude and atmega168. I googled a lot, but everyone is getting them at first byte, whereas I am getting them at random bytes: ...
0
votes
0answers
51 views

AVR SPI Loopback test

I would like to do a loopback test on my ATMega328 to ensure that the code I am writing (while learning SPI) is working fine. To do this I would place a jumper between the MOSI and MISO pins. What ...
0
votes
1answer
23 views

TWI problem on mega2560

The TWI on mega2560 seem to be malfunctioning. the below code, believed to be correct as per data sheet, gives a proper start sequence, a proper address and a correct ACK. But when writing and sending ...
-4
votes
3answers
67 views

What is bug in C code for AVR? [closed]

When we write C code the compiler can diagnose certain errors. What is the difference between these errors and bugs? How can we recognize bugs? Can operating frequency effect bugs? In the world ...
0
votes
0answers
58 views

Keypad doesn't work correctly in the proteus

I have written a calculator in the Bascom avr and simulated it in the proteus but, some numbers of the keypad doesn't work, correctly. just 1 , 4 and 7 works nice. 2 and 3 shows 1, 5 and 6 shows 4, 8 ...
0
votes
0answers
44 views

GPS Not Working

I'm working with Venus 638 GPS and trying to get my current location. All the documents of it (datasheet, scheme, etc) can be obtained here. To deal with it, I'm using codevision avr and monitoring ...
0
votes
1answer
53 views

Small size transformer - Design or Pre-made

I am wondering how to acquire or design a small transformer. In my circuit, I need to add a transformer mainly to power my AVR and a bluetooth module. I would like it to be as small as possible as I ...