View previous topic :: View next topic |
Author |
Message |
teccs
Joined: 14 Oct 2006 Posts: 69
|
Posted: Thu Feb 26, 2015 1:49 am Post subject: USB programming won't work after using ICSP. Arduino Mega 2 |
|
|
I programmed my Arduino Mega 2560 a few times using the USB connection and BASCOM. For programmer, I selected STK500V2. Worked fine but I noticed I can't program fuse bits using USB connection.
Then I programmed the same with ICSP using USB-ISP that I have used for years on ATMEGA chips on boards I build. Worked fine on Arduino.
Then I tried to program again using USB connection and STK500V2. No good. Still works as serial port, but not for programming.
I assume that I have inadvertently set one of the fuses when programming with the ICSP which is now preventing the USB programming to work.
Any suggestions? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Thu Feb 26, 2015 9:48 am Post subject: |
|
|
you need to understand that arduino uses a bootloader. this is a piece of code running in the bootloader section (top of the flash) memory.
when you use ISP programming, you are erasing flash, including the bootloader. so now there is no bootloader.
it is simple however : get the arduino bootloader code used in your chip and program the chip with that code. _________________ Mark |
|
Back to top |
|
|
teccs
Joined: 14 Oct 2006 Posts: 69
|
Posted: Thu Feb 26, 2015 10:46 am Post subject: Bootloader code |
|
|
Hi Mark,
Thank you for the reply.
Where do I get the bootloader code? How do I put my code with the bootloader code in the programming of the ATMEGA 2560 in BASCOM? |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5920 Location: Holland
|
Posted: Thu Feb 26, 2015 1:16 pm Post subject: |
|
|
you can best check the arduino forum. they can inform you how to put the boot loader back into the chip. and where to find the code. there are many different versions. _________________ Mark |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sun Mar 01, 2015 8:57 pm Post subject: Burning bootloader |
|
|
Today I burned a new bootloader in an Arduino Uno. In Arduino-IDE there is an option to burn a bootloader. Select the right chip. Have used the AVRISP MKII and it worked right away. You can select the right programmer in the IDE.
Have fun
Ben Zijlstra |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Tue Mar 03, 2015 10:52 am Post subject: |
|
|
hello,
once you've solved your problem, and the bootloader is one of the most recurring problems, can you explain, step by step, your approach?
many thanks
JP |
|
Back to top |
|
|
|