Top Banner
1 DeccanRobots AVR-LiP User Guide AVR-LiP Evaluation Kit …………………………………………………………………… User Guide
34

Atmega 32 Interfacing

Apr 06, 2015

Download

Documents

vineethrajan
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Atmega 32 Interfacing

1 DeccanRobots AVR-LiP User Guide

AVR-LiP Evaluation Kit …………………………………………………………………… User Guide

Page 2: Atmega 32 Interfacing

2 DeccanRobots AVR-LiP User Guide

Page 3: Atmega 32 Interfacing

3 DeccanRobots AVR-LiP User Guide

Table of Contents

Section 1 Introduction ………………………………………………………………………………………………

1.1 Architecture of AVR-LiP………………………………………………………….. 7 1.2 Interfacing circuits available on AVR-LiP…………………………………8

Section 2 How to operate the Pre-Programmed AVR-LiP ……………………………………… 2.1 Functionality of Pre-loaded Firmware ……………………………… 10 2.2 Settings for Pre-Loaded Firmware ………………………………….. 11 2.3 Re-Loading Original Firmware Hex …………………………………. 12

Section 3

Using AVR-LiP ……………………………………………………………………………………….

3.1 Connecting Power …………………………………………………………… 14

3.2 AVR-LiP Reset & Crystal….………………………………………………. 15

3.3 Programming AVR LiP ……………………………………………………. 15

3.4 JTAG ……………………………………………………………………………….. 16

3.5 Real Time Clock ……………………………………………………………… 16

3.6 24C256 EEPROM ……………………………………………………………. 17

3.7 16x2 LCD ……………………………………………………………………….. 17

3.8 RS232 ……………………………………………………………………………… 17

3.9 Piezo element ………………………………………………………………… 18

3.10 LEDs ………………………………………………………………………………. 18

3.11 Switches ………………………………………………………………………… 18

3.12 IR Receiver …………………………………………………………………… 19

3.13 4x4 Keypad …………………………………………………………………… 19

3.14 Connecting External interfacing circuits ……………………… 20

3.15 Temperature & Light Sensor ………………………………………… 20

3.16 Preset for ADC Demonstration ……………………………………. 21

Page 4: Atmega 32 Interfacing

4 DeccanRobots AVR-LiP User Guide

Section 4 ATmega32 and AVR LiP………………………………………………………………… 4.1 ATmega32 Overview ………………………………………………….. 23 4.2 Possibilities with mega32 as heart of AVR LiP …………… 25 4.3 Interfacing ATmega32 with LEDs ………………………………. 26 4.4 Interfacing ATmega32 with Switches ……………………….. 26 4.5 Interfacing ATmega32 with 4x4 KeyPad …………………… 27

4.6 Interfacing ATmega32 with IR Receiver …………………… 27

4.7 Interfacing ATmega32 with 16x2 LCD ……………………… 28 4.8 Interfacing ATmega32 with RS232 ………………………….. 28 4.9 Interfacing ATmega32 with Real Time Clock …………… 29 4.10 Interfacing ATmega32 with EEPROM …………………….. 29 4.11 Interfacing ATmega32 with Temperature Sensor …. 29 4.12 Interfacing ATmega32 with Light Sensor ………………. 30 4.13 Interfacing ATmega32 with Preset ………………………… 30 4.14 Interfacing ATmega32 with Piezo Element ……………. 31

Section 5

Troubleshooting Guide ………………………………………………………………. 33

Section 6 Technical Support ……………………………………………………………………… 34

Page 5: Atmega 32 Interfacing

5 DeccanRobots AVR-LiP User Guide

Page 6: Atmega 32 Interfacing

6 DeccanRobots AVR-LiP User Guide

Section 1

Introduction

AVR-LiP is designed to learn various features of ATmega32 and other pin compatible AVR devices. In addition to this, AVR-LiP can be used as prototype for mega32 based project development. AVR-LiP is battery powered “Lab-in-Pocket” AVR-LiP has on board ISP Programmer and it can also be programmed by JTAG.

Figure 1. AVR-LiP

Figure 2. AVR-LiP without LCD

