Offline
Newbie
Karma: 0
Posts: 43
|
 |
« on: July 24, 2012, 01:22:05 am » |
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.
|
|
|
|
« Last Edit: July 24, 2012, 03:08:33 am by Houser636 »
|
Logged
|
|
|
|
|
Greenville, IL
Offline
Edison Member
Karma: 11
Posts: 1287
Warning Novice on board! 0 to 1 chance of errors!
|
 |
« Reply #1 on: July 24, 2012, 08:16:28 am » |
This may not help you but, here is a link for bootloading. http://www.gammon.com.au/forum/?id=11635
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #2 on: July 24, 2012, 03:06:15 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #3 on: July 24, 2012, 03:15:19 pm » |
You have the board powered, yes? The AVR ISP MKii does not provide power, it only senses to control the program voltage levels.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #4 on: July 24, 2012, 09:01:21 pm » |
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!
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #5 on: July 24, 2012, 10:02:58 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #6 on: July 24, 2012, 11:00:18 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #7 on: July 24, 2012, 11:09:06 pm » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #8 on: July 24, 2012, 11:26:39 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #9 on: July 24, 2012, 11:30:17 pm » |
Connect Rx/Tx on the FTDI, see if data you send it is copied back ok.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #10 on: July 25, 2012, 12:59:59 am » |
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.
|
|
|
|
|
Logged
|
|
|
|
|
Global Moderator
Boston area, metrowest
Offline
Brattain Member
Karma: 249
Posts: 16583
Available for Design & Build services
|
 |
« Reply #11 on: July 25, 2012, 01:07:04 am » |
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
|
|
|
|
|
Logged
|
|
|
|
|
SF Bay Area (USA)
Offline
Faraday Member
Karma: 78
Posts: 5455
Strongly opinionated, but not official!
|
 |
« Reply #12 on: July 25, 2012, 01:08:44 am » |
The avrisp does not emulate a com port. It does direct USB communications. (but the ftdi should show up as a com port.)
|
|
|
|
« Last Edit: July 25, 2012, 01:11:25 am by westfw »
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #13 on: July 25, 2012, 12:40:19 pm » |
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!
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 43
|
 |
« Reply #14 on: July 25, 2012, 08:46:25 pm » |
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?
|
|
|
|
|
Logged
|
|
|
|
|
|