From: Subject: Prac 2 - Atmel AVR Studio Date: Thu, 2 Aug 2007 11:29:23 +1000 MIME-Version: 1.0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: http://www.itee.uq.edu.au/~elec2002/pracs/prac_2/index.html X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138 Prac 2 - Atmel AVR Studio

ELEC2002 - Prac 2

Atmel AVR Studio

Updated - 18 July, 2005 Author: Len Payne, Minor = modifications: Peter = Sutton=20

Goal


See the following topics:=20

Back to = Lab=20 Experiment Index=20


Preparation

Switches and LEDs

Write an assembly language program for the = AVR8515=20 Project Board to:=20

The skeleton code for this program is provided in prac2= .asm.=20 Replace the lines ";<-YOUR CODE=20 HERE->" with your code.=20

The following registers will be used:=20

DDRB=20 Port B Data Direction Register=20
PORTB=20 Port B Data Register=20
DDRC=20 Port C Data Direction Register=20
PINC=20 Port C Input Pins Address

Back=20 to Contents=20


Procedure

AVR Studio and PonyProg Tutorials

Switches and LEDs

Use the knowledge that you have gained from = the=20 tutorials to assemble your solution program from the Preparation = section=20 and program it into the device on the AVR8515 Project Board.=20

With your program in the device on the project board, carry out the = following=20 steps:=20

  1. When using the Grey-Box power supply (47-311):=20
    1. Switch off the power supply to the project board and = logic=20 workstation.

    When using the ETS-7000 Digital-Analog Training System:=20

    1. Switch off the training system, then=20
    2. Switch off the power supply to the project board. =

  2. Connect wires from the eight PORT B pins on the project board to = the LEDs=20 on the logic workstation.=20

  3. Connect wires from the eight PORT C pins on the project board to = the=20 toggle switches on the logic workstation.=20

  4. Connect a wire from the GND pin on the project board to a GND pin = on the=20 logic workstation.=20

  5. When using the Grey-Box power supply (47-311):=20
    1. Switch on the power supply to the project board and logic = workstation.=20

    When using the ETS-7000 Digital-Analog Training System:=20

    1. Switch on the power supply to the project board, then=20
    2. Switch on the training system.

  6. Press the red reset button on the project board.=20

  7. Set various values on the switches and check that the 2's = complement of=20 these values is indeed shown on the LEDs.=20

Back=20 to Contents=20


Equipment

Back=20 to Contents=20


References

Back=20 to Contents=20