Using ATmega162 with Arduino IDE

ATmega162P Arduino Pinout

ATmega162P Arduino Pinout

I will present how to use a microcontroller Atmega162 with Arduino IDE.

I wrote this post as a complement to post AVR / STC51 Dev Board (FKECL PCB). But the information here may be used without the development board.

So if we install an Atmega162 microcontroller on the development board above, we can use Arduino IDE.

1. In the <arduino>\hardware\arduino\avr\boards.txt file, add these lines:

 2. Make a folder

[<arduino>\hardware\arduino\avr\variants\atmega162\]

in this folder save file [pins_arduino.h]

3. We will overwrite the file iom162.h in folder

[<arduino>\hardware\tools\avr\avr\include\avr\] with the file attached here: iom162.h

4.File [optiboot_atmega162.hex / optiboot_atmega162.zip] will be saved to:

[<arduino>\hardware\arduino\avr\bootloaders\optiboot\]

Arduino IDE -Selecting Board

Arduino IDE -Selecting Board

Arduino IDE -Selecting Programmer

Arduino IDE -Selecting Programmer

Here’s a sample code to use a 16×2 display.

Arduino with Atmega162 + LCD

Arduino with Atmega162 + LCD

Arduino with Atmega162 + DS18B20 + LCD

Arduino with Atmega162 + DS18B20 + LCD

Arduino code: DS18x20_Lcd.zip


Arduino code: Led7Segment.zip


Arduino code: Atmega162_Led7Segments_DS18B20.zip

Share
Updated: August 18, 2014 — 2:14 am

Leave a Reply

Your email address will not be published. Required fields are marked *

OpenHardware.Ro © 2017 Frontier Theme