Questions tagged [atmega]

ATMega is a family in the AVR series of Atmel microcontrollers. This is the main microcontroller of the Arduino prototyping platform. Please Specify the specific part number in your question.

0
votes
1answer
74 views

AVR Skipping Page Message

I just flashed a new program into my ATMEGA328p, just letting 8 LEDs blink. When I have a look into the output of avrdude I get a strange message: ...
0
votes
1answer
241 views

ATMEGA328p LED Example not working

I tried to build a test circuit based on the Book "AVR Programming". It is very simple and shown here: The circuit itself is working and the upload of my code as well: ...
0
votes
0answers
161 views

Problem in reading/writing bytes with atmega16 & 24LC256 EEPROM

I am beginner in MCU world. I have learned quite few things and felt quite good. I am trying to experiment with my Atmega16 and 24LC256 eeprom chip. After making all the necessary connections on ...
0
votes
1answer
206 views

ADC unable to read from multiple channels

The problem is that I am unable to read from multiple ADC channels (atmega8-au). The code works fine if only one channel is used eg. ADC0, however, if the second ...
0
votes
0answers
70 views

Get more UARTs with a Shift Register?

My microcontroller (ATMEGA328) only has one UART. Is it possible to effectively create, say, 8 UARTs with one 8-bit shift register (like a SN74HC595)? The theory would be to send 1 bit from each "...
0
votes
0answers
96 views

ADC6..7 pins not defined in avr-libc

I have an atmega8-au microcontroller and analog inputs on ADC6 and ADC7 It is written in ...
0
votes
2answers
115 views

Shorted an ATmega32U4

I am still in the process of flashing my very first micro controller (an ATmega32U4). In the whole process of learning and exploring how to get this done I also used a multi meter several times on the ...
3
votes
2answers
3k views

How is the ATmega32U4 chip recognized via USB?

I have an ATmega32U4 chip which can be wired up on a PCB and connected to a PC via USB. When this is done, Windows 10 (if the proper drivers are installed) recognizes the device as ATmega32U4 chip. ...
1
vote
3answers
480 views

PCB design considerations for running 48 stepper motors

For a while now I'm working on a project where I want to control 48 stepper motors. A pair of two motors is controlled by an Atmega8. All modules are connected as slaves on an I2C/TWI-bus with an ...
0
votes
1answer
183 views

Programming a 3.3V Atmega chip using USB

I am planning to use Atxmega128A1U in a battery monitoring system. This chip comes with USB device support. However, it is a 3.3V logic chip with input voltage limit of 3.6V and I want to use the USB ...
0
votes
1answer
256 views

AVR: why reading data have some delay from writing it in SRAM (Timing diagram)

In that timing diagram we see that the write command in the same time nearly with the data. Why we don't see that also in reading data and why there is that delay between data and read command? That ...
1
vote
3answers
1k views

What is the most suitable? Pull Up or Pull Down

This is the IO port of ATMEGA328p according to 76 page of datasheet. As I know, Pull up is the most suitable system because lots of voltage spikes are logic 1.So, if we can give logic 1 normally, we ...
0
votes
1answer
107 views

MCU (Atmega644p) PWM without interrupts

I have an Atmega644p which is connected over SPI to a MCP2515 can-controller. In the MCU I use time based interrupts to send messages to the can-controller, which he translates and sends onto the ...
2
votes
1answer
1k views

AVR: Using ATmega328 Timer1 to create a delay [duplicate]

I am having some trouble wrapping my head around this, and it might just be some small error somewhere, that I keep missing .. but as it stands, I am trying to create a hardware "delay" that can run ...
0
votes
1answer
328 views

atmega2560 i2c problems

I'm tying to use a atmega2560 but can't get the I2C working. When I send the address byte i get never a ack response. Does anyone see what i'm doing wrong i used the code out of the datasheet? I tried ...
0
votes
1answer
83 views

Change current using PWM, for specific range outside PWM boundaries [closed]

I have a circuit where I use a digital potentiometer (namely MCP41100) to change current, and I use duty between 0 and 255 (thus, I have 256 steps). The current changes from 25 micro to 50 micro. And ...
0
votes
0answers
92 views

ATMega/Tiny barely working on breadboard without ISP

currently I want to get an ATMega328P and an ATTiny85 to work on a breadboard, which should talk to each other and an LCD via TWI. Anyway, I came across some issues I don't seem to be able to fix at ...
0
votes
3answers
365 views

ATMega328P - faulty ADC behavoir - update

BLUF: What causes the ADC2 to work perfectly while ADC3 charges towards a value of 328 (1.6V) on ATMEGA328P? I use an ATMega328P for one of my current projects and had an issue with the ADC. \$A_{...
-1
votes
1answer
329 views

Accidentally connected an Atmega328p and an Atmega644p to 12v instead of 5v. Are they screwed? The 328 seems to be bricked, the 644 seems fine.

I'm working on a project using the Atmega328p and Atmega644p, so first I built myself a USBasp programmer board for each one and I've successfully programmed a blinking LED, which is awesome! The not-...
0
votes
2answers
102 views

Will an ATMega128A work with a 12.8MHz external crystal?

Ultimately I am trying to create a timer that interrupts on a 50kHz cycle. Using the equations in the ATMega128A datasheet, I've determined that I would have to scale down a 12.8MHz crystal. In the ...
1
vote
1answer
149 views

USBasp programmer first firmware

I am building an evaluation board for ATmega32, I am designing an embedded USBasp programmer (The programmer will be also in the board and they will be a micro-usb header to connect the board to PC). ...
0
votes
2answers
201 views

Different voltage levels for LCD and microcontroller

I want to interface my microcontroller (ATmega32) with a 2x16 LCD. I am powering my microcontroller with 3.3V, and I need to use 5V with the LCD. Will be there any problem with that (i.e data signals ...
3
votes
1answer
146 views

Capacitors for MAX232

I want to use this chip (ST3232CDR) as an RS232 transceiver. The problem is that I want to power the chip using 2 levels of voltage (3.3V and 5.0V) using a simple jumper, but in the datasheet (http://...
0
votes
2answers
146 views

AVR ATmega TWI Hardware Questions

I have thoroughly read the TWI part of ATmega data sheets, but I am still confused about a few things. If I write TWCR = (1 << TWINT);, will that write a ...
0
votes
0answers
82 views

How to run micro servo with ATmega 328 PU

When I use arduino board it works fine but when I try to put it on prototype breadboard it just freez and start humming. For circuit I am using 5v regulator, duracel 9v battery, ZTT 16.0 mx resonator(...
0
votes
3answers
291 views

Block characters are shown in 16x 2 LCD instead of letters while interfacing with atmega328p?

I am trying to display some characters in 16x2 LCD (1602 A) using Arduino Uno (atmega328p-pu). I have written my code using embedded C for 4 bit mode. The code is below. ...
1
vote
2answers
156 views

Benefits of using an External A/D converter with ATmega128

I am new to electronics and working on my first project. Can someone explain why you would use an external A/D converter instead of the on board one? According to Mplabs the ATmega128 has a 8-...
2
votes
1answer
209 views

ATmega328P firmware flashing interrupted - is it fixable?

I am working on some PCB with an ATmega328P on it. I use a Pogo connector because we have to program and test the PCB outside. I program with usbTiny, (...
0
votes
1answer
231 views

Is it possible to connect USB printer to Atmega8 [closed]

I have a usb thermal printer, that I want to control using Hex commands in its datasheet from cheap micro-controllers. But to do that I need to create USB host in my board and it requires more than ...
0
votes
1answer
175 views

Atmega32u4 USB 2.0 Routing Check

I am making last minutes changes to USB 2.0 differential pair routing on Atmega32u4 based board. I can't re-route the entire board and/or re-arrange the components. So the picture attached is the best ...
1
vote
0answers
749 views

Programming the Atmel Mega 328P-AU 32 MLF (QFN) using the Arduino ISP

I have successfully managed to program both a (DIP)Mega168A-PU and a (DIP)Mega328PU using another (DIP)Mega328P-PU ISP. This is the configuration that works for both DIP formats (168A-PU & 328P-...
1
vote
1answer
469 views

ATmega16u4 and ATmega32u4 i2c bug in Proteus AVR model?

I am trying to use i2c with ATmega16u4/ATmega32u4 in Proteus (version 8.5 SP1) and in my i2c code the following code line hangs the MCU: ...
0
votes
3answers
304 views

Ongoing trouble with I2C on Atmega328p

I've the following schematic : the Harness connector goes to TCA9548A as followed: based on the datasheet of the IC, the address is 0x70 and it can run with 100kHz or 400kHz. I've run this code on ...
0
votes
1answer
485 views

AVR: target doesn't answer error

I was trying to overwrite the AVR Fusebytes for AVR16A sudo avrdude -p atmega16 -P usb -c usbasp -U lfuse:w:0xFF:m -U hfuse:w:0x99:m before overwriting it was <...
1
vote
1answer
1k views

Setting external oscillator for atmega328p

I'm trying to use a 8MHz Oscillator on an atmega328p. this a part of the whole schematic : to that I've set the Fuse byte as calculated then I've set the calculate values in the project : To ...
1
vote
1answer
320 views

I2C on atmega328p

I'm trying to get connect with an IC using I2C, to initialize the I2C communication I'm using the following function : ...
0
votes
1answer
1k views

I2C on atmega328p

I'm trying to run a I2C device using the atmega328p (on a custom board ). I've read the data sheet , and wrote the code "exactly" as show in it: here's the code : ...
0
votes
3answers
1k views

Write program for Atmega microcontroller with C# [closed]

Anybody know that is there exist a way to write program for Atmega microcontroller With C# language? Or there is exist a plug in for Atmel Studio that add support C# in that IDE?
-2
votes
4answers
591 views

Programming The Atmega Chips [closed]

Can someone explain a little bit to me how to program the Atmega MCU for example the Atmega328P without the arduino?? So, what i want is to program the Atmega chip without Arduino IDE but using the ...
0
votes
1answer
109 views

How i could find how program existing board with atmega chip on it [closed]

I have few "lego" roborobo sets (http://www.roboroboglobal.com/products/robokids1.html) I'd like to find way to upload programs there written on PC. On unit have ATMEGA16L chip and 6 pinholes with ...
0
votes
1answer
445 views

Can't enter Programming Mode Atmel Studio

I have a custom board based on the ATmega328. I want to program it usign Atmel ICE Basic ISP interface, to make sure that I'm connected to the target I've tried to read it ID, I get the following : ...
1
vote
1answer
635 views

Stock (factory) bootloader in ATmega16U2

I have an issue with ATmega16U2 which includes hardware USB support. As the datasheet describes: The 8bits mega AVR with USB interface devices are factory configured with a USB bootloader ...
3
votes
2answers
165 views

Is there any cons with programming a atmega2560 every time the device starts?

I will have a atmega2560 acting as a DMX encoder/decoder connected to a Onion omega2 (a small Linux computer). Is there any cons except longer startup time with programming the atmega every time the ...
0
votes
2answers
429 views

Suggestions on how to control a 1000W DC motor

I would like to find out the best solution to safely control two 1000W DC brushed motors by using a atmega328p. In particular, the DC motors are rated: 1000W, 50A, 24V, 2400 RPM. I have a radio ...
3
votes
2answers
599 views

Re-purpose USB cable to carry I2C

I was wondering if it would be possible to connect an IO extender (MCP23017-E/SP) to an ATMega32u4-AU via an USB cable. I figured that if you connect up the SCL pin to the Data+ of the USB and the ...
1
vote
2answers
178 views

ATmega168 GND and AVCC not needed when programming?

I'm reading "MAKE: AVR Programming" and for their "basic LED blinking setup" I noticed in their diagram they don't have the 2nd GND and AVCC (or AREF, which I'm still unsure what it's used for) ...
0
votes
1answer
450 views

Can I create a fake keyboard using an Atmega chip

I have been wondering lately if I can make a "keyboard simulator". I have an Atmel Atmega chip and I know it can communicate by serial because they are used in Arduinos. Is it possible to write some ...
1
vote
1answer
1k views

How to connect Aref (Avcc and Agnd) and where to place the bypass capacitor?

This is my schematic: Should I connect a capacitor between the PIN 32 and GND Pin or AGND Pin? From the AVR Hardware Design Application Note: 2.2. Analog Supply The AVR devices that have a ...
0
votes
2answers
2k views

Connecting AVR Microcontroller to USB

I am working with an ATmega328. What I want to do is finding a way to save any value in any GPR of the microcontroller using the PC. I found this video where an already made interface is shown. ...
0
votes
1answer
164 views

Amplify PWM from ATmega using OpAmp

The process: I want to do a on-board-in-loop test. From simulink I want to send data via serial to ATmega 128, which will generate a PWM at 4kHz. This PWM will pass through a low-pass-filter so that ...