Page 7: Atmega 32 Interfacing

7 DeccanRobots AVR-LiP User Guide

1.1 Architecture of AVR-LiP

AVR-LiP is all in one Lab-in-Pocket.

AVR-LiP is equipped with on-board ISP Programmer, mega32 as target device, JTAG Connector, Voltage Regulator with dual power supply options and loads of interfacing circuits. Figure 3: General Layout of AVR-LiP

ATmega32 available with AVR-LiP can not be used for JTAG immediately as the JTAG is disabled when shipping from our factory. When shipped, ATmega32 is configured to work with external crystal of 4.00 MHz.

Interfacing Circuits

Power Supply

and Voltage

Regulator

On Board ISP Programmer

ATmega32 Target Device

Page 8: Atmega 32 Interfacing

8 DeccanRobots AVR-LiP User Guide

1.2 Interfacing circuits available on AVR-LiP The following interfacing circuits are available on the board:

16x2 LCD to display data

Real Time Clock using DS1307

EEPROM using ATMEL 24C256 to store small database

RS232 to make PC controlled applications

Piezo Element to play sound

4 LEDs for status monitoring and event indicator

2 Switches as normal key input of as an interrupts

IR Receiver using TSOP1738 to receive signals from TV remote

Temperature Sensor using LM35

Light Sensor using LDR

20K Preset for ADC demonstration

4x4 KeyPad to make menu driven applications

AVR-LiP can control external interfacing circuits and can also monitor up to 4 external analog inputs. To make the learning and development simpler, we have included individual interfacing source code. These samples are developed using WinAVR.

Page 9: Atmega 32 Interfacing

9 DeccanRobots AVR-LiP User Guide

Page 10: Atmega 32 Interfacing

10 DeccanRobots AVR-LiP User Guide

Section 2

How to operate the Pre-Programmed AVR-LiP

AVR-LiP comes with pre-programmed application. This application demonstrates all interfacing circuits and various features of ATmega32.

2.1 Functionality of Pre-loaded Firmware Pre-Loaded firmware demonstrates following features:

Display Welcome text to LCD Use Key Pad to test individual interfacing circuits

These key numbers may differ from those printed on the PCB 1. Display Temperature 2. Display Light level 3. Display default time. 08 Sept 2007 10.10AM is set every time LiP is reset. 4. Running LEDs 5. Generate Tone 6. Random Astrology predication 7. Display data “Version 1.0” by reading it from EEPROM 24C256 8. Transmit temperature values to PC using 2400 baud rate. Same applications are available for keys from 9 to 15. To see the “Key 16” demonstration, you will require RC5 TV remote. Remote is not included with the product. Press Key 16 and point RC5 remote to AVR-LiP. LCD will display the decimal value of the key pressed from the remote. To exit from IT demo, press SW2 and any key from remote. SW1 and SW2 from the main PCB acts as interrupt and if pressed, LEDs will blink momentarily.

1 2 3 4

5 6 7 8

9 10 11 12

13 14 15 16

Page 11: Atmega 32 Interfacing

11 DeccanRobots AVR-LiP User Guide

2.2 Settings for Pre-Loaded Firmware

1. Microcontroller provided with AVR-LiP: ATmega32-PDIP Package 2. ATmega32’s JTAG Interface is disabled using Fuse bits

3. ATmega32 is configured to work with external 4MHz crystal using Fuse Bits.

4. AVR-LiP requires Date/Time entry on the first boot.

5. Do not forget to add coin-cell for RTC battery backup, from the bottom side of

the board. If you do not add this battery, date time will not be retained, neither will be asked to enter on subsequent resets/power ON.

6. AVR-LiP can be reset only from its ISP software or by switch on/off the power.

7. These are the fuse bit settings; one must follow while running Pre-Loaded

Firmware.

Figure 4: Fuse Bit Setting for Pre-Programmed Firmware.

Above Screen Shot is captured from AVR-LiP’s ISP Programming software.

Page 12: Atmega 32 Interfacing

12 DeccanRobots AVR-LiP User Guide

2.3 Re-Loading Original Firmware Hex

