6 votes

Arduino Leonardo as keyboard for an iPad

If indeed the descriptor is the problem then yes you can change it. In the core file USBCore.h is the line: #define D_CONFIG(_totalLength,_interfaces) \ { 9, 2, _totalLength,_interfaces, 1, 0, ...
Majenko's user avatar
  • 105k
6 votes
Accepted

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

did somebody come across such case, or I'm the first in the world? You are not the first. I recently got bitten by the very same issue. However, unless you are close to an unusually strong radio ...
Edgar Bonet's user avatar
  • 43.1k
5 votes
Accepted

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

ADDEN of UDADDR is set if the '32U4 has been assigned a USB address by the host and the firmware wants to enable USB connectivity. UDADDR & _BV(ADDEN)
Ignacio Vazquez-Abrams's user avatar
5 votes

Atmega32u4 issue

You have an error in your schematic. You have used the net name VCC for your main power circuit. However your USB incoming power is labelled as +5V. That means you have two separate nets - +5V with ...
Majenko's user avatar
  • 105k
5 votes
Accepted

Digital I/O threshold voltages for ATmega32u4

LVTTL is Low Voltage Transistor-Transistor Logic. In general, the term "TTL" is used for a digital signal. The "Low Voltage" part is special, the ATmega32U4 switches from low to high (and vice versa) ...
Jot's user avatar
  • 3,246
5 votes

Is it possible to upload an arduino sketch through the serial port (RX) instead of USB

