Questions tagged [atmega2560]

Low-power 8-bit AVR microcontroller with 256kB flash.

Filter by
Sorted by
Tagged with
1
vote
0answers
47 views

How to wake up Arduino with an rtc?

I am doing a data logger with an Arduino Mega2560 and I want to use a code to make it sleep when no measure is needed and wake it up with an RTC when time comes. The reason I want this is because I ...
0
votes
1answer
27 views

Why is Serial Print causing different behaviour based on where its located

Im trying to test out these two motors I have where I need to call a function from the loop. I only want to call this function once so I made a quick little if statement to have the program only run ...
1
vote
1answer
28 views

Set PWM by period? And have it variable?

In this other stack QA I'm asking about generating a pulse signal with a period ranging from 63 ms to 6.5 ms. There is a popular PWM library however it doesn't compile and also since 63 ...
0
votes
0answers
44 views

OneWire with DS18B20 digital sensor only works on the I2C (20 and 21) pins of my Mega?

I am using an Arduino Mega to read a DS18B20 temperature sensor using the OneWire library in the code below which I got here: #include <OneWire.h> #define DS18S20_Pin 20 //DS18S20 Signal pin ...
0
votes
1answer
29 views

Maximum sampling rate of Arduino Mega2560

I'd like to know what is the maximum sampling rate achievable while using ADC on Arduino Mega2560. Thanks
1
vote
1answer
34 views

Serial Port fails with speeds greater than 19200

In Arduino Mega 2560 R3, properly selecting the Serial Monitor bauds, this code works with #define R 38400, but for some reason, not with #define R 19200 (?), #define R 38400 int rate=R; ...
0
votes
1answer
22 views

Velleman KA02 not working on Mega 2560 r3

