7

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 source, I do not think it has anything to do with electromagnetic interference. In my experience, the internal pullup is perfectly reliable for reading switches ...


6

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, USB_CONFIG_BUS_POWERED | USB_CONFIG_REMOTE_WAKEUP, USB_CONFIG_POWER_MA(500) } Just change the 500 to something smaller (it has to be an even number). However ...


5

According to ATmega32u4 datasheet, section 17.2.1 (SPI / SS Pin Functionality / Master Mode: If SS is configured as an input, it must be held high to ensure Master SPI operation. In your circuit, SS pin (#8 on package), also labeled as "(SS/PCINT0) PB0", is left unconnected. Is it possible that PB0 is also configured as input somewhere in your program ...


5

The teensy series from pjrc.com allows USB MIDI natively (full USB speed!). It works well and does not require any firmware tomfoolery. It can also do HID keyboard/mouse/joystick natively as well. There's the 2.0, which is 32u4, and the 2.0++ which has more pins and memory. If you want to step off the Atmel reservation the teensy 3.0 and 3.1 have more ...


5

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 power on it, and VCC isolated from it entirely. You need to connect those two nets together - name them both VCC or both +5V so they form a single net (...


5

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) at low voltages. Just as it is written. For example, when the ATmega32U4 runs at 5V, then: VILmax = 0.2 * 5 - 0.1 = 0.9 V. VIHmin = 0.2 * 5 + 0.9 = 1.9 V. ...


4

The Arduino assumes a US keyboard layout. The thing with keyboards is they don't actually send the letters or symbols that are printed on the keys. Instead the send a scan code that defines where on the keyboard the key is. It is then up to the computer to convert those scan codes into actual letters and symbols, and that is performed by the keyboard ...


4

Just had a quick look at the datasheets, and the main difference I see physically is the 32u4 is 44 pin package and the 328 is either 32 or 28 pin. Also the 32U4 seems to have a lot more peripherals. So based on that yes you will have to modify your circuit. Atmel are fairly consistant with ports and what their alternate functions are though. eg SPI on ...


4

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 the absolute minimal number of components, but it seems clear that you don't need more components than a known-working board: 1 ATmega32u4 1 16 MHz crystal 2 ...


3

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: volatile boolean triggered; ISR (ANALOG_COMP_vect) { triggered = true; } void setup () { Serial.begin (115200); Serial.println ("Started."); ...


3

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 crystal for the CPU clock, a few capacitors (load capacitors for the crystal, and decoupling), two 22Ω termination resistors for the USB bus, and a 10KΩ pullup ...


3

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 the ESD protection diode can't take much current and is easy to damage. simulate this circuit – Schematic created using CircuitLab You can prevent it ...


3

"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 would have to connect an ICSP (In-Circuit Serial Programmer) to the correct pins (MOSI, MISO, SCK, RESET, VCC, GND). You can use another Arduino as a ...


3

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 13, onboard led #define INP_PB PB0 // pin 8, antenna void setup(void) { noInterrupts(); PORTB |= 1 << INP_PB; /* pullup */ DDRB |= 1 << ...


3

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: ./hardware/arduino/avr/cores/arduino/USBCore.h Inside that file, at around line 269 (depending on the distribution) you should see these lines: #define D_CONFIG(...


2

Pins 9,10,11 should be working off TIMER 1 which all use the same pre-scaler, so I dont know how 9 and 10 can have one frequency, and 11 have a different frequency. Unless D11 is configured as OC0A instead of OC1C, which means that it will work off timer 0. TCCR0A &= ~(_BV(COM0A1) | _BV(COM0A0)); TCCR1A |= _BV(COM1C1) | _BV(COM1C0); ... OCR1C = ...;


2

If you have an appropriate crystal attached then you can do this in the Arduino IDE. Select your board and programmer in the IDE menu, connect the programmer to the board, and choose Burn Bootloader from the menu. This will both burn the prebuilt bootloader image and set the fuses in a single operation. Note that you cannot use USB on the '32U4 if you are ...


2

You don't "remove" the bootloader, you just ignore it. When you program your new code with the hardware programmer of your choice it will just overwrite the bootloader code with your software's startup code.


2

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, working. You cannot build one for that. A DIY minimalist Arduino requires a running processor - see datasheet for the processor of choice as Ignacio says....


2

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 millisecond. I'm not very familiar with the details of the USB engine on that particular chip, but generally you can detect this as an interrupt, or as a change in ...


2

Assuming you want to require every instance of MenuClass should be associated with a TFT_ILI9163C display object, you could use something like this: // MenuClass.h class TFT_ILI9163C; // declare a class name which is defined in TFT_ILI9163C.h class MenuClass { private: // read-only private member initialized by constructor // (the m_ prefix is ...


2

The bootloader is there for convenience. Yes, you understand what the bootloader does and how it operates. However, you have missed out one benefit, and that is evident when you're not using the bootloader. That is, when you're not using the bootloader the same connection can be used for a serial connection to the PC. If the 32U4 were directly ...


2

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 option too (if the ATTiny85 is). The ATMega32u4 does support USB natively, so this might be better. The ATMega32u4 is the MCU used on the Arduino Leonardo and the ...


2

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 enumeration, they will tell the host that they only consume 100 mA or less, because they have no idea what else you have on the board. ATmega32u4 however can ...


2

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)


2

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 section (3.1, page 8): The AC [Analog Comparator] example project has to be opened from New Example Project option in Atmel Studio. Using the option Atmel ...


2

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 wake up on the first start bit. The startup delay (i.e. time until UART is up and working) may impact the first character received. You could always start off by ...


2

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/libraries/Mouse/src/ And the required changes (to change a wheel parameter for horizontal (h) and vertical (v) scroll parameters were as follows: Mouse.h Change the ...


2

You need a number of things to be true before the (new) bootloader will work: The hardware needs to be wired correctly You have used an appropriate crystal as the clock You have installed the correct bootloader (ie. one for the Atmega32U4) The fuses are set to boot into the bootloader The fuses are set for the correct bootloader size The fuses are set ...


2

You have made an antenna with the 10cm wire and are receiving radio waves which is translating to voltages on your input pin. This is why you don't have the same trouble when the wire is not connected. According to www.csgnetwork.com/freqwavelengthcalc.html your 10cm wire is picking up frequencies of 750 MHz based on a quarter wavelength calculation. The ...


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