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.

2
votes
0answers
40 views

How to upload code to AtMega2560 using JTAG ICE 2.0

Background : I'm used to code in Arduino(Uno, Mega, Esp32, Esp8266). But this time i have to code directly on AVR Atmega 2560 Chip. I have AVR JTAG ICE 2.0 (like this one) and download several ...
2
votes
0answers
95 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'...
2
votes
0answers
126 views

DC motor speed control

I am trying to control the speed of motor using ADC value received using ATMega16, the system works well with 12V. But when I go for 24V the motor runs continuously, even when ADC value is 0. I have ...
2
votes
0answers
160 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 ...
2
votes
0answers
118 views

Sending Serial Data Over FTDI causes loop

I'm trying to send and receive serial data from an atmega328 (using the arduino library) over an FTDI (FT232R) chip. I can send data to my pc and view it in a serial monitor. I can send data from my ...
1
vote
0answers
44 views

AVR SPI stops clocking if the main loop contains a delay

I have a weird issue here using an ATMega48: ...
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 ...
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 ...
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 ...
1
vote
0answers
204 views

Problem with ATmega328P when used with DRV8302 gate driver

I am developing a motor controller for a 48V BLDC motor. For this, I am using the ATmega328P microcontroller in combination with the DRV8302 gate driver from Texas Instruments. It uses a simple ...
1
vote
0answers
217 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 ...
1
vote
0answers
126 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, ...
1
vote
0answers
184 views

Serial Connection ATMEGA328p

I wrote up a function to connect via UART and print a string for debugging purposes. But my logic does not add up somehow... I see the line "Random Number" printed in the console but blazingly fast... ...
1
vote
0answers
745 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
0answers
469 views

Receiving and decoding Manchester code X10

Solved: After much debugging I found out that it was the UART that was not working correctly (not sure why yet) and that port I used to turn on LEDs did not work (PORTC). So there were never any ...
1
vote
0answers
1k views

Atmega328P is not responding in avrdude using usbasp

I have a cheap Chinese USBASP clone and it works fine with my ATtiny13A, but I always get this: ...
1
vote
0answers
135 views

ATmega328P SPI fails to transmit

G'day, I am currently experimenting with the an ATmega328P (on an Arduino, but programmed directly in C without the Arduino libraries) and it's SPI bus for communication with no other devices ...
1
vote
0answers
153 views

Very high frequency out of SPI pin in ATmega16A

I was trying to interface ATmega16A with ENC28J60, and I was facing problems with it, so I decided to physically look at the signals b/w the master µC and the Ethernet chip using an oscilloscope. But ...
1
vote
0answers
378 views

Can't display on LCD with Atmega 328

I tried to display hello world on a 20x4 LCD using Atmega328. But I failed to display any character on the screen. I'm not sure where the problem is, either the initialization or the timing order. I ...
1
vote
0answers
504 views

BH1750FVI with I2C won't work

I have the led driver of Adafruit connected to my atmega32. I adjusted their library for the Arduino, so now I just need a µcontroller and not an Arduino. This thing works. Now I want to control the ...
1
vote
0answers
1k views

Atmega32 can't verify after setting correct fuses for external crystal. HELP

I am having trouble with some Atmega32A's purchased off from eBay. The MCU's does not seem to be fake as they are functioning properly. I am experiencig the following problem: I want to use external ...
1
vote
0answers
473 views

Measuring a 2 cell 18650 battery from ATMega328P

I'm using an ATMega 328P (which will be running arduino code) as part of a project (a bicycle lighting system). It runs off of 2 Li-Ion cells, which both are step-up-regulated to 12V for the lighting, ...
1
vote
0answers
874 views

How to debug error of “unknown type name __progmem__”?

I'm using atmel studio 6.1 with a code containing but on compilation conpiler gives error as mentioned above and after googling error,I found that this variable progmem has been depriciated,but no ...
1
vote
0answers
581 views

ArduinoISP not responding

So I'm trying to upload sketches to an ATmega328 chip via my Arduino as an ISP. I've successfully been able to burn the bootloader, but when I try to upload sketches, I'm presented with this error. <...
1
vote
0answers
392 views

Error reading characters over serial on ATmega8 using CVAVR (USART)

I am trying to program ATmega8 for testing purposes using CVAVR as cross compiler and avrdude GUI as burner. Though I am able to burn the program, I think I am missing something in the coding part. It ...
1
vote
0answers
7k views

How to get rid of “Invalid opcode 0x002A at PC=0x004” in ISIS Proteus?

I have used ATmega 8 and have simulated a circuit to use interrupts, when i give an external interrupt i.e. when a push button is pressed all the LEDs connected to PORTB supposed to be lit up, but i ...
0
votes
0answers
7 views

ATmega2560 I2C (TWI) assembler configuration problems

I am using ATmega2560 for testing an I2C code. I wrote subrutines in assembler for init, start, write, read and stop the I2C setup. The goal is that master writes 11110000 to a slave with address ...
0
votes
0answers
36 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
0
votes
0answers
30 views

What configuration is needed to use an ATMega328p micro-controller on a breadboard

I previously bought an Arduino Uno that came with a store bought/prebuilt PCB and ATMega328p to program it and use the pins. I also have a second ATMega328p that was bought by itself and I ...
0
votes
0answers
36 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 ...
0
votes
0answers
56 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
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. ...
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
0answers
68 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
0answers
270 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
38 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
0answers
137 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 ...
0
votes
0answers
180 views

ATMega168 UART weird characters

I'm learning AVR programming using this book I was able to run and get output using the code provided along with the book. I use Proteus to simulate the output, since I don't have controller in hand. ...
0
votes
0answers
46 views

chaning fuse bytes in stimuli file in atmel studio simulator

I'm writing a stimuli file for debugging a code wrote for atmega168PA. In this stimuli file I want the lower fuse byte to be set automatically so I don't have to do it manually every time. I know that ...
0
votes
0answers
108 views

Trying to control the feild current of a AC generator with a MOSFET transistor and PWM will this work?

Trying to help out a fellow vet. He needs a replacement AVR for a 25KVA 60hz generator. There is a generator output when I flash the field. I am going to monitor the voltage output to control the ...
0
votes
0answers
129 views

PWM ATmega2560, can't start it

I'm trying to start PWM at ATmega2560, but I don't know why isn't working That's what my code looks like: ...
0
votes
0answers
155 views

Not getting stable output out of ADC

I have written a short program to measure the room temperature using a temp sensor, LM335. The power supply is fixed pretty constant at 5.04V. The following code is supposed to print out the second ...
0
votes
0answers
140 views

Microcontroller(Atmega16A) hangs in Stop method while communicating using I2C with Atmega16 and 24LC256

First of all let me say that I am a beginner in embedded programming. I am trying to do write/read using I2C protocol from 24LC256 EEPROM using Atmega16A. While debugging in Atmel Studio 7, I see I ...
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
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
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
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
0answers
156 views

Problems in transmitting over I2C from ATtiny85

I am sending a byte over I2C from a slave ATtiny85. I am testing it using a ATmega328 master. The sequence should be START, SLA+R, ACK, data, NACK, STOP. The code is working only when the sequence is ...
0
votes
0answers
193 views

How much does the clock drift for the Arduino Pro Mini board?

How much does the clock drift (at most) for the Arduino Pro Mini board? I don't need to correct it on the board, just need to know the specifications, such that I can take the necessary precautions ...