Pages: [1]   Go Down
Author Topic: uno as ISP bootloader for a ATmega162  (Read 898 times)
0 Members and 1 Guest are viewing this topic.
Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I've got a ATmega162(from my x0xb0x) without a bootloader.
Can I use the Uno as a ISP to put the bootloader on the 162?
I've got the bootloader hex file but I dont know how to put it on.

Could anybody please help me out?

« Last Edit: June 17, 2012, 06:36:37 pm by evostars » Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12285
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

Can I use the Uno as a ISP to put the bootloader on the 162?

Let's find out.  First stop, the datasheet... http://www.atmel.com/Images/doc2513.pdf  We need to look through the Memory Programming section.  We're looking for Serial Downloading.  And, it's there.

Wiring is easy to remember...

MISO to MISO
MOSI to MOSI
SCK to SCK

GND to GND

SS on the Uno to RESET on the target

The target has to be powered close to 5V.  As long as the current is within reasonable limits, the target can be powered from the Uno.

The target's SPI pins are listed in the Memory Programming / Serial Downloading section.
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

From when i did it,

SCLK = Pin8
MISO = Pin7
MOSI = Pin6
RESET = Pin9
VCC = Pin40
GND = Pin20

XTAL1 = Pin19
XTAL2 = Pin18


I used an uno to upload it as suggested above.
Logged

~Tom~

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

yes I got that far. Got the pins right.
But in the IDE, I dont get to bootload my own .hex file.
Instead I see I can only select different cpu's. I even tried selecting a 168, but when I bootload, it says error wrong cpu (or something like that).

I dont see how I can load my own bootloader.hex file into my 162 chip, with the IDE...

I've read and used these:
http://arduino.cc/en/Tutorial/ArduinoISP
http://arduino.cc/en/Tutorial/ArduinoToBreadboard

But they dont explain how to do it with a other cpu (162)
should I maybe copy paste the bootloader.hex file of the atmega162 to the right map (exeamples?)?
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

 after reading this: http://www.atmel.com/Images/doc2513.pdf  We need to look through the Memory Programming section.  We're looking for Serial Downloading.

I learned I ned to pull down reset to ground, to program it, I had it tied down to 5V.

But still no clue how to proceed...
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you edited the boards.txt file to include the Atmega162?

If so, select that as the current board (tools->board), and then select the programmer (tools->programmer-"Arduino as ISP"). Then click burn bootloader (tools->"burn bootloader")

That will locate the hex file specified in the boards.txt file, and burn it to the Atmega162.

Quick question, are you using the bootloader I modified? If so, I realised there is a mistake in the pins_arduino.h file which I will change in my other thread. If you did use mine, you will need to redownload the .h file.
Logged

~Tom~

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you edited the boards.txt file to include the Atmega162?

If so, select that as the current board (tools->board), and then select the programmer (tools->programmer-"Arduino as ISP"). Then click burn bootloader (tools->"burn bootloader")

That will locate the hex file specified in the boards.txt file, and burn it to the Atmega162.

Quick question, are you using the bootloader I modified? If so, I realised there is a mistake in the pins_arduino.h file which I will change in my other thread. If you did use mine, you will need to redownload the .h file.
No, i didn't use your bootloader. Got a link for me?
I'll try to find the textfile, and change it.
Thanks!
Logged

Leeds, UK
Offline Offline
Edison Member
*
Karma: 71
Posts: 1638
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

There is another thread called "Making Bootloader for Atmega162", just below this one.
Logged

~Tom~

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is another thread called "Making Bootloader for Atmega162", just below this one.
Ah cool. Missed that.
Logged

Netherlands
Offline Offline
Newbie
*
Karma: 0
Posts: 14
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Done! it worked smiley
Logged

Pages: [1]   Go Up
Jump to: