New answers tagged

0

The first issue might be in Upload log. There is mentioned programmer = arduino (in version before edit). That means you might be uploading code into the wrong Arduino. So there is no ArduinoISP sketch and it won't work (getsync() errors) Check if the upload is working between two arduinos, that should opted out wrong wiring on the programmer side and so on....


1

The ATmega328 does not have any native USB capability, so there is nowhere appropriate to connect D+/D- to the ATmega328. Assuming you are emulating an Arduino Uno, then something like this: https://www.jaycar.com.au/arduino-compatible-usb-to-serial-adaptor-module/p/XC4464 is what will come closest to mimicking the USB function on an Uno (ie a serial ...


2

You can reuse everything what is not damaged, but it can be tricky to properly desolder multi-pin SMD parts. It's hard to verify if a processor is still working, but it propably is not anymore if you applied a too high voltage on one of the input pins or drew to much current. Parts like regulators are always handy. I would skip capacitors and resistors. ...


1

I cannot tell for sure, but from a cursory look at the datasheets, the ATmega32 looks older: 16 MHz maximum frequency v.s. 20 MHz for the ATmega328 4.5 V minimum supply voltage v.s; 1.8 V for the ATmega328 only one PWN channel per 8-bit timer From an Arduino-programming point of view, I would prefer the 328, as it would allow you to prototype your code on ...


0

To answer this you'd need to study the according data sheets: ATmega32 ATmega32u4 ATmega328 ATmega328P ATmega328PB Despite a similar name, the chips are quite different. 32u4 for examle has USB built in. 328PB has more 16-bit Timer/Counters. ... and many more differences. They only differ on the hardware features and can be programmed in more or less the ...


0

Just a theory for 2: The text that shows up in the Tools > Port list after the COMx eg Tools -> Port -> COM3(Arduino Mega or Mega 2560) is simply what the IDE thinks the board is based on the USB ID (VID/PID) of the board's USB interface chip. For some clones, this is blank because they don't even use the same chip as an authentic Uno. In your case, ...


2

A CPU or MCU uses very basic instructions which are executed. If you write code in a program language (like in Arduino IDE), the sketch is converted into many instructions (by the compiler and linker). The instruction set can be found here. An example is: ADC Rd, Rr: Adds two registers and the contents of the C flag and places the result in the ...


3

ATTINY's are designed to easily do this since they can wake from power down sleep mode by a pin change... Basically you want to... Connect a normally-open push button between an IO pin and ground. Enable the pull-up on the IO. Enable the pin change interrupt on the IO pin. Enable interrupts. Enter "power down" sleep mode. When the button is pushed, it ...


0

First I was unable to make the intterupt work for multiple pins, but finally here is a working code: #include <avr/interrupt.h> #include <avr/sleep.h> ISR(PCINT0_vect) { if (digitalRead(0) == LOW) # PB0 = pin 5 pressed => LED on digitalWrite(4, HIGH); else if (digitalRead(1) == LOW) # PB1 = pin 6 pressed => LED ...


Top 50 recent answers are included