Mega Arduino 2560 and Eclipse - c

I have an Arduino Mega 2560. I want to make it communicate with Eclipse in order set a program on it. I have managed to work with Arduino Uno and Arduino Pro Mini until now.
With Arduino Mega 2560, though, I get the error shown on the photo below. I have used at the programmer "Arduino" , "STK500 v2" and "v1" at 57600 and at 115200. I get the error at the photo all the time with Arduino programmer. With STK500, I get an error that says:
Timeout while trying to access AVRdude programmer"
Is there a solution?

AVRdude emits a line like this:
avrdude: Device signature = 0x1e9702
which identifies the device, i.e. the exact type of chip it's connected to (the above is for the ATmega128). Your plug-in is probably not aware of the particular signature emitted for the ATmega2560.
It would be nice if you had included the GUI occluded by the error dialog, where the MCU type is configured ...

Related

MPLAB gives Low power and device failed to connect error when programming pic18f25q10

I am trying to add a simple led application to a PIC18F25Q10 in another circuit using the Curiosity HPC development board. I am using the MCLR, PGD, PGC and GND pins. Although I set the LVP mode to enable in the CONFIG settings and the program speed to low in the project properties, MPLAB " MPLAB has detected that the undervoltage configuration bit on the device is off and you have selected" error output . I also cannot connect to the PIC.
My MPLAB version is 6.5
I am using the X8 compiler (2.40).
I am throwing code with PKoB4.
I checked my circuit connections and confirmed that the MCLR, PGC and PGD pins were correct, but I kept getting errors.
I have done the steps to be applied here, but I have not reached a result. I cannot connect to the PIC.
Connecting to MPLAB PKoB4
Currently loaded versions:
Application version...........00.05.79
Boot version..................01.01.41
Script version................00.05.35
Script build number...........86fedc5c2e
Tool pack version ............1.8.869
Target voltage detected
MPLAB has detected that the low voltage configuration bit on the device is off and you have selected the low voltage programming option on the debug tool's property page. If you wish to use the low voltage programming option you must first do the following:
* Turn off the low voltage programming option on the debug tool's Program Options property page
* Program the low voltage configuration bit to on
* Turn on the low voltage programming option on the debug tool's Program Options property page
Connection Failed.
I checked the forum pages and updated MPLAB and the PKoB4 drivers to test the information that it might be version related, but I could not connect to the PIC.
I used another circuit because I thought there would be a problem with the PIC. I got the same error. I tried to load the code from another computer and I continued to get the same error.
I tried to code with ICD, it codes. However, I could not solve this error on the Curiosity HPC development board. I came across some information in the Curiostiy development board user's guide.
information Image..
I need to be able to connect to the PIC and throw code. I am curious about your thoughts and advice about my problem.
According to the advise of MPLAB your PIC chip has programmed to have LVP disabled. The curiosity boards has a built-in PICKIT which can program only in Low Voltage Programming mode. So you have to do the following steps:
Get a standalone PIC (i.e. PICKIT3) programmer
In config settings of your PIC set the LVP to be on
In MPLAB IDE, File > Project Properties > PICkit 3 > Program Options make sure that Use low voltage programming mode entry option is unchecked
Burn your PIC device with this configuration once using the standalone PICKIT programmer
These steps will prepare your PIC so that it can be programmed in curiosity board. Once you done with all steps correctly, you will be able to burn your programs using your curiosity.
When you program with the built-in programmers, you always wanna make sure that your PIC is programmed before with configuration LVP = ON. And also keep this config bit always ON as long as you keep programming it in a curiosity board.
One more thing to tell, MPLABX is automatically checks the Use low voltage programming mode entry option when you select the Connected Hardware Tool as your curiosity board.
Go ahead and try the steps and then let me know if I could help any further.

Arduino code Wire ported to Atmel Xplained Mini to communicate with DS3231