No need to have a specific bootloader. The basic bootloader can do that (in Arduino that's the case so I hope this answer will apply in your case. But if not, the principle is certainly the same). ...
Peter's user avatar
  • 355
4 votes
Accepted

Minimal Arduino using ATmega32U4

Several Arduinos and Arduino-compatible boards use the ATmega32U4. Many of them have published open-source plans that show exactly what components are used and how they are connected. They may not be ...
David Cary's user avatar
  • 1,112
3 votes
Accepted

Burning the Bootloader on Adafruit Feather 32u4

"Burn Bootloader" only works if you have a programmer connected to the device. The onboard bootloader in your Feather cannot change the fuses, even though the process may indicate it has done so. You ...
jose can u c's user avatar
  • 6,974
3 votes
Accepted

Analog input draws current when Arduino is turned off

Yes, it is normal behaviour, and it's called back-powering. The current is flowing into the input pin and then flowing up through the ESD protection diode inside the chip to VCC. It's bad, because ...
Majenko's user avatar
  • 105k
3 votes
Accepted

What to do after prototyping?

Yes, your thinking is pretty much correct. You can place an ATMega32U4 chip and the associated required circuitry within your own circuit design. The required circuitry is actually quite simple - a ...
Majenko's user avatar
  • 105k
3 votes

Library to set internal analog gain of the Arduino?

I would recommend you to check Nick Gammon's example on using the analog comparator by means of configuring the relevant flag bits of registers in the ATmega328. Sample code from the link, by Nick: ...
Enric Blanco's user avatar
  • 2,114
3 votes

Suddently, "avrdude: Device signature = 0x000000" with ArduinoISP. Is my chip dead?

Mostly this error is due to connections/powering issues (as already mentioned in your output ). Check connections, especially power and ground also check the resistance between Vcc and GND of your ...
paulplusx's user avatar
  • 171
3 votes

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

A test with an Arduino Uno. I used the usb connector to power-on the arduino uno. The led is at PB5, so I have exchanged PB0 and PB5. My test is therefor not the same. #define LED_PB PB5 // pin ...
Jot's user avatar
  • 3,246
3 votes
Accepted

Arduino Micro draws too much power from iPhone. How can I change that?

The power consumption is part of the exchange with the PC when it is plugged in. You can change that. Find the file USBCore.h in your Arduino install directory. In my case (under Linux) it was: ./...
Nick Gammon's user avatar
  • 38.2k
3 votes

What is difference between ATMEGA32 and ATMEGA328?

I can't post comments. One difference is that the ATmega32 has JTAG; ATmega328P has not.
AsmUno's user avatar
  • 31
3 votes
Accepted

Is there a way to get about a 10ns Timer resolution from an AVR CPU?

There is nothing you can do on the AVR processors that I know of, which can run on from a quite slow clock, and I think up to 24 MHz. Since your Uno / Leonardo / Micro run at 16 MHz that would be only ...
Nick Gammon's user avatar
  • 38.2k
3 votes

Is there a way to get about a 10ns Timer resolution from an AVR CPU?

1 ns is a billionth of a second. A 1 gHz clock has a cycle time of 1 ns. If you have a timer that's able to count single clock pulses you'd need a 1 gHz clock to get to 1 ns resolution. for 10 ns, you'...
Duncan C's user avatar
  • 5,682
3 votes
Accepted

Send custom HID values instead of keys

HID is a strange beast to get your head around. It operates by way of "Report Descriptors". These are "maps" that lay out what the values you send mean. It's these descriptors that ...
Majenko's user avatar
  • 105k
3 votes

Using Keyboard library for ISO-UK layout

The USB keyboard protocol has no concept of characters. It doesn't know and doesn't care what character a key represents. Instead each code represents the location of the key on the keyboard, and it's ...
Majenko's user avatar
  • 105k
3 votes
Accepted

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

I imagine (haven't really tried it) this would work, with some minor adaptation to match your code structure. // VBUS or counting frames // Any frame counting? u8 USBConnected() { u8 f = UDFNUML;...
Shreyas Murali's user avatar
3 votes
Accepted

Is it possible to remove the bootloader while flashing using the bootloader?

If you don't play around ISP programming and have not already been playing around with ISP programming, your bootloader is fine and will remain fine no matter what you try to upload. The bootloader ...
timemage's user avatar
  • 5,231
2 votes

Minimal Arduino using ATmega32U4

Building your own may be worthwhile from a learning point of view, but makes minimal sense otherwise. You can buy Arduino clones (legal) from China for under $US5 each - good enough quality, assembled,...
Russell McMahon's user avatar
2 votes

Listen for USB "TX signal received" response on RX

If an MCU which has a built in USB interface (such as the ATmega32u4 on a Leondardo) is properly configured and connected to an operating USB host, it will receive a "Start of Frame" packet every ...
Chris Stratton's user avatar
2 votes

Programming Arduino Micro via RX/TX

RS-232 logic uses a negative voltage typically from -3 to -25V to represent a logical high and a positive +3 to +25V to represent a low. On the flip side TTL used on the AtMega uses +5V or +3.3V as a ...
Mariano Elia's user avatar
2 votes

High power consumption of ATmega32u4 when connected to iOS device

The major difference between ATmega32u4 and ATmega328 is that the former has USB functionality built in, while the latter requires an external USB to UART chip. When such UART chips go through ...
Dmitry Grigoryev's user avatar
2 votes

Library to set internal analog gain of the Arduino?

You seem to be interested mainly in ATSAMD21. There is an application note from Atmel, AT11480: Analog Comparator Application Examples, which may be of interest for you. From the Getting started ...
Enric Blanco's user avatar
  • 2,114
2 votes

Microcontrollers with built in HID support

The ATTiny85 doesn't support USB. You can bitbang USB using the V-USB library. Kind of a hack, but it does work. An ATMega328 (used on the UNO) can do the same thing. So the ATMega328 would be an ...
Gerben's user avatar
  • 11.3k
2 votes

Can the Mouse library scroll horizontally?

As suggested in the comments, I edited the core libraries to achieve this. I'm using PlatformIO, so the library files I needed to edit were here: ~/.platformio/packages/framework-arduinoavr/...
Ian Mackinnon's user avatar
2 votes
Accepted

Arduino with ATmega32U4 low power but keep Serial1 working

For Power Down/Standby Mode you would have to use an Interrupt Pin to reactive the MCU. If you do not mind possible loss of the first character you could connect an Interrupt Pin to Serial1 RX and ...
Mikael Patel's user avatar
  • 7,969
2 votes
Accepted

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

On the schematic of the Sparkfun Pro Micro 3.3V/8 Mhz (here) a resonator of 16 MHz is drawn. But also is stated there: "Board is marked with combination of resonator frequency and regulator voltage". ...
PimV's user avatar
  • 443

Only top scored, non community-wiki answers of a minimum length are eligible