Error message in AVR studio4 - microcontroller

I have recently purchased an AVR USB programmer from robokits.co.in, was trying to program atmeg8 using AVR studio4 and I get the following when I click on the program options:
a problem occurred when executing the command. make sure u are using
the correct programming method. current mode is ISP verify that the
device is placed in the correct socket, and that the ISP cable is
connected properly.check that the programming frequency specified in
the main page is well below 1/4th of the clock frequency of the
device.
I have tried all that I could think of, I have checked the connections and the freq is below 1/4th of the device.
But that doesn't solve this problem.
I have made the circuit for blinking LEDs program.
See the image for details

Double check that the jumpers on the programming board that you are using (if you are) are set correctly.

Well this is hardly the venue to trouble shoot different hardware issues.
So if you think there is an issue with the programmer, contact www.robokits.com.
I would start with contacting robokits.
Since you can't even enter the programming mode, you can ignore your source code.
You should be able to verify fuses/lock bits w/o programming any code into the Mega8.
To give you a head start before you contact robokits:
1. Verify the programmer is properly installed on your computer following robokits instructions.
2. Verify the +5Vdc on Pins 20 & 7 of the Mega8
3. Verify Pins 22 & 8 are grounded properly.
4. Verify that Pin 1 is pulled up to +5Vdc (when the programmer is not connected)
Pin 1 should be pulled down by the programmer when it attempts to connect to the Mega8
5. Double check all the connections between the programmer to your target. Since the programmer is a 10 pin IDC and the test circuit has an in-line style connector you must have an IDC cable that has been broken out, stripped and connected to the test circuit.

Is the Target "fresh"? i.e. Never been programmed? Regardless: have you tried more than one?
Do you have any power being applied to the ISP header (target) prior to connecting the programmer?
You may also want to verify there are no shorts on your Target pulling the ISP Supply down, see the pinout link below.
If your jumper settings are USB-HID and Slow SCK == open && ISP Supply == short then you shouldn't supply and power to the ISP connection from the target.
If you are not supplying and voltage to the ISP header, maybe you should try that. Remove the ISP Supply jumper and apply 5V from your target application's supply to the ISP interface:
AVR ISP Pinout
Pin 2 on the ISP interface should be +5Vdc in reference to Pin 10 (gnd)

When I got a similar message while programming other Atmel integrated circuits I enabled the "Use external reset" setting that exists in the GUI of AVR Studio 4 (was removed in 5 and returned in Atmel Studio 6).
I am not sure if that option exists or does anything with your programmer since I have never used it.

Related

Serial Port not working on Surface Book

I have a Microsoft Surface Book that I've dual booted Linux Mint on. I'm writing a program that needs to read in data from a serial port, but my serial ports don't seem to be working. The behavior is consistent across Mint and Windows (Testing done through Cygwin). It gets a bit of data the first 2-5 seconds that the device is plugged in (viewing the data through screen, same thing happens if I just use pyserial to print data incoming from serial port), then nothing.
What could be happening? I think I've isolated the problem to the serial ports - the Surface Book has 2 USB ports and the same thing happens on both of them, and I've tested the hardware that I'm plugging into it on 2 other computers (One Linux and one Mac OS), and it works fine on both of those.
Your MS Surface, seemingly, has a yellow triangle exclamation mark icon (over the adapter icon) without any driver to install/download. And properties in the device status box window say This device cannot start. (Code 10) or A device which does not exist was specified. Right?
If it's so you should wait for an update from MS. It's notorious problem.
I ended up getting the computer replaced on warranty for an unrelated issue months later, and what do you know, on the new computer the serial ports work fine. That indicates to me some sort of hardware problem, given that the issue persisted across OS's.
maybe this will help:
see Arduino examples for serial port communication - search google:
arduino serial c++
arduino serial c#
arduino serial c++ linux
the point is to open port properly you need to open a file, not a port. not with usual c - assembly write to port code.
another option you are using an unintentionally bought fake USB to serial cable with a Fake PL2303 chip
then you need to install the old version of the driver.
search in google:
Fake PL2303 + your os name:
install driver Fake PL2303 windows 10
another option is maybe it conserves energy and closes the port because it feels it is unused.
in windows> device manager,> properties of a device - usually USB root hub > power management - allow the computer to turn off this device to save power - uncheck it.
https://superuser.com/questions/408683/why-my-usb-mouse-gets-suspended-after-3-seconds-of-inactivity
https://blogs.msdn.microsoft.com/usbcoreblog/2013/11/08/help-after-installing-windows-8-1-my-usb-device-doesnt-charge-or-it-disconnects-and-reconnects-frequently/
also, you could look in windows events - to see what happens. usually, failures like this are registered in the events log.
an unlikely option is it consumes too much current, like a short circuit. and the device protection circuit shuts the chip off. also probably it does not have such circuit. one possibility is to try with an external powered hub.
the most probable of these is the power saving mechanism
I was experiencing the same problem - came across the solution on another site. The USB 3 ports on Surface Book aren't compatible with something or other to do with Com Port but running the device through a cheap USB hub solved my problem straight away and it was instantly recognised by the Arduino IDE

