Questions tagged [atmega]
The atmega tag has no summary.
23 questions
0
votes
0
answers
74
views
ASync Timer2 based OSCCAL value
How to calibrate the internal RC oscillator off of a 32768 Hz crystal serving Timer2?
void OSCCAL_calibrate(void) //This version specific to ATmegaXX8 (tested with ATmega328)
{
unsigned char ...
0
votes
1
answer
270
views
Questions about ATMega8A including burning my hex files
I wrote a small blink program for an ATMega8U-DIP I bought recently. The source is this,
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <util/delay.h>
int main(...
0
votes
2
answers
83
views
I need help with code with two IR sensors using ATMega16
I'm working on a ball-counting project using two IR sensors to detect balls entering and exiting a room, but I'm currently stuck. I need help refining the logic in my while loop. Here's how I want it ...
1
vote
0
answers
42
views
Mirroring PWM input on a pin + Motor Encoder
I am interested in hooking up a nano to an RC receiver. I want the nano to mirror the PWM input and output on another pin when a specific command is given via serial. I also want to send the received ...
1
vote
1
answer
376
views
How to write single binary code to output pin
I am relatively new to arduino and coding in general and im just looking for a code to write a single string of binary code e.g.; "01000111101"
To a specified output pin instead of copying ...
2
votes
1
answer
284
views
How does the compiler/assembler work wrt bootloader?
I realized that on the atmega boards the bootloader is programmed into the chip.
I'm curious, when compiling a sketch how does the compiler/assembler differ from compiling a standard C program for a ...
0
votes
1
answer
235
views
Error while burning bootloader onto ATMega-8A using Arduino Mega 2560: avrdude: invalid byte value
So, I'm trying to burn the bootloader onto an ATMega 8A with an Arduino Mega 2560 as ISP.
I made the necessary connections, and got this error:
C:\Program Files (x86)\Arduino\hardware/tools/avr/bin/...
0
votes
1
answer
137
views
Will the atmega8-U2 work with Arduino IDE
I use a homemade board that hosts a PIC16F1829 and an ATmega328P on the same board. We use the ATmega328P with the Arduino IDE and the PIC with the MPLABX IDE for about 100 EE students a semester at ...
1
vote
2
answers
115
views
Can we use more than one timer when programming an Atmega32/16?
I tried to do a simple program using the ATmega16 microcontroller, the program is to toggle two LEDs the first one by using timer0 interrupt and the other using timer2 interrupt.
1
vote
1
answer
443
views
Can't burn fuse bits on ATMega168 with Arduino Uno as ISP
I have an ATMega168 that I am programming via my Arduino Uno as ISP. I can burn the bootloader and transfer a hex file just fine, but I can't seem to be able to change the fuse bits. I found a lot of ...
1
vote
0
answers
1k
views
I2C / TWI: set up atmega328p as slave
I try to run an atmega328p as a i2c slave. even with the bare minimum the slave acts as its not wired at all: NACK is transmitted after request (see logic analyzer).
The master should read a constant ...
0
votes
2
answers
1k
views
Where is the Arduino IDE boards.txt file for Nano Every located?
My Arduino Nano Every runs at 16Mhz (but the 4809 can support internal 20Mhz).
I know it may be possible to alter the boards.txt file and set it to build for 20Mhz.
However, I can't find the boards....
2
votes
1
answer
1k
views
ATMega4809 via Nano Every marked as 20Mhz, but does this confirm it is actually at 16Mhz?
If you go to the official Arduino Nano Every page and click the Tech Specs tab, you'll see that it lists it as running at 20Mhz.
Turn On Verbose Compile
However, if you go into the Arduino IDE and go ...
0
votes
1
answer
75
views
Is it possible to use the same power source for the arduino and a high current
I've need to control some leds which draw 300mA with an arduino (actually an atmega) and after some searching I think the following is the circuit I need, but I'm not really sure if the power source ...
1
vote
1
answer
813
views
Arduino Nano Every I2C PORTMUX
Arduino Nano Every schematic informs us that we can use ATMega4809's pins PF03 and PF02 to communicate via I2C.
ATMega4809 manual says in page 19 that in order to use those pins as I2C we need to use ...
2
votes
0
answers
255
views
TFT Screen & ATMEGA168
I have a Arduinio nano and a ATMEGA168. I'm using the ST7789 library. The sample code which comes with the library runs perfectly and runs the display when using the Nano, but the same code does ...
1
vote
1
answer
1k
views
WS2812B Reset time
i am trying to implement the ws2812b with an atmega8,but i didn't understand a thing very well. if i pull low for >50 us, it says it resets, but what does that mean? it resets the current LED all ...
1
vote
1
answer
1k
views
Nano Every clone with ATMega4808 not recognized
I've bought an Arduino Nano Every clone/compatible (not a standard Nano V3) that uses an ATMega4808 instead of the ATMega4809 the official Nano Every uses. This rather insignificant change of chip is ...
1
vote
1
answer
88
views
About maximum length of matrix can be use for matrix invertsion on atmega32
what is the maximum length for matrix can be used for matrix inversion on atmega32,for example,can we implement matrix inversion for 15x15 matrix on atmega32? And if it can be done on atmega32..does ...
0
votes
1
answer
620
views
Atmega32A fuses
I have Atmega32A and 16 MHz quartz, with 22pF capacitors. Tell me, please, how to set the fuses correctly so that the MK works from external quartz.
Will MK work when setting 0xFF LOW and 0xD8 HIGH? ...
1
vote
1
answer
1k
views
Connect multiple pins to same VCC using breadboard
Ok so I am pretty green as far as AVR programming is concerned so bear with me.
I am doing a project with an ATmega32 MCU on a dev board which has 4 VCC pins.
The project includes a GPS, SD card and ...
1
vote
0
answers
447
views
Radio receiver: deep sleep when no byte arrives, and wake up when a byte arrives?
This code works to listen for bytes via radio (with a 433 Mhz receiver module) with the Manchester library and Manchester code, and do an action when certain bytes are received:
#include "Manchester....
3
votes
1
answer
993
views
Cannot set MOSI pin low even after ending SPI
I'm building a battery operated device and must shutoff MOSI pin during sleep because it leaks current through the SD card if I don't (about 400 µA).
Problem is, it won't stay off. I've looked at ...