basic-pwm-project
Default mainpagebasic-pwm-project
Description Graph
basic-pwm-project
 
Purpose
This example demonstrates a simple configuration of two PWM channels to generate variable duty cycle signals. This will cause one or more LEDs the evaluation kit to glow repeatedly.

See

Requirements
This package can be used with all Atmel evaluation kits that have PWMC interface, the package runs at SDRAM or SRAM.

Description
Two PWM channels (channel 1 and channel 2) are configured to generate a 100kHz PWM signal. On channel 1, the signal is configured as left-aligned. On channel 2, the signal is center-aligned and the polarity is inverted.

On most Atmel evaluation kits, PWM signals for channels 1 and 2 are connected to two LEDs on the board. Since the duty cycle of the PWM signals varies continuously, the two LEDs will alternate between their minimum and maximum intensity. Note that on some boards, only one LED will be connected.

Usage
  1. Build the program and download it inside the evaluation board. Please refer to the SAM-BA User Guide, the GNU-Based Software Development application note or to the IAR EWARM User Guide, depending on your chosen solution.
  2. Optionally, on the computer, open the DBGU port with a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 bits of data
    • No parity
    • 1 stop bit
    • No flow control
  3. Start the application.
  4. Depending on the board being used, either one or two LEDs will start glowing. If two LEDs are glowing, their states will be inverted (since channel 2 uses a reversed polarity).
 
Source
The documentation for this Directory was generated from the following files:
  • main.c