You may re-load the Pre-Programmed Firmware anytime, using AVR-LiP’s ISP Programming Software. Firmware hex file is available on the accompanying CD. Ensure to follow “Settings for Pre-Loaded Firmware” as described in 2.2 Figure 5: AVR-LiP’s ISP Programmer writing the default firmware to ATmega32 and ISP Connection

Connect Male to Female Serial cable for ISP Programming

Page 13: Atmega 32 Interfacing

13 DeccanRobots AVR-LiP User Guide

Page 14: Atmega 32 Interfacing

14 DeccanRobots AVR-LiP User Guide

Section 3

Using AVR-LiP

This section describes usage of AVR-LiP 3.1 Connecting Power

Figure 6: Connecting power to AVR-LiP

AVR-LiP can be powered by 9V Battery with minimum 600mA rating or from mains adaptor. It is assumed that AVR-LiP will not be connected to both the sources at a same time will not be connected. ON/OF Jumper link is provided as shown in figure 7. Figure 7: ON/OFF Jumper Link

Page 15: Atmega 32 Interfacing

15 DeccanRobots AVR-LiP User Guide

3.2 AVR-LiP Reset & Crystal

AVR-LiP is built around ATmega32 as target device. Use AVR-LiP’s Programming software to Reset the target device. Power On/Off AVR-LiP to reset the on-board ISP Programmer. ATmega32 is configured to work with external crystal of 4.00MHz.

Refer Figure 8 to locate this crystal: (Located below LCD)

3.3 Programming AVR-LiP

AVR-LiP can be programmed using 2 methods:

1. Using on-board ISP Programmer. 2. External JTAG based Programmer.

How-to use on-board ISP Programmer: AVR-LiP has one Female 9 Pin right Angle D Type Port. On-board ISP Programmer dedicatedly uses this port. On-Board ISP Programmer’s circuitry is located below the LCD. User should not modify / experiment with this part of the circuit. Follow these steps to program AVR-LiP: 1. Write your source code and Make/Compile. You may use any IDE to write the program

source. 2. Power-up AVR-LiP. 3. Connect Male to Female Serial cable / USB-to-Serial Converter to AVR-LiP’s Serial port

located on the backside (CON4) and PC’s Serial Port / USB Port. 4. Start “AVR-LiP Programming” software on Windows Based PC. This software will

automatically detect the AVR-LiP. If it fails to detect, press “Detect LiP” button from the software.

5. Use “Open Hex File” button to load the hex code of your program and press “Program” button to program the target device (ATmega32) placed on AVR-LiP.

6. Watch “Log Window” and “Status Indicator” to monitor the further process.

Page 16: Atmega 32 Interfacing

16 DeccanRobots AVR-LiP User Guide

3.4 JTAG

How-to use JTAG Based Programmer: JTAG connector is provided on-board, which can be used to connect any JTAG based programmer / debugger.

Figure 9: Top view of the JTAG Male Connector

Pin Details are: Pin 1 TCK Pin 2 GND Pin 3 TDO Pin 4 +5V Pin 5 TMS Pin 6 RST Pin 7 +5V Pin 8 No Connection Pin 9 TDI Pin 10 GND Details usage of JTAG based programmer / debugger can be found with the

respective user manual. Important to note that AVR-LiP is shipped in “JTAG Disabled” mode. One can change this mode using “AVR-LiP ISP Programmer” ’s Fuse Bit Settings. ATmega32 can be replaced with pin compatible device like ATmega16 etc, if required.

3.5 Real Time Clock

AVR-LiP has on-board RTC interface. This RTC is built around DS1307. DS1307 can be controlled using 2 lines, SCL and SDA. Two Wire Interface (TWI) or also called as I2C, can be used to establish communication between ATmega32 and DS1307. Remember to add battery for RTC backup from bottom of AVR-LiP.

1

2

3

4

5

6

7

8

9

10

Page 17: Atmega 32 Interfacing

17 DeccanRobots AVR-LiP User Guide

3.6 24C256 EEPROM Atmel make 24C256 EEPROM is available on-board and is connected to ATmeg32 using SCL and SDA lines. These lines are also shared by RTC interface. 24C256 can retain the data even power is switched off.