ESP8266 Point to Point communication with 2 arduinos

I am using 2 esp8266 wireless modules to establish bidirectional wireless communication between 2 arduino boards (one mega and one uno) without the use of any earth based technologies (i.e. radio frequencies, wifi which relies on earth sattelites, etc.). My solution was to use the esp8266 to establish a private area network with both esp's acting as a station and an access point (AT+CIPMODE=3). Unfortunately, this solution has proven to be more of a hassle than it was worth.
To start, I have the esp's each wired according to this diagram
When I first started out, the red LED was on and the blue LED was off. During this time, I was able to send AT commands, establish the server, and achieve the communication I required by entering commands directly to the serial monitor. After this, I started writing a library using the SoftwareSerial library to allow me to issue commands directly through the program to set up the esp as needed upon start up of my script. Before doing this, I changed the baudrate to make sure it was running at 9600, and entered the AT commands in the serial monitor to make sure everything was working properly and it still worked.
After I began writing the library, before uploading the code with a test of the library I noticed the blue LED was lit solid now. Noticing this, I reuploaded the barebones script (I haven't uploaded the library code to the arduino yet) and the esp was no longer receiving the AT commands.
Does this indicate an issue with the board which I can fix or does this mean the board is done?
With my deadlines approaching fast in about 3 weeks it is crucial I get this wireless communication working so if this is an issue with the board, I'm going to have to scrap the esp's and use a different way of communicating. So my second question is, if this is the case, what are other viable options for establishing this communication? I have used xbee's before and while that would be ideal, they fall out of the budget I have been alotted so I need to keep it under $50 for this. If bidirectional communication is not possible for that price I can live with one way because I just need to get this system working. Basically I just need to transmit a single byte of data.
I realize this response is a little belated, and I hope you got it sorted: I've started working with the ESP8266 myself in the last few weeks, and hence why I was looking around for tutorials on direct communication between 2 units, when I found your post.
From what I've been able to ascertain, the AT commands are a part of the 'firmware' which ships with some modules. The Arduino code however starts loading onto the chips at memory address 0x0000, which is the same address that the firmware update tools use.
In other words, I believe that with the Arduino-coded program running on there, you lose the AT command functionality.
If you find a firmware update tool for the ESP8266 (plenty online) you'll get back the AT commands.
I suppose though the real question is why would you want to? It seems that the AT commands are just a way to treat the ESP as a dumb WiFi antenna. With the Arduino code, you're actually treating it as a micro-controller in its own right.

Arduino Standalone

I have an Arduino Uno and I am using arduino 1.0.5 IDE. I followed he procedures for bootloading an atmega328P-PU on a breadboard.
I uploaded the ArduinoISP sketch first, made the connections(using the External Oscillator) and then wired it up. Then, I selected the programmer as Arduino as ISP, selected the board as Arduino duemilanove w/ Atmega328P. Then I selected the correct serial port and clicked Burn Bootloader.
I got the following errors:
avrdude.exe: stk500_program_enable(): protocol error, expect=0x14,
resp=0x50avrdude.exe: initialization failed, rc=-1 Double
check connections and try again, or use -F to override
this check.avrdude.exe: stk500_disable(): protocol error, expect=0x14,
resp=0x51
How to solve this issue? Also, can I upload the bootloader directly by using it on the Uno in place of the original chip. If so, how?
to my understanding the error you have indicates a bad reading from the chip. I experienced that with chips that were either dead or not properly connected, especially to power supply.
You may find more detailed information in th tutorial : https://www.arduino.cc/en/Tutorial/ArduinoISP
Especially those things :
Note for Arduino 1.0: you need to make one small change to the
ArduinoISP code. Find the line in the heartbeat() function that says
"delay(40);" and change it to "delay(20);".
Select the items in the
Tools > Board and Serial Port menus that correspond to the board you
are using as the programmer (not the board being programmed).
Instead of arduino built-in boot loader just go through below link and it will be great for uploading boot loader and verifying board status info
I am replying you this because same issue I got long back and it saved me.
One more thing for arduino boot loader: for atmega328 you need to put capacitor between reset and gnd( in case you missed)
For gammon bootloader you don't need it.
Be Innovative.
For reset line you might me using 100nf(thats what stated in documentation )...but sometimes it doesn't work...try something like 4.7uf, 22uf or 47uf or close values
I had a similar problem and the issue was that my programmer was a bit slow, I used the -B flag for avrdude to slow down the bitrate and it started working, I set the -B20 and works like a charm every time, but I use the USBTinyISP programmer, not the stk500 one, so this might not work for you.
In case someone stuck at this as I did and nothing like changing the cap value helped. Make sure you are using your USB-TTL adapter in a 5v mode (obviously for a 5v powered chip). I always used it in a 3.3v mode in order not to accidentally burn my 3.3v chips and it always worked. Until today, I was trying to flash my custom atmega8 board and everything worked with the ISP but I was having a hard time using the bootloader and after half a day searching and trying different stuff the 5v setting to the rescue.

avrdude : stk500_getsync not in sync:resp=0x87

I am using arduino uno r3 board and arduino 1.6.5 on windows 8. When Itried to upload my program on ATMEGA328 microcontroller it is showing:
avrdude:stk500_getsync not in sync:resp=0x87.
help me to solve this error
This boils down to 3 problems usually..
The bootload on the chip is missing (unlikely if you purchased the board from Arduino).
The serial connection between the arduino and the computer is disconnected or interrupted.
You've simply selected the wrong board type or port when programming, and thus the IDE is searching for a signal that the arduino isn't coming back with.
This problem is most likely due to option 3, however it can occur in odd situations especially on the Arduino Micro where the board does all USB comms on chip and can be flooded by main without an appropriate delay to the point it can't communicate with the IDE. However this is just most likely a bad board selection or a bad port selection.
I've tried many things but this worked for me. If you have a working Arduino lying around (in my case Uno) you can use it as an intermediate in-system programmer (ISP).
Follow this guide to first load the ISP sketch into your working Arduino.
Once you are done, for your non-working Arduino, select from the Tools > Programmer menu and choose Arduino as ISP, and set Board and Processor accordingly. To program choose Sketch > Upload using programmer.
Hope this works.
I think the reason that this work is that it will bypass the CH340/FTDI chip, and all those synchronization issue. Given that that is your problem.

Arduino programming using USB download fails on Windows 2000

I have a number of Windows 2000 systems that we are trying to use to program the new Arduino Uno and Mega devices. These boards now come with a USB connection, an upgrade from the prior FTDI. I'm not able to download the Arduino code into the board from a Windows 2000 system
The supplied drivers are *.inf files that modify the standard USB driver that comes with Windows (in this case Windows 2000).
I go through the process of setting the port, setting the device and doing the download. The download fails, and the apparent error is that the PC can not communicate with the board. I've checked the port, adjusted the baud rates, etc. I've even moved the port number from a high port number (ie COM12) to a lower port (COM2) without any success. I do see activity on the rec/xmt lights on the Arduino board, so some type of data is being sent and received.
I'm looking for:
Someone who has been able to download files from Windows 2000 to the Arduino
or
A way to shim inside the USB driver to be able to watch the traffic going up and down to the board so I can continue to debug this.
or
Some general tips for things to look at in the .inf file that need to be set/not set to make it work on Windows 2000.
I know the boards work I've used them on a different set of Windows XP systems. So I know to some extent the install is good and that most of what I have works.
Full dumps can be found on the Arduino forum, http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291090110/.
This is the information produced by the AVRDude program while it's trying to download the code.
this could be a long shot, but I jsut recentlz had problems uploading too. Fist of all, how long is the USB cabele you are uploading from? Mine in one case was too long and th arduino woul lose sync. Secondly, and this might just be a silly oversight (like i did) do you have things wired in the digital pin 0 and 1? These are used for the communication, and if there is anything else plugged in to them the upload will also fail.
As I said, long shot but those were two errors I had.

Resources