Questions tagged [atmega]

23 questions
3
votes
1 answer

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 SPI documentation and as far as I know I just need…
DatuPuti
  • 151
  • 6
2
votes
1 answer

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 chip without a bootloader? Is there still a main?…
FourierFlux
  • 161
  • 3
2
votes
1 answer

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 to File...Preferences... and turn on the Show…
raddevus
  • 442
  • 3
  • 19
2
votes
0 answers

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 nothing on the ATMEGA168. I'm using the official pin…
Rick Dearman
  • 163
  • 5
1
vote
0 answers

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 command via serial to a computer(Pi or Jetson) at…
FourierFlux
  • 161
  • 3
1
vote
1 answer

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 and pasting "Digital write (high) Digital write…
1
vote
2 answers

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

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 people having similar problems, but most still…
1
vote
0 answers

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 value in this example. iam using the wire.h lib.…
micro_
  • 21
  • 6
1
vote
1 answer

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 PORTMUX. I'm not really an expert and I don't…
Miguel
  • 209
  • 2
  • 11
1
vote
1 answer

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 data to 0 and latches the next data to the next led?
SoxxZ _
  • 13
  • 3
1
vote
1 answer

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 detected by the Arduino IDE (v. 1.8.13) which…
1
vote
1 answer

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 this will make the atmega32 to be slower? I want…
user255471
  • 11
  • 2
1
vote
1 answer

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 a TFT display. Currently, the GPS and SD card take…
Machi
  • 13
  • 3
1
vote
0 answers

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.h" void setup() { pinMode(3, INPUT); …
Basj
  • 449
  • 2
  • 9
  • 23
1
2