COMP1300 / 2302 - Prac 5

Atmel AVR Studio

Updated - 3 September, 2004 Author: Len Payne, Minor modifications: Peter Sutton

Goal


See the following topics:

Preparation

Switches and LEDs

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

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

The following registers will be used:

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

Back to Contents


Procedure

AVR Studio and PonyProg Tutorials

Switches and LEDs

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

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

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

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

    1. Switch off the training system, then
    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 on the logic workstation.

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

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

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

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

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

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

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

Back to Contents


Equipment

Back to Contents


References

Back to Contents