Go Down

Topic: 2560 bootlader mkii problem (Read 1 time) previous topic - next topic

Houser636

Jul 24, 2012, 08:22 am Last Edit: Jul 24, 2012, 10:08 am by Houser636 Reason: 1
I built a tiny 2560 with a ftdi chip and a 16mhz crystal.  I had it working with my avrisp mkii using the arduino ide without a bootloader.  When i uploaded the blink sketch it seemed it was running at a 1 mhz clock speed.  I decided to burn the bootloader to hopefully set the right speed,  and allow me to program through my micro usb port.

I selected the board,  then selected my programmer, and clicked burn bootloader.  It came up with an error, and now i cant even upload like i was before.

The lights are both green on the avrisp.

I had an uno, and a mega that i was able to burn the bootloader on.   I know my circuits are ok because it worked before.  

It seems like it isnt looking at the right com port or something.  

I even tried it in avrdude and ot says it cannot find the port file

Any help would be greatly appreciated!  Thanks in advance.

The only thing that is different is the clk speed on the new boards. I believe they are still using the internal oscillator at 8mhz.

cyclegadget


This may not help you but, here is a link for bootloading. http://www.gammon.com.au/forum/?id=11635

Houser636

Yeah i have read that already,  but thanks.  Today im going to try and use a known good clk source, and the rest hooked up to the new board.  Hopefully its just my clk fuses.

CrossRoads

You have the board powered, yes? The AVR ISP MKii does not provide power, it only senses to control the program voltage levels.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Houser636

Yes powered it up three different ways.  avrdude shows it sees good target voltage.  Reset pin has a 1k resistor, and both lights are green on the programmer.  in avrdude it shows avrdude: stk500v2_command(): command failed  and a couple other things about stk500v2. 

I press shift and click on the program button in arduino IDE, data goes to mkii, first light flashes green like data is moving, second light quickly flashes red, then I get the error.

This all started right after I tried to burn the stk500v2 bootloader.  It did something for about 10 sec then I got an error.  I didnt right it down though  =(

Do you think its trying to use the bootloader instead of the mkii.

Oh, and I tried the clock thing with no luck.  avrdude shows sck period    :8.00us
I do have the external 16mhz crystal already hooked up.

The programmer doesnt show up on a com port all I see is the lib driver and it is under that.

I'm going crazy!

CrossRoads

Check that the MKii is not using the Jungo driver. There's a driver in the IDE folders somewhere that needs to  be used instead.
This was discussed in the forum recently, I had run into that as well.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Houser636

I thoght the same, but I am using the good driver libusb.  I even tried reinstalling it.  It seems avrdude can not find the mkii on any port its trying to use the stk500v2 instead.  When I type in the port in avrdude it cant find anything. I tried com0 - com9.  No com ports show up in my device manager.

How can I tell what com port the programmer is on?

CrossRoads

Windows:
Start:Settings:Control Panel: Device Manager: Ports

Mac?  Who knows.
Apple stock may take a hit tomorrow, only made like 8 Billion dollars last quarter vs 12 Billion expected, some ridicuously high numbers like those. Pretty sure they were saying Billion. Guess that stuff's not overpriced too much.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Houser636

haha yeah I'm on a pc.  All that shows up on my ports is lpt1.  No com ports anywhere.

I should also say I just got my ftdi chips finished on the board and pluged them in.  The computer saw them and makes the noise when i plug them in and unplug them.  Maybe this did something to screwy to my com port settings.

I have a micro usb going to the ftdi and a lm358n opamp to power the board.  Power is working fine.  I dont know about the ftdi since i dont have the bootloader on it to test it out.

Any other ideas?

CrossRoads

Connect Rx/Tx on the FTDI, see if data you send it is copied back ok.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Houser636

Just jump the rx and tx pin? How do i send the data in the arduino ide gets hung up on upload.  I think it is looking for a handshake from the software.   I think it will timeout, i haven't left it that long.

CrossRoads

Open the serial monitor, jumper Rx & Tx together, hold the reset button down. That should leave the FTDI chip free to receive a byte and send it back out,  so whatever you type is repeated back & shows up on the serial monitor.

i.e. Loopback test:
http://arduino.cc/forum/index.php/topic,73748.0.html
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

westfw

#12
Jul 25, 2012, 08:08 am Last Edit: Jul 25, 2012, 08:11 am by westfw Reason: 1
The avrisp does not emulate a com port.  It does direct USB communications.
(but the ftdi should show up as a com port.)

Houser636

Just tried it on another pc, and i get the same error.  I figure this means it has to be the board or the firmware on the programmer.

I tried to upload new firmware in atmel studios 6 i first uninstalled libusb driver and used the jungo driver.  It still can't find the programmer even after jumping the two pins on the programmer.

Do you guys know how to update the firmware?

If i can get studio 6 to communicate with it i'll try to program in that.

Once again, thanks for the help guys!

Houser636

Ok im finally getting somewhere.   I got the bootlader on one of my boards.  Looks like its the reset line causing the problem.  I started desoldering pieces of the board, as soon as i took off the resistor on the reset line the bootlader loaded with no problems.

How exactly does the reset line work?

Go Up