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.

Filter by
Sorted by
Tagged with
0
votes
2answers
684 views

First schematic - Critique my ATMEGA-328P design

I'm a software engineer looking to dabble in making electronics, and want to design my own board. I thought that an Arduino would be a good place to start, so I created this with an ATMEGA-328P. ...
0
votes
3answers
99 views

Is my reasoning about an ATMega328p connected to equipment requiring an open-drain pin correct?

I am part of a research group that is developing a concept for a PCB for an external piece of equipment. This piece of equipment can be controlled with a microcontroller. It communicates to my ...
0
votes
1answer
164 views

Can ATMEGA JTAG be disabled and enabled just with JTAG?

I am currently developing a schematic based on the ATmega32U4. I need to be able to program the embedded chip, so with ISP or JTAG (preferably). The problem is, I also need the analogs functions of ...
-2
votes
2answers
107 views

What is the best communication mechanism with collision detection/avoidance for my topology?

Here is my sensor topology.. Here, the atmega128 is the main controller and all other atmega8 are connected to the main controller using rs485 cable. What is the best communication protocol for this ...
-1
votes
1answer
616 views

Fuse Bits for ATmega1284P

I need to use an external crystal oscillator for PWM generation on the ATmega1284P. I have set the wrong fuse bits and I can't program it now. Can this be rectified?
0
votes
1answer
202 views

why doesn't this code receive string ?(it just receive the first character)

I want to receive a string whit atmega8 that is sent by another atmega8. The sender send string just one time, but in receiver just first character is received. I can't understand what is the problem? ...
1
vote
2answers
1k views

Control PWM with potentiometer using atmega328p

I'm using an atmega328p and I want to control the PWM duty cycle with a potentiometer. The frequency is 20ms and the duty cycle is between 0 ms and 2 ms. Problem : when I simulate this in Proteus ...
-5
votes
1answer
403 views

how to generate staircase wave using avr microcontroller

I am trying to build staircase wave using atmega16.i have generated pwm signal that also can be controlled width automatically.i have used low pass filter with oc0 output pin of microcontroller.as a ...
1
vote
2answers
263 views

Interfacing 16x2 LCD with Atmega 32

I am trying to interface 16x2 LCD display with atmega 32 in 4 bit mode and on display there's random character and black boxes. here below my code //#define F_CPU 12000000UL #define F_CPU ...
1
vote
1answer
744 views

20Khz 50% duty cycle PWM generation Problem in atmega 328p

I wanted to create a PWM of 20Khz with 50 percent duty cycle(can be varied within while loop) in timer 0 of atmega 328p with MOODE 7:fast PWM mode with top value as OCROA.I used OCROA register to make ...
1
vote
1answer
4k views

AVR ATMEGA328p LED Example

I have the following code for testing an LED: configGlobal.h ...
0
votes
2answers
250 views

NeoPixel led WS2812B doesn't shine when given equal RGB levels

I was trying to light up WS2812B and it works fine when given RGB code something like this (255, 145, 67). But when I send code like (255, 67, 67) to this diode it doesn't turn on. Similarly if I want ...
1
vote
0answers
229 views

High current draw through DC-DC boost circuit

I currently have a simple circuit below which works fine but I am confused with the readings I am getting for when the Atmega1284P is put to sleep. When it is operating I get a current draw of around ...
2
votes
0answers
198 views

Can not interface with Winbond W25Q16DVSIG over SPI

I'm trying to attach Winbond W25Q16DVSIG to Atmega 1284P-PU. I've attached SPI bus according to the pinout, CS pin has 10K pullup resistor. Whenever I'm trying to perform any operation, chip is not ...
4
votes
4answers
669 views

5v relay causing short circuit when turned off

I am using an Atmega 1284 microcontroller and four 5v electromechanical relays to turn on/off appliances based on some sensors, time, etc. The ATmega has its own 5v power supply in parallel with an 8v ...
0
votes
2answers
891 views

How good is this crystal oscillator design?

I'm designing an Atmega328P-AU based WiFi development board for my school project, and as you know, crystal oscillators may take some effort to layout, especially when we have a WiFi module. I've ...
0
votes
1answer
738 views