I have a Velleman KA02 audio shield. When I use this shield on an Arduino UNO R3 with this sample code, it works. And by "work" I mean when I interact with the Serial Monitor (by pressing Y, for ...
0
votes
0answers
33 views

Programming AFE4404 using Arduino mega2560

I'm facing difficulties programming an AFE4404 using the arduino mega2560. I'm using AFE4404 I2C to program it. I tried most of the code I found online with minor changes to get all the LED and ...
-1
votes
1answer
22 views

Controller freezes

I am using atmega 2560 as main(master) controller and other 5 salve 2 atmega 8 and 3 atmega 328p, there is two device with analogue output connected to main controller atmega 2560 through ads1115 ...
0
votes
1answer
41 views

Rubber keypads and DC motors & LCD on Arduino Mega2560

I'm quite a newbie to Arduino and hardware & circuit board stuff, so please forgive me if you feel my questions are too stupid. Recently, I'm working on an assignment which I have to reconstruct a ...
0
votes
0answers
39 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
1
vote
1answer
50 views

Adafruit Micro-SD breakout not initializing on MEGA 2560

] [I am having quite a bit of trouble trying to get my Arduino MEGA 2560 to read my micro-SD card. My wiring is as follows: Breakout Arduino 5v 5v Gnd Gnd CLK 52 DO ...
0
votes
1answer
36 views

How can i stop DC motor when button on remote is released? [closed]

I am trying to control a motor using a remote with Arduino Mega. The motor turns on when I press the button on the remote but when I release the button, it continues to move. Does anyone know how to ...
0
votes
1answer
66 views

Help understanding how avrdude works with ArduinoISP and why its not working for me

I am trying to use avrdude with a Mega2560 running ArduinoISP Note: I have the 10uF cap on the Mega2560 RESET line as described by Ardunio. Also, I am using avrdude/6.3 on Windows 10. The Mega2560(...
0
votes
0answers
31 views

Min/Max current for supply input of mega2560

What is the min and max current the mega2560 can take for the 5v supply input voltage of the chip itself, not just the arduino mega?
1
vote
1answer
49 views

Switch statement cases not executing

Overview: I am trying to use a switch statement to run different tests. A main menu is displayed on the serial monitor, and then the user is given the option to enter their menu choice in the serial ...
0
votes
0answers
20 views

Arduino Swarm - WiFi and Embedded Communication

I'm developing an Arduino-based swarm, each bot having 1 ATMEGA2560 as its main processor and 1-2 ATMEGA328 as sub-processors and a variety of sensors and actuators, with WiFi (LAN) connection in a ...
0
votes
2answers
50 views

How can I discard power from a device I want to read from?

I want to read the data line from a device that normally interfaces with a controller. It has 3 pins, 3.3v power, gnd, and data. I don't need the power line since the Arduino will be USB powered and I ...
2
votes
1answer
84 views

Ardunio Mega/ATmega2560: Using Port F or K for both analog inputs and digital outputs

On an ATmega2560, can ports have some pins used for analog inputs but others as digtial i/o? Specifically, I only need to use 3-5 analog inputs but have many digital inputs. I would like to use the ...
0
votes
2answers
109 views

Will a 12 VDC 1A Power Supply Adapter supply too much power and damage an Arduino Mega 2560?

The specs shown here: show that it has 54 digital pins with each outputting a DC current of 20mA which makes it 54 * 20 = 1080 mA Plus the DC current of the 3.3V Pin of 30mA we get a total of 1110mA....
1
vote
2answers
61 views

Matrix keyboard and 7segment display countdown combination

I'm working on an escape room for my university with an Arduino Mega. The last part consists of a 7segment display representing a time countdown, and the participants have to introduce the correct ...
0
votes
1answer
52 views

Converting code for ATTINY85 to ATMEGA2560. Pin change interupts

I have code that compiles correctly for an ATTINY85 board using the ARDUINO IDE but I don't have an ATTINY85 board. I have an Arduino Mega ATMEGA2560 and when I select this board in the Arduino IDE ...
0
votes
2answers
574 views

Parse a large json response with ESP8266

I'm doing a project where my Arduino uses an external ESP8266 wifi module (with AT firmware) to send http requests and receive server response. I'm trying to get an NBA scoreboard, and here's what my ...
0
votes
0answers
68 views

EEPROM.read data not comparing with DHT11 sensor value - Arduino temp controller

I'm using a DHT11 to read temperature to control a relay that will control a fan. When 'A' is pressed it allows the user to update the temp value that the relay will go HIGH at. The value is being ...
0
votes
1answer
861 views

How to program the Robotdyn Mega 2560 PRO MINI?

I want to program the Robotdyn Mega 2560 PRO MINI which has no USB port. How do I connect the pins to an FTDI? Which setting do I have to use in the Arduino IDE?
0
votes
0answers
54 views

Sketch works on MEGA 2560 timer2, but does not work on timer1

I set the PWM frequency on MEGA 2560 like this: TCCR2A = 0; TCCR2B = 0; TCNT2 = 0; TCCR2A = _BV(COM2A1) | _BV(COM2B1) | _BV(WGM20); ...
0
votes
2answers
151 views

ATmega 32A and 2560 R3 register to pin mapping?

I've been doing research for the last few hours trying to determine the mapping of physical pins to memory-mapped I/O registers for the Arduino Mega board (which is an ATmega 2560 R3). My code is on ...
1
vote
1answer
509 views

SOLVED: Strange phenomenon with avrdude: stk500v2_ReceiveMessage(): timeout only with ATmega250 on windows 7x64

I know this problem has been reported multiple times but in my case I think there is a different light on it. My desktop is a w7x64 box and I also have a notebook with w10. Both system have the ...
0
votes
1answer
42 views

Arduino Nano, Uno and Mega - XBee connection difference

I have a simple sketch working on arduino Uno and Nano sending data using an XBee. However, if I run the project on an Arduino Mega it does not work. What differences between Uno/Nano and the Mega ...
0
votes
0answers
29 views

Why is arduino Mega2560 taking so much time to recognise the pin is no longer at HIGH? [duplicate]

I am in my first arduino steps. I have a Mega2560R3 I wrote this code const byte D0 = 22; const byte D1 = 24; const byte D2 = 26; const byte D3 = 28; const byte D4 = 30; const byte D5 = 32; const ...
0
votes
0answers
237 views

How to use watchdog timer for the purpose of recovery from failures in Arduino ATmega2560

Here is my tool-set; Visual Studio with plugin called "Visual Micro" Flashing the HEX file using Atmel Studio. via AVRISP mkII on ATmega 2560 MCU And my simple trial code (I have also some others). ...
0
votes
1answer
45 views

Which board's bootloader is on the microcontroller?

Currently I'm doing a project that needs an Atmega2560 standalone MCU. After I burned the bootloader with this method: http://www.gammon.com.au/bootloader . I set the Board as "Arduino/Genuino Mega or ...
0
votes
1answer
114 views

Receiving junk values in Arduino serial monitor console

I want to send a character from a Zigbee transmitter to an Arduino Mega 2560. After the character is received, Arduino should send some data back to Zigbee. But Arduino is always receiving junk values ...
2
votes
1answer
230 views

Trying to run Timer1 in ATmega2560 with assembly

I have a slight problem with Timer1 in arduino (ATmega2560) while coding it in assembly. I try to run the Timer1 in CTC mode - I configure everything well in my opinion, but the TCNT1 just doesn't ...
0
votes
1answer
38 views

What are the negative PINs for on the IndustrialShield M-Duino 58 Analog

I am working as an internship on an Arduino based PLC. It is the M-Duino 58 Analog from IndustrialShields. I try to figure out how it works; Reverse Engineering. But i dont know why it has negative ...
0
votes
2answers
44 views

Read sensor data repeatedly after specified time?

I want to read sensor data using analogRead() after every 5ms. I have read other answers to similar questions but what I'm confused about is: let's say, I made a loop to read sensor data using ...
0
votes
1answer
25 views

Arduino loop over a function is always displaying 0 as final values

I trying to loop over a function in arduino to get values for 2000 times, and then divide it by 2000 to get an average offset: int16_t x_offset = 0; int16_t y_offset = 0; int16_t z_offset = 0; And ...
2
votes
1answer
289 views

Arduino Mega and gyroscope erroneous values

I have Arduino mega2560 and MPU6050. I connected to Vcc pin of the gyro to +5V on the mega, the SDA to SDA pin, SDL to SDL pin, AD0 and GND to 2 GND pins. I used this code: #include<Wire.h> ...
1
vote
1answer
135 views

Using the Arduino compiler, is it possible to use Atmega2560 interrupt pins that are unused by Mega?

Looking into the schematics for the Arduino Mega I noticed that pins PE6 and PE7 are interrupt-enabled (INT6 and INT7 respectively); however, they remain unconnected to any Arduino I/O pin. I'm ...
0
votes
1answer
48 views

attachInterrupt for mega 2560 not triggering

I recently bought a mega 2560 to toy around with as a hobby. It's pretty fun so far, but I've recently gotten stuck while trying to use attachInterrupt with a button. I'm using the CHANGE mode, and ...
1
vote
1answer
118 views

Arduino Mega Pins for SoftwareSerial (vs. AltSoftSerial)

I am currently looking at using an Arduino Mega to build a MIDI Receive box that will then pump the data over USB, but am having design issues/uncertainties with the Arduino's receiving end. I am ...
0
votes
2answers
95 views

Is an atmega 2560 board compatible with the Adafruit Trellis?

I want to build a custom midi controller for my computer, and yes, Adafruit has a mini Untz project. For my purposes, I need more analog inputs than the Leonardo, and the only other option I can find ...
1
vote
1answer
205 views

PROGMEM Corrupted Array

I am trying to store a large number of values into a couple of arrays using PROGMEM, but I am finding that a few of the values are read back corrupted. I am storing just 1s and 0s, but when I read ...
0
votes
0answers
324 views

How to program an SSD1322 display?

I'm new to programming. I would like to change the characters on an SSD1322 OLED display. Here are the photos. Is this possible with an Arduino Uno? Is the program of the display in the display or in ...
-1
votes
2answers
97 views

how can I break from this case by IRremote even if it's not finished yet?

I want to give a pause to case 0xFF02FD or at least to break from that case by entering the case 0xFFA25D even if the 1st case not finished, when I press power button wich has hexa code ( 0xFFA25D) I ...
1
vote
1answer
179 views

Confusion over Transistors for a switching circuit with an Arduino Mega 2560

Apologies if this is a stupid question asked by a noob, but I've looked around to try and find the answer and just can't work it out. Basically, I'm making a project on thingiverse (Glitch's MK2 ...
0
votes
2answers
126 views

Meaning of part number suffix on top of atmega2560 chip

I have been working on creating a stand alone atmega2560 arduino. When trying to program it with a serial adapter using the rx and tx pins nothing was happening. After a lot of debugging I found the ...
0
votes
2answers
368 views

ATmega 2560 with Arduino bootloader running issue

I have designed a board based on an ATmega2560 chip and I burned the bootloader by following this tutorial. Now I am able to load Blinky and other programs using an FTDI cable. But the issue I am ...
2
votes
3answers
130 views

Conditional randomization gets stuck

First-time poster here... I have the following code to randomize note values and store them in an array loop1[i], where i is a specific step in the loop: nextNote = random(-2, 3); note = note + ...
0
votes
1answer
579 views

Uploading code to Mega 2560 is stuck

I'm trying to upload code from a Mac (online Arduino editor) onto an Arduino Mega2560, to connect a motor to pin 52 and Ground to get it to move. But at the top it says busy (like it does when it ...