5 Test Setup

The firmware provided along with this application note has been developed using Atmel Studio 7 and tested on STK600. Since some pin functionalities differ among both the devices, the configurations will be managed through device.h file.

Test Setup for ATmega64:
  1. Timer 2 Ouput Compare (OC2) is used to generate PWM on pin PB7.
  2. Timer 1 Input Capture (ICP1) is used to measure the pulse width through Pin PD4. Use a single-wire jumper to connect PB7 with PD4.
  3. The measured Duty Cycle is displayed through the Port C pins that are connected to the LEDs available in STK600. Use a 10-wire jumper to connect PORTC header with LEDs header.
Test Setup for ATmega328PB:
  1. Timer 2 Ouput Compare (OC2A) is used to generate PWM on pin PB3.
  2. Timer 1 Input Capture (ICP1) is used to measure the pulse width through Pin PB0. Use a single-wire jumper to connect PB3 with PB0.
  3. The measured Duty Cycle is displayed through the Port D pins that are connected to the LEDs available in STK600. Use a 10-wire jumper to connect PORTD header with LEDs header.
Note:
  1. More information about programming an AVR microcontroller is available at References.
  2. ATmega64 and ATmega328PB requires different Routing and Socket cards when used along with STK600. For more information, refer the links provided in References.