Figure 10: EEPROM and RTC on-board.

3.7 16x2 LCD AVR-LiP has 16 characters by 2 lines LCD. Use this LCD to display messages,

readings, information etc. 16x2 LCD is connected to ATmega32 using 4 bit mode. LCD’s backlight can be ON/OFF using a jumper link provided on bottom side of the AVR-LiP. We recommend not to use the backlight to save battery power.

3.8 RS232 – Connect To PC

AVR-LiP has on-board interface for RS232 communication. This simplifies the job of connecting AVR-LiP to your PC. This serial interface can be used to develop Data Loggers, PC Controlled Applications etc using AVR-LiP. This serial Interface can not be used to program the target ATmega32. For programming ATmega32, refer to How-to use on-board ISP Programmer section.

Page 18: Atmega 32 Interfacing

18 DeccanRobots AVR-LiP User Guide

3.9 Piezo Element

Piezo Buzzer can be used to play tunes and sounds using AVR-LiP. Piezo generated tones using built-in PWM interface of ATmega32. One can develop various tones by changing frequency of PWM and combination of PWM On/Off. Figure 11: RS232, LCD and Piezo Element on-board.

3.10 LEDs Interfacing with LEDs is always first step towards learning a new Microcontroller. Same time LEDs used as status indicators helps even experts to understand the program flaws. Four LEDs are available on AVR-LiP. These LEDs share SPI Lines used by ISP Programmer, so you may notice a flickering during the programming process.

3.11 Switches AVR-LiP has 2 pulled-up micro switches connected to interrupt lines of ATmega32. These switches can be used as External Interrupts or as normal momentary input to the ATmega32. Use your application source code to use these switches as Interrupt or as momentary inputs.

Page 19: Atmega 32 Interfacing

19 DeccanRobots AVR-LiP User Guide

3.12 IR Receiver Industrial grade IR receiver is available on-board for AVR-LiP. This can read IR signals of 38Khz frequency. One may use any format of IR e.g. RC5 etc. This interface is useful in developing Remote controlled applications using AVR-LiP. Figure 12: LEDs, Switches and IR Receiver

3.13 4x4 KeyPad

AVR-LiP has rich set of on-board interface. List of interface circuits still continues. KeyPad matrix of 4 rows and 4 columns in detachable format is a feast to AVR Developer. Keys of 4x4 Matrix KeyPad have been kept purposely small so to suit product name “Lab-in-Pocket (LiP)”. Use this keypad to make your own menu driven application or even a simple calculator. Figure 13: 4x4 Matrix KeyPad attachment

Page 20: Atmega 32 Interfacing

20 DeccanRobots AVR-LiP User Guide

3.14 Connecting External Interfacing Circuits

AVR-LiP can be connected to external interfacing circuits. This feature enables user to use AVR-LiP as a part of their project. One such example is explained here:

Figure 14:

Same time this facility is limited to the ATmega32’s Port Pins PC4, PC5, PC6, PC7, PA4, PA5, PA6, PA7. Refer to “Alternate Port Functions” from ATmega32’s Datasheet before using these pins for connecting external circuits. Nevertheless to mention, PA4 to PA7 are ADC channels thus you have better option to add 4 more external ADC inputs. As Pin PC4 and PC5 are shared by JTAG, that limits usage of these pins under JTAG Enable mode.

3.15 Temperature and Light sensor

AVR-LiP monitors Room temperature using on-board temperature sensor. LM35 is used to sense the temperature and is connected to ADC channel of ATmega32. LM35 is precision integrated-circuit temperature sensors, whose output voltage is linearly proportional to the Celsius (Centigrade) temperature. To measure the light intensity, small size LDR (Light Dependent Resistor) is used and is connected to one of the ADC channel of ATmega32.

LDR’s resistance decreases with increase in light intensity.

AVR-LiP

Your PCB

with Relay Driver Circuit

Your PCB

with Limit Switches

Page 21: Atmega 32 Interfacing

21 DeccanRobots AVR-LiP User Guide

