Professional Documents
Culture Documents
……………………………………………………………………
User Guide
Section 1
Introduction ………………………………………………………………………………………………
Section 2
How to operate the Pre-Programmed AVR-LiP ………………………………………
Section 3
Using AVR-LiP ……………………………………………………………………………………….
Section 5
Troubleshooting Guide ………………………………………………………………. 33
Section 6
Technical Support ……………………………………………………………………… 34
AVR-LiP has on board ISP Programmer and it can also be programmed by JTAG.
Figure 1. AVR-LiP
Power
On Board ISP Programmer Supply
and
Voltage
Regulator
ATmega32
Target
Interfacing Device
Circuits
ATmega32 available with AVR-LiP can not be used for JTAG immediately as
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.
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
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.
To see the “Key 16” demonstration, you will require RC5 TV remote. Remote
is not included with the product.
SW1 and SW2 from the main PCB acts as interrupt and if pressed, LEDs will
blink momentarily.
3. ATmega32 is configured to work with external 4MHz crystal using Fuse Bits.
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.
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.
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.
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.
15 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.
2 4 6 8 10
1 3 5 7 9
Details usage of JTAG based programmer / debugger can be found with the
respective user manual.
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.
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.
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
Figure 14:
Your PCB
with
AVR-LiP Limit Switches
Your PCB
with
Relay Driver Circuit
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.
To measure the light intensity, small size LDR (Light Dependent Resistor) is
used and is connected to one of the ADC channel of ATmega32.
This section will go through the ATmega32’s features. Section will also explore
endless possibilities to develop simple to complex applications using AVR-LiP.
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.
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
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.
Students, Professors, R&D engineers & hobbyist can use AVR-LiP for various
purposes. Some of them are listed here:
3. Interrupt based Speed Control of Running LEDs using two switches and
4 LEDs.
8. Personal Phone book to store Name and Phone number using 4x4
KeyPad, LCD and 24C256 EEPROM
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.
13. Low voltage Indicator using on-board Preset (to simulate input voltage)
and Piezo Element
If you have AVR-LiP based application to share with us, mail to support@deccanrobots.com
VCC
D3
[PB4] LED-1
1k
D4
[PB5] LED-2
1k
D5
[PB6] LED-3
1k
D6
[PB7] LED-4
1k
VCC
[PD2] Sw-1
SW1
1k [PD3] Sw-2
SW2
1k
GND
VCC
[PC4] Ext-3
VCC
TSOP1738
R17-10K
R18-200E
C11
1
2
3
[PC2] IR
GND
CON1
10
11
12
13
14
15
16
1
2
3
4
5
6
7
8
9
[PD4] LCD-RS
[PD6] LCD-RW
GND [PD7] LCD-EN
[PB1] LCD-D5
1
VRES2-1K
[PB0] LCD-D4
2
CON2
1
2
3
GND VCC
C14
VCC C15
GND
32.768KHz
X2 IC3
1 5
2 X1 SDA [PC1] SDA
6 X2 7
[PC0] SCL SCLK SQW/OUT
3
8 VBAT
VCC
3VDC
DS1307
VCC
GND
IC2
1
2 A0 5
3 A1 SDA [PC1] SDA
6 A2
[PC0] SCL 7 SCLK
WP
AT24C256
GND
VCC
1
2 S1
[PA0] TempSn LM35
3
GND
VCC
3.3K
LDR
[PA1] LDR 1
2
GND
VCC
1
VRES1 -20K
2
[PA2] Preset
3
GND
Piezo Element
2
1
VCC
1
2 T1
Bz BC548
GND
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
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.
1. Name of re-seller
2. Problem description
3. Operating system
4. Programming method: ISP / JTAG
5. PC’s processor: Intel / AMD / etc
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.