Questions tagged [atmega32u4]

atmega32u4 is low-power Atmel 8-bit AVR RISC-based microcontroller

The low-power Atmel 8-bit AVR RISC-based microcontroller featuring 32KB self-programming flash program memory, 2.5KB SRAM, 1KB EEPROM, USB 2.0 full-speed/low speed device, 12-channel 10-bit A/D-converter, and JTAG interface for on-chip-debug. The device achieves up to 16 MIPS throughput at 16 MHz. 2.7 - 5.5 Volt operation.

By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, allowing you to optimize power consumption versus processing speed.

Key Parameters Parameter Value

Flash (kBytes):32 kBytes

Pin Count:44

Max. Operating Freq. (MHz):16 MHz

CPU:8-bit AVR

Hardware QTouch Acquisition:No

Max I/O Pins:26

Ext Interrupts:13

USB Transceiver:1

USB Speed:Full Speed

107 questions
5
votes
4 answers

Where in datasheet is the warning about unreliability of reading PINxn?

I use atmega32u4 (but believe it applies to all models). Here is the datasheet. Consider the following C program (I use AVR-GCC 5.4.0): #include int main(void) { PORTB |= 1 << PB5; /* pullup */ DDRB |= 1 << PB0; /* LED */ if (!(PINB…
5
votes
4 answers

Library to set internal analog gain of the Arduino?

My original question was if there is a library that covers the internal comparator and differential and gain modes for the Arduino Uno, Mega 2560, Leonardo, Due, Zero, M0. The answer is obvious: "No". To my surprise there is not even a start to make…
Jot
  • 3,276
  • 1
  • 14
  • 21
5
votes
1 answer

Basic C++ programming, how to pass constructor argument into class?

I'm having some programming problems. So here's what's happening: In my .ino file, I have a tft variable which holds the connection to a LCD. I want to make a class which can either automatically access that tft class contained in the .ino, or pass…
vxcheese
  • 51
  • 1
  • 2
5
votes
1 answer

Remove Bootloader on Arduinos

I am trying to move from arduinos to AVR C. Would somebody know how to remove the arduino bootloader from the microcontroller? Is there a different process for the different atmega microcontrollers like the 32u4, 328, or 2560? Thanks.
Naan
  • 73
  • 6
4
votes
1 answer

It is possible to revive my Arduino Leonardo (mini beetle) board?

I have this board: It has the atmega32u4 chip. I have updated its code several times, and used it without issues for several months. Today, while updating (using Arduino IDE) it started to throw some errors. At the end it said that the checksum…
lepe
  • 141
  • 4
4
votes
1 answer

Arduino Leonardo(Atmega32u4) - Detecting if USB is connected to a computer?

The closest thing I can find is if(Serial) but that only returns true if there's a serial port open. The function I want, ideally, should: Return true if plugged into a computer Return false if plugged into a USB power bank Return false if not…
Stephen
  • 43
  • 3
3
votes
1 answer

Alerting the ATMega32u4 that it's plugged into a computer (via USB)

I need help in writing some code that will allow for the ATMega32u4 to be aware of when it's plugged into a USB port. I'm not really familiar with the ATMega32 or with it's function in Arduino, so I'm lost in the dark on this one. Update: So in my…
Jay
  • 135
  • 1
  • 6
3
votes
2 answers

Can I use arduino pro micro rx tx as digital pins

I'm using arduino pro micro Atmega32u4 5v 16Mhz I want to use it to make a HID Keyboard and Mouse but I ran out of pins so I was wondering if I can use the RX and TX pins as digital input pins. Will it work? Will it affect the communication of the…
Keima-kun
  • 31
  • 1
  • 3
3
votes
1 answer

Red LED not turning off on Adafruit Circuit Playground Classic

When using the traditional Blink example program, the light blinks as expected. Even when writing from scratch digitalWriteing pin 13 to high and low repeatedly works fine. The problem is when I try to use CircuitPlayground.redLED(false). That has…
Daffy
  • 141
  • 4
3
votes
1 answer

Digital I/O threshold voltages for ATmega32u4

What are the voltages on a ATmega32u4 (eg Arduino Leonardo) such that a HIGH or LOW is read? I want to ensure that I'm reading the chip reference manual correctly, where Table 29-1 says: VIL: Input Low Voltage, Except XTAL1 and Reset pin Min:…
Tom Hale
  • 431
  • 6
  • 19
3
votes
1 answer

Atmega32u4 issue

I made a custom ATmega32u4 board for my project. Components came from clone of Arduino Pro Micro (with bootloader and code which I uploaded) from AliExpress. I soldered everything in to my board according to my schematic but the board doesn't work.…
Muzykk
  • 31
  • 2
3
votes
1 answer

Does the Arduino pro-micro 3.3v use an 8MHz crystal or a 16MHz crystal with a clock divisor of 2?

I am trying to convert some 5v Leonardo-compatible boards to run at a lower 3-3.7v voltage, so that I can power my project using LiPo batteries. As far as I can tell, the default Leonardo settings (and pro-micro settings) will not run at this…
MRule
  • 133
  • 4
3
votes
3 answers

Arduino Leonardo as keyboard for an iPad

I'm trying to make a Arduino Leonardo as a Keyboard for an iPad. I was successful with an Arduino UNO. However I'm hoping to use an ATmega 32U4 because of the better HID functionalities and smaller boards like the Beetle. The problem I'm having is…
fsaint
  • 81
  • 5
3
votes
1 answer

Custom board with ATMega32u4 having USB issues

I built a custom arduino based board (speciffically based off of Sparkfun's Pro Micro 3.3V 8Mhz and their Qduino mini boards) that uses the ATMega32u4-RC. The board I built integrated an acceleromter (LSM6DS3) and a micro-SD card holder, and…
user29032
  • 149
  • 5
3
votes
2 answers

Minimal Arduino using ATmega32U4

I am a newbie and I would like to build my own minimalistic ATmega32U4 based arduino compatible board. Can anyone please tell me which parts resistors/capacitors (and maybe one status led) I need to connect it over usb to my computer? Thanks in…
Chris
  • 35
  • 1
  • 3
1
2 3 4 5 6 7 8