3.16 Preset for ADC Demonstration On-Board Preset can be used to demonstrate ATmega32’s ADC capabilities.

One may use this preset as tuner. This tuner application can control PWM frequencies which in-turn will change the tunes for Piezo Element or LED’s blinking speed. One has to write relevant source codes for these applications. Figure 15: On-board Temperature sensor, Light Sensor and Preset.

Page 22: Atmega 32 Interfacing

22 DeccanRobots AVR-LiP User Guide

Page 23: Atmega 32 Interfacing

23 DeccanRobots AVR-LiP User Guide

Section 4

ATmega32 and AVR-LiP

This section will go through the ATmega32’s features. Section will also explore endless possibilities to develop simple to complex applications using AVR-LiP.

4.1 ATmega32 Overview ATmega32 is High-Performance, Low power 8-bit AVR microcontroller.

It is based on RISC architecture. ATmega32 has 32K Bytes of In-System flash and 1024 bytes of EEPROM along with 2Kbyte of SRAM. ATmega32’s JTAG Support, built-in ADC channels, TWI, SPI, WatchDog and other timers simplifies the job of embedded product developer and also reduces the PCB size. ATmega32 have 8x4 (32) programmable, IO lines. These IO lines have alternate functions too. ATmega32 can be configured to use internal oscillator as system clock or an external crystal. Reading and writing Fuse Bits can do this task. AVR-LiP has 4MHz crystal connected on board. And one may decide not to use it by writing following fuse bit values using AVR-LiP’s ISP Programming software. CKSEL0, CKSEL1, CKSEL2 and CKSEL3 bits are used to change the system clock settings.

Indicates Unprogrammed Only UnProgrammed Bits shown, assume that other bits should be programmed 1 MHz Internal Oscillator:

CKSEL0 = 4 MHz Internal Oscillator:

CKSEL0 = CKSEL1 = 8 MHz Internal Oscillator:

CKSEL3 = 4 MHz External Crystal:

CKSEL3 = CKSEL2 = CKSEL1 =

Page 24: Atmega 32 Interfacing

24 DeccanRobots AVR-LiP User Guide

Figure 16: ATmega32’s Pin usage for AVR-LiP

* Indicated pins are used for multiple purposes as listed below: NC indicates No Connection PB5: LED-2 and On-Board ISPs MOSI Line use this pin commonly. LED-2 will flicker/blink during the programming process. PB6: LED-3 and On-Board ISPs MISO Line use this pin commonly. LED-3 will flicker/blink during the programming process. PB7: LED-4 and On-Board ISPs SCK Line use this pin commonly. LED-4 will flicker/blink during the programming process. PC2: IR receiver signal line and JTAG’s TCK Line use this pin commonly. IR cannot be used during JTAG is enabled. PC4 & PC5: Ext-3 & Ext-2 lines and JTAG’s TDO & TDI Line respectively use this pin commonly. Circuit connected to these pins cannot be used during JTAG is enabled.

[PA0] TempSn

[PA1] LDR

[PA2] Preset

[PA3] NC

[PA4] Ext-7

[PA5] Ext-6

[PA6] Ext-5

[PA7] Ext-4

NC

NC

NC

[PC7] Ext-0

[PC6] Ext-1

*[PC5] Ext-2

*[PC4] Ext-3

[PC3] JTAG-TMS

[PB0] LCD-D4

[PB1] LCD-D5

[PB2] LCD-D6

[PB3] LCD-D7

[PB4] LED-1

*[PB5] LED-2

*[PB6] LED-3

*[PB7] LED-4

[RST] ISP-RST

VCC

GND

XTAL1

XTAL2

[PD0] Ser-Rx

[PD1] Ser-Tx

[PD2] Sw-1

[PD3] Sw-2

[PD4] LCD-RS

[PD5] Piezo

[PD6] LCD-RW

*[PC2] IR

[PC1] SDA

[PC0] SCL

[PD7] LCD-EN

1

20 21

40

ATmega32

Page 25: Atmega 32 Interfacing

25 DeccanRobots AVR-LiP User Guide

4.2 Possibilities with mega32 as heart of AVR-LiP

