ablelogic AVR-DK20A User Manual

Avr development board
Table of Contents

Advertisement

Quick Links

ablelogic
AVR Development Board
User Manual
Model: AVR-DK20A
ablelogic
Training System Manufactured & Designed by Vision Venture Technology Sdn Bhd (VVT)
URL: www.ablelogic.com.my or www.vvtec.com
Technical Support: enquiry@vvtec.com

Advertisement

Table of Contents
loading

Summary of Contents for ablelogic AVR-DK20A

  • Page 1 AVR Development Board User Manual Model: AVR-DK20A ablelogic Training System Manufactured & Designed by Vision Venture Technology Sdn Bhd (VVT) URL: www.ablelogic.com.my or www.vvtec.com Technical Support: enquiry@vvtec.com...
  • Page 2: Table Of Contents

    4.2 Steps to install the AVR USB Programmer, USB driver............ 15 4.3 Installation of AVR8 Burn-O-Mat v2 software: ..............17 Chapter 5 – Connecting the USB Programmer with the AVR-DK20A Development Board ............................20 5.1 Using ISP Method ....................... 20 5.2 Setting for programming the AVR Using ISP Method: .............
  • Page 3 AVR Development Board – AVR-DK20A User Manual A.3 Tutorial 1b – Running LEDs ....................34 A.4 Experiment 2 – Dip Switch to LEDs Display ..............35 A.5 Tutorial 2 – Sensing 01h to light ON 8-bit LEDs, else turn OFF LEDs ......35 A.6 Experiment 3 –...
  • Page 4: Packing List

    AVR Development Board – AVR-DK20A User Manual Packing List Before operating your AVR-DK20A, please ensure that you have the following items: • AVR Development Board User Lab Manual • AVR Development Board Utilities CD • ATMEGA32L8PU(40-pin) • Mini Jumpers • 2x16 LCD Display fitted on board •...
  • Page 5: Welcome

    (if suitable circuitry is not already present on board) to suit user applications. The AVR-DK20A is designed as a AVR Development Board which works along with connecting a AVR programmer using the on board ISP connector. All the on board applications are open circuit, which mean you can connect the I/O according to your own design by using any of the AVR I/O ports (e.g.
  • Page 6: Chapter 1 - Introduction To Avr-Dk20A

    AVR Development Board – AVR-DK20A User Manual Chapter 1 – Introduction to AVR-DK20A 1.1 AVR Development Board Features 1.1.1 The AVR Development board supports the following Devices: • 20 Pin Devices ATtiny2313 • 28 Pin Devices ATmega8 • 40 Pin Devices ATmega32L, ATmega16, ATmega8535L 1.2 Board Features...
  • Page 7: Chapter 2 - Getting Started

    AVR Development Board – AVR-DK20A User Manual Chapter 2 – Getting Started 2.1 The AVR Development Board and Application Modules Layout...
  • Page 8 AVR Development Board – AVR-DK20A User Manual The AVR Development comes with a demonstration AVR IC, ATmega32L. The application of the AVR-DK20board is open architecture. You may connect the I/O ports to the specific applications I/O by using the mini jumpers or jumper wires.
  • Page 9 AVR Development Board – AVR-DK20A User Manual NC – not connected...
  • Page 10: Isp Connector Pin

    AVR Development Board – AVR-DK20A User Manual 2.2a ISP connector pin MOSI MISO JTAG VTREF NSRST 2.2b PWM channel output pin...
  • Page 11: Pin Configuration Of U1, U2 And U3

    AVR Development Board – AVR-DK20A User Manual 2.3 PIN Configuration of U1, U2 and U3...
  • Page 12 AVR Development Board – AVR-DK20A User Manual U1 – Can use for ATtiny2313. U2 - Can use for ATmega8. U3 - Can use for ATmega32, ATmega32L, ATmega16, ATmega8535L.
  • Page 13: Chapter 3 - Schematic Diagram

    AVR Development Board – AVR-DK20A User Manual Chapter 3 – Schematic diagram For U1(20pins) and U2 (28pins), all the pins are opened. They are not connected to any XTAL circuit. A wire can be use to connect the XTAL1 and XTAL2 pin to the external XTAL circuit on board.
  • Page 14 AVR Development Board – AVR-DK20A User Manual...
  • Page 15: Chapter 4 - Basic Steps In Using The Avr-Prg1 Usb Programmer

    AVR Development Board – AVR-DK20A User Manual Chapter 4 - Basic Steps In Using The AVR-PRG1 USB Programmer Make sure to install WinAVR first before the USB programmer setup 4.1 Steps to install the WinAVR and AVR Studio: 1. Downloading the needed files from Beside AVR Studio 4, which is available at http://atmel.com/avrstudio/, the most recent service pack for AVR Studio should be...
  • Page 16 AVR Development Board – AVR-DK20A User Manual 5. Then, click NEXT. 6. Then, choose the box with “Install from a list or specific location (Advnaced)” and click NEXT again. 7. Then, make sure the setting is same as the figure below. Browse to the “Driver AVR- PRG1”...
  • Page 17: Installation Of Avr8 Burn-O-Mat V2 Software

    AVR Development Board – AVR-DK20A User Manual 4.3 Installation of AVR8 Burn-O-Mat v2 software: A free AVR8 Burn-O-Mat v2 installer can be downloaded from http://www.brischalle.de/avr8_burn-o-mat_avrdude_gui/avr8_burn_o_mat_avrdude_gui_en.html or from the CD provided. 2. After downloading, installation can be started by double click the setup.exe file.
  • Page 18 AVR Development Board – AVR-DK20A User Manual 4.4 Setting and Writing the Fuse for AVR IC In order to make sure the PORTC of the AVR is working fine. We must disable the JTAG feature in order to fully control and access the PORTC port of the AVR IC.
  • Page 19 AVR Development Board – AVR-DK20A User Manual 3. A “Open File Windows” will be pop out. Select the avrfuse.xml file from the “..avr\avrfuse” directory. You may find this in the AVR Utilities CD supplied. Click “Open” to load the file.
  • Page 20: Chapter 5 - Connecting The Usb Programmer With The Avr-Dk20A Development Board

    DK20A Development Board 5.1 Using ISP Method Connect the 10-way IDE Cable at ISP of the AVR-DK20A Development Board and ICD10 at the AVR-PRG1 USB programmer. Then connect the USB Cable to the USB port at the USB Programmer AVR-PRG1.
  • Page 21: Setting For Programming The Avr Using Isp Method

    AVR Development Board – AVR-DK20A User Manual 5.2 Setting for programming the AVR Using ISP Method: DIP Switches setting for Program and RUN the AVR IC. Refer to SW2 and SW3 on the AVR- DK20A Development Board. Kindly remind that, when program the hex file to the microcontroller, the switches have to be switched to Program Mode by following the position of the PROG printed on the development board.
  • Page 22: Chapter 6 - Experiment Lab Exercise

    AVR Development Board – AVR-DK20A User Manual Chapter 6 – Experiment Lab Exercise 6.1 Experiment 1 – Blinking LEDs Port Setting : Set Port B as Output Jumper Setting: LK9-LK16 (B0-L0, B1-L1, B2-L2, B3-L3, B4-L4, B5-L5, B6-L6, B7-L7) Objective: Create a project, output a value 55H (hex) on the 8-bit LEDs.
  • Page 23 AVR Development Board – AVR-DK20A User Manual (a) Tutorial 1a – Flow Chart Start Initialize I/O Infinity Loop Set all LED ON Delay 200ms Set all LED OFF Delay 200ms...
  • Page 24 AVR Development Board – AVR-DK20A User Manual (b) Tutorial 1b – Flow Chart Start Initialize I/O Infinity Set y = 1, Set t = 0x80 i < 7? i < 7? Output y to LED Output t to LED Delay 150ms...
  • Page 25: Experiment 2 - 8-Ways Dip Switches To 8 Output Leds

    AVR Development Board – AVR-DK20A User Manual 6.2 Experiment 2 – 8-Ways DIP Switches to 8 Output LEDs Jumper Setting: LK9-LK16 (B0-L0, B1-L1, B2-L2, B3-L3, B4-L4, B5-L5, B6-L6, B7-L7) : LK17-LK24 (C0-DP0, C1-DP1, C2-DP2, C3-DP3, C4-DP4, C5-DP5, C6-DP6, C7- DP7)
  • Page 26 AVR Development Board – AVR-DK20A User Manual Tutorial 2 – Flow Chart Start Initialize I/O Infinity Loop Reading input from DIP Switch Input = 01h? 8-Bit LEDs = ON 8-Bit LEDs = ON...
  • Page 27: Experiment 3 - Drive Buzzer On And Off

    AVR Development Board – AVR-DK20A User Manual 6.3 Experiment 3 – Drive Buzzer ON and OFF Jumper Setting: LK1 (A0-BZ) Port Setting : Set Port A bit 0 as output Objective: Create a project, set the buzzer on and off with delay.
  • Page 28: Experiment 4 - 2 Digit Seven Segment

    AVR Development Board – AVR-DK20A User Manual 6.4 Experiment 4 – 2 DIGIT SEVEN SEGMENT Jumper Setting :LK9-LK14 (B0-A, B1-B, B2-C, B3-D, B4-DIG1, B5-DIG2) Port Setting: Set Port B as output Objective: Create a decimal counter project, and count from 0 to 9.
  • Page 29: Experiment 5 - Lcd Display

    AVR Development Board – AVR-DK20A User Manual 6.5 Experiment 5 – LCD Display Jumper Setting: LK2-LK8 (A1-EN, A2-RS, A3-RW, A4-LD4, A5-LD5, A6-LD6, A7-LD7) Port Setting: Set Port A as output Objective: Create a project, output a text “Hello World!” on LCD Display.
  • Page 30 AVR Development Board – AVR-DK20A User Manual Tutorial 4a – Flow Chart: Start Initialize I/O Infinity Loop LCD Initialization Clear LCD Screen and Set LCD Cursor OFF 4-Bit Displayed “ LCD EXP” Hello Displayed “ World! ” on 2 row of LCD...
  • Page 31 AVR Development Board – AVR-DK20A User Manual Tutorial 4b – Flow Chart: Start Initialize I/O Infinity Loop LCD Initialization Clear LCD Screen and Set LCD Cursor Displayed “4Bit LCD Display” on 1 of LCD & “Exmaple” on 2 Clear Screen and display “PIC-ATS800- V2”...
  • Page 32 AVR Development Board – AVR-DK20A User Manual Move text 7 times to left? Move text 7 times right? Shift LCD Display Shift LCD Display...
  • Page 33: Experiment 6 - Keypad & Lcd

    AVR Development Board – AVR-DK20A User Manual 6.6 Experiment 6 – Keypad & LCD Jumper Setting : LK9-LK16 (LEDs) (L0-B0, L1-B1, L2-B2, L3-B3, L4-B4,L5-B5, L6-B6, L7-B7) : LK17-LK24(Keypad) (C0-CL1,C1-CL2,C2-CL3,C4-RW1,C5-RW2,C6-RW3,C7-RW4) : LK2-LK8 (LCD) (A1-EN, A2-RS, A3-RW, A4-LD4, A5-LD5, A6-LD6, A7-LD7) : LK9-LK14 (7-Segment) (B0-A,B1-B,B2-C,B3-D,B4-DIG1,B5-DIG2) Port Setting: Set PortA as output, Port C lower 4-bit as output, upper 4-bit as input.
  • Page 34: Appendix - Experiment And Tutorial Answer In Mikroc

    AVR Development Board – AVR-DK20A User Manual Appendix – Experiment and Tutorial Answer in MikroC A.1 Experiment 1 – Output 55H to LEDs Display //Experiment 1 //Title : Output value 10101010 on 8-bit output LEDs //Jumper for LEDs : LK9 to LK16...
  • Page 35: Experiment 2 - Dip Switch To Leds Display

    AVR Development Board – AVR-DK20A User Manual delay_ms(150); j = j << 1; //shift y value to left for (i =0; i < 7; i++){ portb = t; delay_ms(150); t = t >> 1; //shift t value to right while (1);...
  • Page 36: Experiment 3 - Buzzer

    AVR Development Board – AVR-DK20A User Manual x = PINC; if (x==0x01) PORTB = 0xff; //reading input data from PORTC and output to PORTB else PORTB = 0x00; } while(1); A.6 Experiment 3 – Buzzer //Experiment 3 //Title : Buzzer...
  • Page 37: Tutorial 3 - 7-Segment 00-99 Decimal Counter

    AVR Development Board – AVR-DK20A User Manual } while (1); A.8 Tutorial 3 – 7-Segment 00-99 decimal counter //Tutorial 3 //Title : A Decimal 7-segment display counter, count from 00 to 99 //Jumper for 7segment : LK9-LK14 //Jumper Setting: B0-A,B1-B,B2-C,B3-D,B4-DIG1,B5-DIG2 unsigned char j,g,temp1,temp2, counter1;...
  • Page 38: Experiment 5 - Display "Hello World!" To Lcd Display

    AVR Development Board – AVR-DK20A User Manual A.9 Experiment 5 – Display “Hello World!” to LCD Display //Experiment 5 //Title : LCD Display //Jumper for LCD : LK2-LK8 //Jumper Setting: A1-E,A2-RS,A3-RW,A4-LD4,A5-LD5,A6-LD6,A7-LD7 // LCD module connections sbit LCD_RS at PORTA2_bit; sbit LCD_EN at PORTA1_bit;...
  • Page 39: Tutorial 4A - Display Words To Lcd

    AVR Development Board – AVR-DK20A User Manual A.10 Tutorial 4a – Display words to LCD 1 and 2 row of the LCD Display //Tutorial 4a //Title : LCD Display //Jumper for LCD : LK2-LK8 //Jumper Setting: A1-E,A2-RS,A3-RW,A4-LD4,A5-LD5,A6-LD6,A7-LD7 // LCD module connections sbit LCD_RS at PORTA2_bit;...
  • Page 40: Tutorial 4B - Scrolling Words On Lcd Display

    //Display a word - 2n Rom of LCD : Example //Clear screen //Display a word and scrolling left right on 1st row : "Ablelogic AVRKit" //Display a word and scrolling left right on 2nd row : "AVR-DK20A" // LCD module connections sbit LCD_RS at PORTA2_bit;...
  • Page 41 AVR Development Board – AVR-DK20A User Manual Lcd_Cmd(_LCD_SHIFT_RIGHT); delay_ms(500); while(1) { // Endless loop for(i=0; i<8; i++) { // Move text to the left 7 times Lcd_Cmd(_LCD_SHIFT_LEFT); delay_ms(500); for(i=0; i<8; i++) { // Move text to the right 7 times Lcd_Cmd(_LCD_SHIFT_RIGHT);...
  • Page 42: Experiment 6 - Keypad Scanning To Leds Display

    AVR Development Board – AVR-DK20A User Manual A.12 Experiment 6 – Keypad scanning to LEDs Display //Experiment 6 //Title : Keypad scanning and output to 8-bits LEDs Display //Jumper for LEDs : LK9 to LK16 //Jumper Setting: L0-B0, L1-B1, L2-B2, L3-B3, L4-B4,L5-B5, L6-B6, L7-B7...
  • Page 43 AVR Development Board – AVR-DK20A User Manual PORTB = 0x05; delay_ms(100); if (PINC6_bit = 1){ PORTB = 0x08; delay_ms(100); if (PINC7_bit = 1){ PORTB = 0x0b; delay_ms(100); } while(1);...
  • Page 44: Tutorial 5 - Keypad Scanning To Lcd Display

    AVR Development Board – AVR-DK20A User Manual A.13 Tutorial 5 – Keypad scanning to LCD Display //Tutorial 5 //Title : Keypad scanning and LCD Display //Jumper for LCD : LK2-LK8 //Jumper Setting: A1-E,A2-RS,A3-RW,A4-LD4,A5-LD5,A6-LD6,A7-LD7 //Jumper for Keypad : LK17-LK19, LK21-LK24 //Jumper Setting: C0-CL1,C1-CL2,C2-CL3,C4-RW1,C5-RW2,C6-RW3,C7-RW4 // LCD module connections sbit LCD_RS at PORTA2_bit;...
  • Page 45 AVR Development Board – AVR-DK20A User Manual delay_ms(100); if (PINC7_bit = 1){ lcd_out(1,i,"9"); delay_ms(100); PORTC = 0x02; //2nd column if (PINC4_bit = 1) { lcd_out(1,i,"1"); delay_ms(100); if (PINC5_bit = 1){ lcd_out(1,i,"4"); delay_ms(100); if (PINC6_bit = 1){ lcd_out(1,i,"7"); delay_ms(100); if (PINC7_bit = 1){ lcd_out(1,i,"A");...
  • Page 46: Tutorial 6 - Keypad Scanning To 7-Segment Display

    AVR Development Board – AVR-DK20A User Manual A.14 Tutorial 6 – Keypad scanning to 7-Segment Display //Tutorial 6 //Title : Keypad scanning and output to 7-Segment Display //Jumper for 7segment : LK9-LK14 //Jumper Setting: B0-A,B1-B,B2-C,B3-D,B4-DIG1,B5-DIG2 //Jumper for Keypad : LK17-LK19, LK21-LK24...
  • Page 47 AVR Development Board – AVR-DK20A User Manual if (PINC5_bit = 1){ PORTB = 0x25; delay_ms(100); if (PINC6_bit = 1){ PORTB = 0x28; delay_ms(100); if (PINC7_bit = 1){ PORTB = 0x2b; delay_ms(100); } while(1);...

Table of Contents