Problem using VC0706 Camera w/ MEGA 2560

Breakout boards, sensors, Drawdio, Game of Life, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby wermet » Sun Oct 30, 2011 2:25 pm

That was one of the first things I checked, but I'll try it again just for completeness.

For simplicity, I'm going to use the MEGA 2560 without any other wiring (except the USB cable) connected. I am also going to use the "Blink" example sketch.
Code: Select all
/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.

  This example code is in the public domain.
*/

void setup() {               
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

(1) Double checked that the correct board model (MEGA 2560) and com port (com 5) were being used.
(2) Complied, got the message "Binary sketch size: 1588 bytes (of a 258048 byte maximum)". Then waited for the "Done compiling" message.
(3) Then tried to upload. The message "Binary sketch size: 1588 bytes (of a 258048 byte maximum)" appears and then nothing. I waited over 5 minutes before ending the program.
(4) I then tried using a different computer, no joy either.
(5) I worked my way through the Arduino Troubleshooting (under Tools/Troubleshooting) without any joy.

(6) Then just to rule out that I wasn't doing something completely bone-headed, I tried using a bare Uno board (changed the Board type and Serial Port) and immediately had success.

So the bottom line is that I am completely stuck using the MEGA. :(

Thanks,
wermet
wermet
 
Posts: 12
Joined: Sun Oct 02, 2011 6:10 pm

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby adafruit_support_bill » Sun Oct 30, 2011 4:03 pm

Are you seeing any led activity during the upload attempt? Hold the shift key while pressing upload to get diagnostic output during the upload.
User avatar
adafruit_support_bill
 
Posts: 16054
Joined: Sat Feb 07, 2009 9:11 am

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby wermet » Sun Oct 30, 2011 4:43 pm

I am getting no led activity. The diagnostic output from [shift]-upload is:
Code: Select all
Binary sketch size: 1588 bytes (of a 258048 byte maximum)
C:\Documents and Settings\wermet\My Documents\Arduino\Arduino\hardware/tools/avr/bin/avrdude -CC:\Documents and Settings\wermet\My Documents\Arduino\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega2560 -cstk500v2 -P\\.\COM5 -b115200 -D -Uflash:w:C:\DOCUME~1\WERMET~1\LOCALS~1\Temp\build1224071311445986261.tmp\Blink.cpp.hex:i

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

         System wide configuration file is "C:\Documents and Settings\wermet\My Documents\Arduino\Arduino\hardware/tools/avr/etc/avrdude.conf"

         Using Port            : \\.\COM5
         Using Programmer      : stk500v2
         Overriding Baud Rate  : 115200
avrdude: ser_open(): setting dtr
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:

{snipped lots of repeating messages...}

avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]
avrdude: Recv:
avrdude: stk500_2_ReceiveMessage(): timeout
avrdude: Send: . [1b] . [01] . [00] . [01] . [0e] . [01] . [14]

{Note: I unplugged the USB cable at this point.}

avrdude: ser_send(): write error: sorry no info avail

Thanks,
wermet
wermet
 
Posts: 12
Joined: Sun Oct 02, 2011 6:10 pm

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby adafruit_support_bill » Sun Oct 30, 2011 4:58 pm

I am getting no led activity.

If the UNO works using the same port & cable, I'd suspect that maybe the 8U2 on the Mega 2650 is dead - although I don't know why the IDE doesn't time out on the upload.

Some have reported success re-flashing the 8U2 firmware to revive dead UNOs. I suspect the same is possible on the Mega. If you search the Arduino.cc forums you should be able to find details on that procedure.
User avatar
adafruit_support_bill
 
Posts: 16054
Joined: Sat Feb 07, 2009 9:11 am

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby wermet » Sun Oct 30, 2011 10:05 pm

Success!!! :D

It turns out that all I had to do was to reset the 8U2 chip on the Arduino board. This is done simply enough by hooking up the USB cable to a computer and then shorting the leftmost two pins on the 2x3 connector immediately next to the Arduino's USB connector. I did not have to reflash the firmware or anything.

I found the information at http://arduino.cc/en/Hacking/DFUProgramming8U2 while searching for information on re-flashing the 8U2 chip's firmware.

Thanks for helping to point me in the right direction.

Sincerely,
wermet
wermet
 
Posts: 12
Joined: Sun Oct 02, 2011 6:10 pm


Re: Problem using VC0706 Camera w/ MEGA 2560

Postby Miax » Tue Nov 01, 2011 6:50 am

If I may ask, by "using the hardware libraries", do you mean using Pin 0 and 1 on the Mega for communications?

I have a similar problem with Xbee's not working because NewSoftSerial isn't compatible with Mega 2560s, and I suspect I may need the same solution that you used with your camera..

Is there a quick description you could offer on how you used the hardware libraries?

Thanks!! :)

Kris
User avatar
Miax
 
Posts: 134
Joined: Tue Apr 05, 2011 10:41 am

Re: Problem using VC0706 Camera w/ MEGA 2560

Postby ChuckA » Tue Dec 27, 2011 8:02 am

Did Wermet ever post his library for the Mega?
ChuckA
 
Posts: 2
Joined: Tue Dec 27, 2011 7:58 am

Previous

Return to Other Adafruit products

Who is online

Users browsing this forum: No registered users and 9 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [103]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
BeagleBone[24]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[33]
LCDs & Displays[48]
Components & Parts[69]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[109]
 
Wireless[14]
Cables[61]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]