AVR-LiP is a demonstration plus development lab. AVR-LiP is used to experiment and develop applications using ATmega32. Students, Professors, R&D engineers & hobbyist can use AVR-LiP for various purposes. Some of them are listed here: Partial the list of Project / Applications / Experiments using AVR-LiP: 1. Blink One LED using ATmega32’s Timer 2. Running LEDs using ATmega32’s Timer 3. Interrupt based Speed Control of Running LEDs using two switches and

4 LEDs. 4. Tone generator using ATmega32’s PWM and Piezo Element

5. Temperature Indicator using Temperature sensor and LCD 6. Temperature Data Logger using temperature sensor & RS232

7. IR based Remote controlled device switch On/Off using IR receiver and

LEDs. Use LEDs instead of real devices like Fan, Tube etc

8. Personal Phone book to store Name and Phone number using 4x4 KeyPad, LCD and 24C256 EEPROM

9. Bad Light indicator using Light Sensor and Piezo element.

10. A mini cash register to record daily cash transactions with date-time

recording using 4x4 KeyPad, RTC, EEPROM 24C256 and LCD. 11. Personal Alarm system with as high as more than 1000 alarm settings

and tone assignments using RTC, 4x4 KeyPad, EEPROM 24C256 & Piezo Element.

12. PC Controlled Date/Time Configuration application to demonstrate LCD,

RTC and RS232 interfacing with ATmega32

13. Low voltage Indicator using on-board Preset (to simulate input voltage) and Piezo Element

14. A mini scrapbook using LCD, 4x4 KeyPad and EEPROM

15. Calculator using 4x4 KeyPad and LCD

If you have AVR-LiP based application to share with us, mail to [email protected]

Page 26: Atmega 32 Interfacing

26 DeccanRobots AVR-LiP User Guide

4.3 Interfacing ATmega32 with LEDs

4.4 Interfacing ATmega32 with Switches

1k

[PB6] LED-3

[PB4] LED-1

VCC

1k

D6

1k

1k

D4

D5

[PB7] LED-4

[PB5] LED-2

D3

SW2

SW1

[PD3] Sw-21k

1k

VCC

[PD2] Sw-1

GND

Page 27: Atmega 32 Interfacing

27 DeccanRobots AVR-LiP User Guide

4.5 Interfacing ATmega32 with 4x4 KeyPad

4.6 Interfacing ATmega32 with IR Receiver

[PC4] Ext-3

C

1Kx8 NEtwork Resistance

RESISTOR SIP 9

1 23456789

[PA6] Ext-5

[PA7] Ext-7

[PC4] Ext-3

[PA7] Ext-4

[PC6] Ext-1

[PA5] Ext-6

[PA5] Ext-6

[PA7] Ext-4

[PC6] Ext-1

[PC7] Ext-0

[PC5] Ext-2

[PC5] Ext-2