How to convert 5V to 3.3V for all pins of wemos D1 mini when interfacing it with Atmega16?

I am trying to interface Wemos D1 Mini to Atmega16 and have communication between them using TX and RX pins.According to the datasheet, the maximum allowed current for the Wemos mini is 3.3V for all ...
0
votes
1answer
67 views

is it possible to protect workstation by removing VCC connection from workstation to circuit?

I am a newbie to electronics and currently working on my very first electronics project on Atmega16.I want to make sure that no matter how high current is supplied(by mistake), it shouldn't damage my ...
0
votes
1answer
110 views

Atmega128 improper reset

I'm using Atmega128L controller. One of the primary tasks is to control a linear actuator. The actuator supply and controller supply are different(initially it was designed to share a common ground). ...
0
votes
1answer
201 views

How do I use fuse bits on AVR to configure frequency

I compiled a hex file where the controller is supposed to blink 1 time per secound. The frequency was set to 1mHz (it is the internal generator). I programmed an Atmega 8a using avrdude 33 on default ...
2
votes
2answers
144 views

Currect measure through ADC and shunt

I spent some time already and I think I forget about something in my problem. I have a motor, which single phase is R17 = 2 Ohm. I want to measure a current through it's circuit. I used a shunt with ...
0
votes
1answer
136 views

error programing atmega32 lock bits

I am trying to use lock bits for protection on atmega32.I am not being able to write lock bits to it its giving me verification error while doing it.Can you tell me correct way to do this? This is ...
1
vote
1answer
408 views

3.3V interface on arduino is only giving 0.23V

I just received an Arduino ATmega2560 (GEEKCREIT). The 5V interface is giving exactly 5V as expected. But on the 3.3V interface I could only measure 0.23V. What could be wrong?
1
vote
1answer
486 views

Atmega2560 AVCC decoupling

We have designed a custom prototype board based on the Arduino Mega (ATmega2560). Our knowledge on electronics are limited so we assigned someone else to design the board. On his design he used the ...
1
vote
0answers
128 views

Is there any reason some pins don't not work as GPIO on ATmega?

I got an ATmega8515 and this simple code inside main(): void main(void) { DDRD = 0xFF; PORTD = 0xFF; while(1){} } I expect to see all the pins high, ...
2
votes
2answers
191 views

ICSP + SST25VF016B + ATmega2560 Problem

We have designed a board that uses an ATMega2560 and wanted to have the option to do remote firmware updates (it has a Sim800C as well for getting the firmware files). Therefore we've added an ...
1
vote
1answer
99 views

Is there a way to save state in a very low power way?

I basically want to determine if power has been totally disconnected in a low power device I am making that uses an Atmega328 chip. The theory is that when power gets first applied the ATmega will ...
2
votes
1answer
220 views

Comparator/capture miss during RC timing

I've written a capacitance meter for the Arduino Mega platform, which has an ATmega2560 chip. It works using a simple first-order RC charge circuit, and the ATmega's comparator, bandgap ref and time ...
1
vote
1answer
83 views

Irll024N logic level mosfet + atmega 2560 problem

We're designed a circuit based on an atmega2560 and wanted to turn on or off some parts of our pcb. So we've installed an logic level mosfet (IRLL024N) that was supposed to act as a switch on our 5V ...
1
vote
1answer
120 views

How read -8v to +2v using ADC ? which ADC i can use?

input signal is from +2v to -8v whose time stabilization is 3-8 Sec and frequency is varying from 60 Hz to 100 Hz. How i can read that signal, and which ADC i can use ?
1
vote
2answers
384 views

Atmega32 ADC Value not accurate

I was trying to simulate on proteus ADC with potentiometer and get the reading to control dc motor with PWM it's working but the problem is the ADC value not accurate. ADCH reach max value before ...
-4
votes
2answers
95 views

i have a problem with my school project?

i'm working on a school project "Android control a robot car via Bluetooth" with temperature sensor "LM35" , gas detector "MQ-2" ,motor drive IC "l293D" and Bluetooth module "HC-05" using atmega 32 . ...
-7
votes
2answers
89 views

ATmega168 Dimensions