I am taking Arduino Prototype code used for a DS3231 RTC and taking it to an embedded platform that does not directly support Arduino code (right now that is the Atmel Xplained Mini). Is there a way for me to create an equivalent program without writing an entire I2C protocol and the entire data communication from scratch? There must be an overlapping library/header/code block that I can adapt to my purpose.
As an example I am looking to make the code here work on the Atmel Xplained Board. The code should be pretty simple, what I need is for the DS3231 to tell the MCU the time when it asks for it. I can do the manipulation of the date/time myself, it is getting that information on a non-Arduino platform that is the road block for me.
Arduino has an existing wiring library that facilitates I2C communication, most professional development frameworks aren't quite so simple but are also more full-featured. I'm assuming you are using Atmel Studio, you'll want to look at the TWI (two-wire interface) documentation for doing I2C communication.
AVR315: Using the TWI Module as I2C Master
You can copy TWI_Master.c and TWI_Master.h to your project and use these for I2C communication. That is what I've typically done in the past.
The demo code that goes with this app note can be found here, main.c has an example of the usage of this I2C driver:
AVR315 Demo Code

Arduino uno not uploading

Uploading sketches to my arduino uno worked fine. Now uploading won't work. I get the following error. Is there a way to reset my board? Using the built-in reset button does not help. Error:
Arduino: 1.0.6 (Mac OS X), Board: "Arduino Uno" Binary sketch size: 7,878 bytes (of a 32,256 byte maximum) avrdude: stk500_recv(): programmer is not responding
Please give any information on how to fix or reset the board.
there are many reason and you need to try 2 or 3 different operations in order to understand why avrdude is not responding
First, check serial port on Arduino IDE, then check what kind of board you have selected in IDE.
Have you left some connected on pin 0 or 1 of your board? They are serial TX and RX used by FTDI to write the sketch on your Atmega, I don't know why but sometimes if you left something connected there, you could have some problems during upload.
Hope this will help you!

How can I read in M-bus metering data with an Arduino Uno?

I am trying to send data from a Kamstrup Multical 601 to an Arduino Uno using the M-bus protocol.
I am considering trying to use the libmbus c libraries to do this. However, I do not have a lot of experience in c programming so was wondering if:
you think this is a realistic/achievable approach?
anyone could suggest an alternative/easier approach?
The main chip on the Arduino Uno is the Atmel Atmega382P-PU.
After getting the data to the Arduino I aim to perform some calculations and send data to an LCD (this I think I can do).
On the Arduino Website there is a short how-to about the use of external C-Libraries with Arduino.
Note that you cannot simply connect M-Bus with a RS-232 interface. There is a so called "level-shifter" device necessary inbetween to do the "electrical transition". See the EN 13757-2 standard doucment for what this device is exactly doing with the signal. Without such a device you won't get any word out of your M-Bus device.
The library you link to appears to be for Linux. The Arduino, of course, doesn't run Linux so a library won't compile for it directly.
You should probably try implementing the library yourself, but using the Arduino's standard libraries to access ports and so on.

Arduino computer mouse/input device

I have successfully talked to the computer from an Arduino via serial USB port and I had the idea that I could make a keyboard or mouse with the arduino. Say I wanted to translate the computer's mouse 1 pixel to the left. What message would I have to send over the serial line in order to achieve this?
Google is a wonderful thing. "use arduino as mouse" returns 1.7 million hits. The third hit on the list takes you to the Arduino Playground for an example using the new Leonardo board.
Note:
The Leonardo differs from all preceding boards in that the ATmega32u4 has built-in USB communication, eliminating the need for a secondary processor. This allows the Leonardo to appear to a connected computer as a mouse and keyboard, in addition to a virtual (CDC) serial / COM port.
Assuming you don't have that board, here is another site for some other specific boards and yet another that is log for a project including hardware and software for older boards.
Hope this helps (and is a better answer to the question).
You would have to reconfigure the USB interface chip to appear as a USB HID endpoint.

Resources