[PA74 Ext-7

VCC

[PA6] Ext-5

[PC7] Ext-0

GND

R17

-10K

C11

[PC2] IR

R18

-200

E

TSOP1738

1 2 3

VCC

Page 28: Atmega 32 Interfacing

28 DeccanRobots AVR-LiP User Guide

4.7 Interfacing ATmega32 with 16x2 LCD

4.8 Interfacing ATmega32 with RS232

[PB2] LCD-D6

[PB0] LCD-D4

R2-

47K

VR

ES

2-1K

13

2

CON1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

[PB3] LCD-D7

[PD7] LCD-EN[PD6] LCD-RW

CON2

1 2

[PD4] LCD-RS

GND

GND

VCC

[PB1] LCD-D5

VCC

GND

C12

CON3

Male CONNECTOR DB9

594837261

C15

[PD0] Ser-Rx

[PD1] Ser-Tx

IC6

MAX232

138

1110

134526

129147

R1INR2INT1INT2IN

C+C1-C2+C2-V+V-

R1OUTR2OUTT1OUTT2OUT

VCC

C13

C14

Page 29: Atmega 32 Interfacing

29 DeccanRobots AVR-LiP User Guide

4.9 Interfacing ATmega32 with Real Time Clock

4.10 Interfacing ATmega32 with EEPROM

4.11 Interfacing ATmega32 with Temperature Sensor

[PC1] SDA

GND

[PC0] SCL

VCC

IC3

DS1307

7

5126

38

SQW/OUT

SDAX1X2SCLK

VBATVCC

X232.768KHz

3VDC

GND

IC2

AT24C256

123

5

67

A0A1A2

SDA

SCLKWP

[PC1] SDA

[PC0] SCL

VCC

S1LM35

1

2

3

[PA0] TempSn

GND

Page 30: Atmega 32 Interfacing

30 DeccanRobots AVR-LiP User Guide

4.12 Interfacing ATmega32 with Light Sensor

4.13 Interfacing ATmega32 with Preset

GND

VCC

3.3K

LDR

12

[PA1] LDR

VCC

GND

VR

ES

1 -2

0K

13

2[PA2] Preset

Page 31: Atmega 32 Interfacing

31 DeccanRobots AVR-LiP User Guide

4.14 Interfacing ATmega32 with Piezo Element

Bz

GND

VCC

Piezo Element

12

T1BC548

1

2

3

Page 32: Atmega 32 Interfacing

32 DeccanRobots AVR-LiP User Guide

Section 5

Troubleshooting Guide Troubleshooting is made simple for AVR-LiP Problem: Unexpected behavior of interfacing circuits e.g. RTC returning garbage data Solution: 1. Check you source code for the oscillator frequency value (F_CPU), and ensure

that the same is set using Fuse Bits 2. Check your source code, you must be missing some logical statements

3. If still problem persists, program the original firmware hex from CD to AVR-LiP

and observe the behavior. If you do not see any improvement, try changing the interfacing component. The original firmware program requires a particular Fuse Bit Settings, read “Settings for Pre-Loaded Firmware” section 2.2.

Problem: AVR-LiP’s programming software can not detect the hardware. Solution: 1. Try again to detect AVR-LiP by pressing “Detect LiP” button from the software 2. Check if the AVR-LiP is power on.

3. Check if the Serial cable (Male to Female with straight connection) is connected

between the 9 Pin Female Port of AVR-LiP located on the bottom-back side and Serial port of PC.

4. If you are using USB to Serial Converter, ensure that its of good quality and is

fully functional.

5. It is quite possible that the USB-Serial converter is configured beyond COM50 on your PC. Change your hardware settings so to configure it in the range of COM1 to COM50.

Page 33: Atmega 32 Interfacing

33 DeccanRobots AVR-LiP User Guide

Section 6

Technical Support

For technical support, please contact the re-seller and DeccanRobots. Re-seller’s Email id is available on the invoice. Email to [email protected] to contact the manufacturer. Include following details while asking for technical support: 1. Name of re-seller 2. Problem description 3. Operating system 4. Programming method: ISP / JTAG 5. PC’s processor: Intel / AMD / etc

Page 34: Atmega 32 Interfacing

34 DeccanRobots AVR-LiP User Guide

DeccanRobots

India-Head Office 205, 2nd Floor, Decision Tower, Next To CityPride, Satara Road, Pune 411037 India Tel: +91 (0)20 24228818 www.deccanrobots.com

USA-Distributor MicroController Pros Corporation

17408 Blue Jay Drive Morgan Hill, CA 95037 USA Phone: 1-408-776-7992 Fax: 1-215-243-6071 www.microcontrollershop.com United Kingdom-Distributor Quasar Electronics Limited Bishops StortFord CM23 4WP United Kingdom Phone: 08717 177 168 (UK Only) +44 8702 461 826 (Intl) Fax: +44 7092 203 496 www.quasarelectronics.com Disclaimer: Neither this document nor the product AVR-LiP is guaranteed in any way. AVR-LiP is developed for learning purpose. Usage of this product as a real life project is not recommended. DeccanRobots and their re-sellers are not responsible for any type of loss if occurs from usage of the document or the product AVR-LiP ATMEL and AVR are the registered trademarks of ATMEL Corporation or its subsidiaries. Other product names may be trademarks of others.