Anyone has the dimensions of the ATmega168? The on-board one, not the through-hole one. I need it, and after searching in the datasheet, I couldn't find it.
-4
votes
2answers
105 views

How do I burn my C program onto my microcontroller (Atmega32) wirelessly? [closed]

My team-member is moving to a different city. So how can he upload his codes, when the board is with me, many kilometers away from him. Is there an option of burning the codes in a wireless-mode? If ...
1
vote
2answers
1k views

Using an AVR Programmer to program the TQFP version of ATMEGA328P [closed]

I am attempting to upload the Arduino bootloader and a program to an ATMEGA328P-AU with an AVR programmer. I have done this before using the Arduino UNO board and and the 28 pin DIP version of the ...
3
votes
1answer
89 views

ATMega128 A/D Floating

I'm working with an ATMega128 micro working with a joystick (pot in the schematic below) that's a .25-4.75V output with a 2ohm output impedance (Joystick Part Number is: ch products ts-2-r-1-u-05-a). ...
0
votes
2answers
629 views

External interrupt on atmega328p

I want to connect 4 push buttons using interrupts on all of them, with my atmega328p, but when i read the datasheet, I found that the atmega328p had only 2 external interrupts ( INT0 and INT1), are ...
1
vote
4answers
647 views

Digital clock by atmega8 with timer1 and LCD display

I have written code to make a digital clock using timer1 and tested with Proteus (an Arduino simulator). That program has been downloaded into an Atmega8 and interfaced to an LCD display. Seconds are ...
1
vote
3answers
1k views

Is ESP8266 an AVR?

AVR is just an integrated circuit microchip, made by Atmel. It looks something like this: (source: https://stackoverflow.com/questions/1447502/whats-the-difference-relationship-between-avr-and-...
1
vote
3answers
397 views

Atmega328p PWM overheating and flickering

I'm trying to build a dimming control for a 24V RGBW-LED strip using potentiometers as analog inputs. It's pretty similar to the analogWrite() example on the arduino website (arduino.cc/en/Reference/...
0
votes
2answers
163 views

Laying out an AVR Board V2

This is an update to my previous board here, which I made after implementing the useful suggestions offered in that post. In the schematic I have added decoupling capacitors, programming header and a ...
1
vote
1answer
110 views

Shared programming pins

Alright so there is a question that I need to ask. I am designing a PCB and I plan to include a ISP header for programming. Now one of the programming pins (PB3 - MOSI) is connected to a push button ...
0
votes
3answers
429 views

PCB Design questions

Ok so I have finished laying out a board. I have an ATMega328P running with a 8MHz crystal. The board has two layers and I have chosen the top layer as the ground plane (GND) and the bottom layer as ...
1
vote
2answers
81 views

Building a clock. Need some guidance

Alright so I learned all the fundamentals of the AVR and now I am thinking of building a clock as a project. I will use the ATMega328P along with the DS1307 RTC. The time will be shown on an LCD or ...
8
votes
2answers
822 views

Need help reverse engineering and understanding a small circuit

I am an electronic student, and one day I opened an energy meter I have at home called EM21, and found out that its body is comprised of two major components: The meter body, that connects to the ...
-2
votes
3answers
191 views

Atmega32A and relay module cant turning water pump on

I have some problem with water pump. So I use atmega32a and 5v relay module to turn water pump on for 5 second, but in reality the water pump can't last for 5 second. Just after water pump goes on, ...
8
votes
7answers
1k views

How to find the UART line is free for send data

I have several boards that communicate together with Rs485. They have ATMega series microcontrollers such as atmega168p or ...
1
vote
3answers
496 views

get dynamic length packet from UART?

I Write a program for receive data from Uart ISI, my Data Packet is something like : 2 first byte contain Device ID and type of command. Data is contain some bytes that could be have different length,...
2
votes
4answers
734 views

Best way to find delay between receive data from USART

I write a code (for Atmega168P) for receive data from USART interrupt as below: ...
1
vote
1answer
1k views

ATmega328p driving RGB LED WS2801

I am using an ATmega328p to control this RGB LED module. The ATmega is on an Arduino Uno, but I am programming it in C, without using the Arduino libraries. To power the RGB module I am also using a ...