Arduino with ATmega48-20AU


i wanna know how i can use a ATmega48-20AU as arduino.

It has just 4kb flash but i dont wanna run big skrips on it.

I wanted to controll it with an other arduino with i²C.

Can I use the Arduino Bootloader on this little thing ?

Do you want to program the ATmega48-20AU using an arduino board like Arduino Uno or you have means to program the ATmega48 and you are just looking for information about how to interface an Arduino Uno with an Atmega48, to make them talk on I2C?

I have 3 ATmega48-20AU and an Arduino UNO.

Now i wanna controll the ATmega48-20AU with my Arduino, with the Wire include.

Upload a little script on the ATmega48-20AU and controll it then…

sorry for my bad english i’m a german :wink:

Save a copy of your boards.txt and avrdude.conf.
Put these in their place.
Select Uno48 as the board type, I think it will get you there.
I updated the files from those found in IDE 1.0.2, should be close.
Not 100% sure I have max size correct, may be set too low, that may need some adjusting depending on the bootloader.

Haven’t tried it with actual device, only checking that it would compile.
My sketch was way too big, you can be the tester for a small sketch.

boards.txt (20.6 KB)

avrdude.conf (585 KB)

Another way to program an Atmega48 using Arduino Uno is to follow this help page. No bootloader is needed. You can save space. The instructions are for programming an Atmega328p but they can easily be adapted to Atmega48 since the two microcontrollers share the same pin configuration. Also do not forget to change the option -p m328p to -p m48.

Wow, that''s a lot of steps.

If bootloader is not needed, upload the sketch with the File:Upload Using Programmer command.

Arduino 1.0.1->File-> Upload using programmer is a command I do not fully understand.

Let's say I have 4 different AVR controllers: Attiny84, Attiny85, Attiny13, Atmega48 that I want to program using an Arduino Uno as ISP programmer.

I connect Arduino Uno SS, MOSI, MISO, SCK to the target controller pins RESET, MOSI, MISO, SCK, respectively and press Upload using programmer. Where does this command know which of the four AVR is my target microcontroller on the breadboard? Is it able to automatically detect the AVR?

Before you upload to a chip/board, you have to select Tools:Board and click the part you are using. Then select Tools:Programmer and click your programmer.

After that: I generally do Tools: Burn Bootloader to set the fuses correctly with a brand new part. Then File: Upload Using Programmer to wipe out the bootloader and load the sketch for immediate start after a reset.

I've not had luck using avrdude commands to do all that manually, other folks have.

The IDE does not support these chips Attiny84, Attiny85, Attiny13, Atmega48 I have been experimenting to add them in. I think the files I attached above will to do the '48/48A/48V & 48P/48PA/48PV, but I don't know for sure as I don't have chips.

I'll see if the Attiny parts can be added in a similar manner.

thanks for the reply.

But i'm new here ...

So i must connect my ATmega48-20AU with my arduino with follow pins:

| Arduino Uno | ATmega48-20AU | | - | - | | SS(Pin10) | Reset(Pin29) | | MISO(pin11) | MISO(Pin16) | | MOSI(Pin12) | MOSI(Pin15) | | SCK(pin13) | SCK(pin17) |

now i just need the 20 MHz Crystal and two 22pF Capacitors.