Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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
37 views

Failing to Program AT90CAN128

I've made a custom board with an AT90CAN128, and I can't get my USBTinyISP to connect to it. I've verified the programmer is good, as it connects to a 328p and a AT90CAN128 on a dev board fine. I ...
0
votes
0answers
34 views

Cannot Disable AVR ATmega32 Watchdog

I'm writing a code to enable and disable the watchdog timer in ATmega32. I'm using the function in the datasheet that disables the wdt. Also, I'm toggling led in the beginning of the code to know if ...
1
vote
0answers
53 views

Will this LED clock circuit work?

I am making a LED wall clock with an ATmega328P Xplained Mini board, 64 LEDs (4 is for the "main ticks" 15,30,45,60) around the PCB to show the seconds, and a 7 segment 4 digits display to show the ...
0
votes
1answer
53 views

How to detect the phase sequence of a 3-phase ac (R-Y-B or R-B-Y) using Atmega32?

I am using an 8-bit AVR microcontroller in my project to detect the phase sequence of a 3-phase AC supply. Which method shall I use to do the work with the least number of components required along ...
0
votes
0answers
55 views

using multiple shift registers

I am using Atmega128 and 8 shift registers 6D595 the ser_out of each register is connected to the next shift register's ser_in so they form a chain. There is no issue with the hardware it has been ...
0
votes
1answer
26 views

ATMega328P Timer Problem in Proteus

I have an ATMega328P microcontroller, and I'm learning how it is programmed. I wrote an example for Timer0 and uploaded it into the microcontroller. It works and a led blinks once a second in while. ...
0
votes
0answers
13 views

Modify Hex (or svf) File to set Word in Flash (ATMEGA)

I work as a testengineer and I try to manually add a 16bit Word to the Flash of a Atmega16. We don't have the source of the firmware and I programm the firmware over JTAG with a convertet svf file. ...
2
votes
1answer
39 views

ATmega crystal setup and and power routing

I have finished designing my first circuit boards and am uncertain about a couple of things. First of all, I know that I should connect both sets of ground pins and +voltage pins on the chip. My ...
6
votes
2answers
195 views

ATmega328p sine wave generator, frequency capping at 1200Hz

I'm currently implementing sinewave generator on ATmega328p (16MHz). My project is mostly based on this article https://makezine.com/projects/make-35/advanced-arduino-sound-synthesis/. In brief, I ...
0
votes
1answer
134 views

Strain gauge amplifier - so much noise!

I'd like to use atmega328p to read force with strain gauge. I'm using one 1k strain gauge and 3x 1k ohms dummy resistors. My circuit looks like that: I'm using DAC to remove offset from bridge. As ...
0
votes
1answer
80 views

How to control brightness of high power LED with PWM microcontroller (ATMEGA16)

Hi I am entirely new to the PWM concept. I have an AVR based ATMEGA16 microcontroller (https://robokits.co.in/control-boards/rhino-robot-control-board/rhino-robot-control-board-avr-based-with-quick-c-...
0
votes
2answers
55 views

Is my simple atmega2560 based product exempt from EMC testing?

I have designed a product that is essentially a USB HID device for a computer game. It consists of several on off switches and 5v servos run by an atmega2560, all sealed and enclosed in a plastic case....
0
votes
0answers
29 views

Keypad changing ports for usage of Timers

I want to use timers of ATmega 32 ( PD4 and PD5 ) for pwm mean while i'm using Port D for keypad the available ports for me is PA7 and PC7 i want to know how can i change my code of keypad init. ...
0
votes
1answer
53 views

Visualise a bit pattern

My objective is to send a bit pattern of 1000 bits from one microcontroller (PIC or Atmel) to another one using the SPI method. How can I visualize the bit pattern so I can find the errors of ...
0
votes
1answer
59 views

ATMEGA328p-AU BootLoader

I have ATMEGA328P-AU chip, to burn the bootloader I used ARDUINO Uno Board as "ARDUINO as ISP" with setup Board: Nanno. I'm getting the following error. While looking for the solution I got ...
2
votes
0answers
91 views

PWM to synth control voltage improvements

Just built this little circuit to control my Moog Werkstatt. The plan is to make a MIDI-to-CV converter and add more CV outputs and of course a GATE output later. But before going further, I thought I'...
1
vote
1answer
104 views

Voltage detected across Micro USB cable shielding

I designed a Keyboard PCB using an ATmega32U4 with the data lines wired up to a Micro-USB B Receptacle. Brand: Molex; part number: 1050170001. The USB ground is directly connected to the Micro-USB B ...
0
votes
2answers
137 views

Using Arduino Mega as Atmega2560 AVR development board with Atmel Studio 7

(updates at end) Qualifier: I am posting this here and not on the Arduino Stack Exchange because my question is about firmware development and not Arduino development. Project: I am designing a PCB ...
0
votes
3answers
90 views

Disable RC oscillator in ATmega328 for FCC compliance

With respect to the topic below, I was trying to find where in the AVR documentation does it say the 8 MHz RC internal oscillator is "disabled" when CKSEL is selected to a different source? I am ...
1
vote
1answer
78 views

Regulate an RGB LED via PWM, both in brightness and in hue

I am looking to regulate programmatically an RGB LED both in terms of brightness and in terms of hue. So far I have learned that I can use PWM to do this, but I am unsure as to what the details are. I ...
0
votes
0answers
64 views

Microcontroller resets with motor driver (L293D)

I am making a simple robot with 2 BO motors driven by L293D on ATmega328P (took out from Arduino Uno). The robot when tested on Uno works fine. But when I put it on the board that I have designed (as ...
0
votes
1answer
29 views

How to combine 5V-powered ATmega16A and MAX44009? [duplicate]

I'm programming my ATmega16A through LPT port using uisp -dprog=bsd. Although ATmega16A supports \$V_{CC}=2.7\,\mathrm V\,..\,5.5\,\mathrm V\$, to make logical ...
3
votes
4answers
601 views

UART sometimes missing first few characters on ATmega328P

I wrote some code for the ATmega328P, (Packaged in a module that clones the Arduino Nano). Normally when I send UART data from my computer to these micros, it is received just fine. However I have ...
0
votes
2answers
77 views

when DC supply is given to ATmega16 micro-controller, I want it to continue functioning from the same state, from where it was stopped

I am writing my code in BASCOM-AVR. It has 2 if loops and 1 for loop inside the 1st if loop. I will give DC supply to ATmega16 controller. Now, what I want is, if the power is cut off when code is in ...
0
votes
0answers
232 views

Simulating a 7-segment 4 digit display in Proteus using Atmega16

I have an issue about simulating a 7 segment display in Proteus. So basically, I am using an ATmega16 microcontroller along with a ULN2803 transistor array. I connect the 7 segments + decimal point ...
0
votes
0answers
36 views

IC enable pin control with Atmega 328p

I want to control the FP6293 ICs enable pin with the Atmega 328p pin PD5 (configured as digital out). The EN pin (active high) on the IC is rated at max 6V with a minimum HIGH voltage of 0.96V. As the ...
0
votes
1answer
92 views

I can't get WDT (watchdog timer) working on ATmega2560

I have a running application on the ATmega2560 and it is working OK. Now, I wanted to implement Watchdog feature in order to reset the chip when the application takes longer to operate for some reason....
3
votes
3answers
214 views

Choosing the right microcontroller [closed]

How do you choose a micro-controller for your project? My hardware requirements are : I2c SPI ADC channels SMD package 3.3V operating voltage A few GPIOs. There are so many microcontrollers ...
0
votes
2answers
65 views

Atmega328 doesn't respond after power loss while uploading program

While uploading program to atmega328 I accidentally disconnected it from power. After that I get "target doesn't answer" message while trying to upload. I am using USBasp programmer, connections are ...
1
vote
0answers
41 views

Not All I/O Pins Work for Nixie Driver on Arduino MEGA and ATMEGA1284PU

I am tearing my hair out, and help would be immensely appreciated. I am developing a nixie RPN calculator. I am using nixies being driven by K155ID1 nixie drivers, connected to an ATMEGA1284PU. I ...
0
votes
2answers
132 views

Software needed for ATMEL ATMEGA8A-PU microcontroller in Ubuntu 18.04? [duplicate]

A few days ago I discovered a ATMEL ATMEGA8A-PU microcontroller and I wanted to write code on it . But I don't know what software to use in Ubuntu 18.04 for the microcontroller. Can I use the Arduino ...
0
votes
0answers
128 views

Update Mega328 Transistor Tester with Arduino Uno micro controller

I'm trying to update Mega328 Transistor Tester with Arduino Uno micro controller. Here is my Uno and Mega328 connection and Avrdude setting, including particular error: avrdude.exe: verification ...
5
votes
2answers
442 views

Trying a PWM audio application. I can't figure out why I'm getting a loud beep overlapping my sound

I want to play some short audio clips (they range from 50ms to 100ms) from my atmega168 microcontroller and output it to a cheap speaker. I was following this tutorial but because I'm using a ...
1
vote
2answers
89 views

How to correctly send the data I received via I2C over UART?

I am using an atmega328p and writing firmware to display the data I receive via i2c in putty. I read the data I receive as follows: ...
0
votes
1answer
36 views

How To Program Atmega256rfr2 using ISP?

I have a new custom built PCB circuit incorporating an atmega256rfr2 chip. I really can't program the chip using AVRISP MK11 based programmer (Olimex brand). But it can program the Atmega328p DIP chip ...
9
votes
1answer
175 views

Do the new “PB” variants of ATmega have a bug in the brown-out detector?

We've been using ATmega48/88/168/328 microcontrollers successfully for many years in many of our products. We have now considered to switch from the A and PA variants to the new PB variant (because we ...
0
votes
1answer
54 views

.dw directive in AVR assembler

the piece of code below is mentioned in 8-bit AVR's instruction set as an example to explain the LPM instruction. ...
1
vote
1answer
68 views

ATmega328p PIN reading

...
0
votes
1answer
183 views

AVR Can Write I2C, but Fails to Read (Fails to Write Register Address)

I'm using an ATMega328 DIP Package with a TLE493D(A0) (and manual) 3-axis hall effect sensor. I've done successful reads/writes to other I2C devices (AT42QT2120), but I'm having issues with the TLE493....
0
votes
2answers
65 views

Frequencies in atmega (uC)

I want to use an atmega328p with nrf24l01 + wireless module and communicate it with an arduino nano with nrf24l01 +. My question is this, if I use different frequencies in the microcontrollers, will ...
1
vote
0answers
74 views

Can't manipulate array with atmega8

I am quite new to AVR programming and I am currently having some troubles with arrays. I am trying to write an Arduino code that will be run on a Atmega32u4. The goal is to communicate with a AX12-A ...
0
votes
1answer
90 views

Resistor between GND and + 5V in Arduino

I design a board based on ATMEGA328P (as in Arduino UNO). Now I am busy creating a power line. My controller will be installed on the electrical panel, so I need to provide a reliable, noise-resistant ...
0
votes
1answer
92 views

Bit rate of uart communication

I have a setup which communicates between PC(windows) and Atmega2560 using UART. On PC side I am using Pyserial. From the PC I am sending a paragraph of text byte-by-byte to Atmega2560. The UART ...
1
vote
1answer
66 views

Creating chained digital current loop

I need to send some digital data and power for long distance (around 60 meters) using only 3 wires. Data speed is low, something like 100bps is enough, 1000bps would be perfect (12.5Bps and 125Bps). ...
3
votes
1answer
399 views

Using Atmel Studio 7 to program Arduino Uno

I will like to use AS7 IDE to program the Arduino board, for start Im using Arduino UNO with ATMEGA328P-PU chip. Im using Windows 10 professional First I used the Arduino IDE in order to run/...
0
votes
1answer
45 views

Different I/O pins of same PORT of ATMEGA8 not providing exact output [closed]

I have written code to switch ON/OFF some LED light connected different I/O pins of same PORT (i.e PORTD) of atmega8 microcontroller. This process is performed using android app by sending different ...
1
vote
2answers
66 views

SPI between ATmega32 and ATmega328 is not working

I have been trying to accomplish connecting ATmega32 and ATmega328 using SPI Hardware connections: ...
0
votes
1answer
66 views

Have I bricked my ATMEGA3328p by setting

I was playing around with setting the "system clock prescalar" (CLKPR). I'm now in a situation where I can see that the clock is 244.9KHz, using my logic analyser and the "Clock output on PORTB0" ...
0
votes
1answer
74 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
1
vote
2answers
148 views

What is the application of capacitor between Vcc and GND [duplicate]

This is a schematic mo ATmega328P used circuit. It has paralleled two 100nF capacitors between Vcc and GND. (C8 and C9) What is the function of this two capacitors and why they are paralleled?