Table of Contents
OVERVIEW: .............................................................................................................................................. 3
PORTS: ................................................................................................................................................................... 3
PIN DESCRIPTION: ................................................................................................................................ 5
WRITING THE CODE ............................................................................................................................. 7
1. AVR STUDIO .................................................................................................................................................. 7
BURNING THE CODE ........................................................................................................................... 14
1. AVR osp-2 .................................................................................................................................................... 14
2. SINA PROG 2.1 ............................................................................................................................................. 22
INTERFACE ............................................................................................................................................. 25
1. LED BLINKING .............................................................................................................................................. 25
2. LCD .............................................................................................................................................................. 27
3. PULSE WIDTH MODULATION ....................................................................................................................... 30
4. ADC ............................................................................................................................................................. 32
5. KEYPAD ....................................................................................................................................................... 36
SERIAL COMMUNICATION: ............................................................................................................... 39
What is the USART? ............................................................................................................................................. 39
Setting up the Hardware ...................................................................................................................................... 39
Setting up HyperTerminal .................................................................................................................................... 40
Initializing the USART........................................................................................................................................... 43
Sending and receiving data .................................................................................................................................. 44
CODE: .................................................................................................................................................................. 45