Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = 1 2 8 x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent.

Slides:



Advertisements
Similar presentations
8086 [2] Ahad. Internal! External? 8086 vs _bit Data Bus 20_bit Address 8_bit Data Bus 20_bit Address Only external bus of 8088 is.
Advertisements

PROGRAMMABLE PERIPHERAL INTERFACE -8255
4-1 Timers Timers can be used for  timing  event counting  pulse width measurement  pulse generation  frequency multiplication There are 8 Timers.
Microcontroller Programming II MP6-1
Programmable Interval Timer
Sistemi Elettronici Programmabili13-1 MULTI OSC + CLOCK FILTER LVD POWER SUPPLY CONTROL 8 BIT CORE ALU PROGRAM MEMORY RAM I2CI2C PORT A SPI PORT B 16-BIT.
Slides created by: Professor Ian G. Harris PIC Development Environment MPLAB IDE integrates all of the tools that we will use 1.Project Manager -Groups.
Chapter 2 HARDWARE SUMMARY
Introduction of Holtek HT-46 series MCU
1 TK2633TK Microprocessor Architecture DR MASRI AYOB.
Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 * C167CS not yet supported by DAvE V1.0 CD ROM. See “Hints regarding DAvE.” Exercise 7ASC_1.
Using PDG with e2studio: Example
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
BLDC MOTOR SPEED CONTROL USING EMBEDDED PROCESSOR
SKP8CMINI-15,17 Tutorial 1 Software Development Process using HEW4
NS Training Hardware. System Controller Module.
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Timers and Interrupts Shivendu Bhushan Sonu Agarwal.
The 8051 Microcontroller architecture
Khaled A. Al-Utaibi  8086 Pinout & Pin Functions  Minimum & Maximum Mode Operations  Microcomputer System Design  Minimum Mode.
Serial Peripheral Interface Module MTT M SERIAL PERIPHERAL INTERFACE (SPI)
Silicon Labs ToolStick Development Platform
NetBurner MOD 5282 Network Development Kit MCF 5282 Integrated ColdFire 32 bit Microcontoller 2 DB-9 connectors for serial I/O supports: RS-232, RS-485,
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
8253 TIMER. Engr 4862 Microprocessors 8253 / 8254 Timer A.k.a. PIT (programmable Interval Timer), used to bring down the frequency to the desired level.
PIT: Programmable Interval Timer
ARM Timers.
System Clocks.
The 8051 Microcontroller and Embedded Systems
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
Page 1 D&C EBV Seminar June 2003 Motor Demo C868 Chevillot/Jansen June 2003 N e v e r s t o p t h i n k i n g. Infineon C868 Hands On Training CAPCOM6.
Timers.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
CHAPTER HARDWARE CONNECTION. Pin Description 8051 family members ◦ e.g., 8751, 89C51, 89C52, DS89C4x0) ◦ Have 40 pins dedicated for various functions.
Siemens Microelectronics, Inc. December 98 Slide 1 HOT50x-5 Version 1.0 HOT50x-5 An Add-On to the HOT50x_1 Hands-On Training Materials for the 8bit Family.
ELE22MIC Lecture 18 The AVR Sleep Modes The ATMEGA128’s Timer System
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
1 68HC11 Timer Chapter HC11 Timer Subsystem Several timing functions: Basic timing Basic timing Real time interrupts Real time interrupts Output.
MCS51 - lecture 6. Lecture 6 1/32 Extending MCS51 system Built-in peripherals MCS51 family.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Timers and Interrupts Anurag Dwivedi. Let Us Revise.
Automatic accident avoiding system PROJECT MEMBERS MUTHUKUMAR.K (05ME33) SAKTHIDHASAN.S (05ME39) SAKTHIVEL.N (05ME40) VINOTH.S (05ME56) PROJECT GUIDE:
8254 Timer.
1 68HC11 Timer HC11 or HC12: Chapter HC11 Timer Subsystem  Several timing functions: Basic timing Basic timing Real time interrupts Real time.
© 2009, Renesas Technology America, Inc., All Rights Reserved 1 Course Introduction  Purpose This course provides an introduction to the peripheral functions.
Network and Systems Laboratory nslab.ee.ntu.edu.tw.
ChibiOS/RT Demo A free embedded RTOS
Device Overview 1.  The advantages of all PIC18Fxxxx microcontrollers:  High computational performance  High-endurance  Enhanced Flash program memory.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
#1 of 10 Tutorial Introduction PURPOSE -To explain how to configure and use the Timer Interface Module in common applications OBJECTIVES: -Identify the.
SGDRS Software System Design Justin A. King WWU EET Senior project 2013.
8255:Programmable Peripheral Interface
Components of a typical full-featured microcontroller.
DEPARTMENT OF ELECTRONICS ENGINEERING V-SEMESTER MICROPROCESSOR & MICROCONTROLLER 1 CHAPTER NO microcontroller & programming.
Mobile phone keypad sensed password entry for door opening.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
Application Case Study Christmas Lights Controller
Why are Timer Functions Important?
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
Copyright © Infineon Technologies AG All rights reserved.
Timer and Interrupts.
UNIT – Microcontroller.
Programmable Interval Timer
Project Title EVM IN PIC Under the Guidance of Submitted by.
UNIT 19 PWM 로봇 SW 교육원 조용수.
8051 Micro Controller.
CHAPTER HARDWARE CONNECTION.
Programmable Interval Timer
Presentation transcript:

Infineon Technologies Corp. June 99 1 HOT167-1 Version 2.0 F PWMmax = x 50ns = 78 kHz Pulse Width Modulation Unit (PWM) (20 MHz)  4 independent PWM channels each with its own time-base 50ns or 12.8µs timer-resolution provides a very wide frequency range to generate PWM signals Programmable output polarity Up to 78 KHz at 8-bit PWM resolution  Four operation modes Standard, edge-aligned PWM Symmetrical, center-aligned PWM for asynchronous motor control Burst-mode for modulated PWM signals Single-shot mode

Infineon Technologies Corp. June 99 2 HOT167-1 Version 2.0 PWM unit Frequencies and Resolution PMW Unit Frequencies and Resolution in Mode 1 Operation (SYMMETRICAL) PMW Unit Frequencies and Resolution in Mode 0 Operation (EDGE-ALIGNED) Resolution Input Clock 20 MHz) 8 Bit10 Bit12 Bit14 Bit16 Bit CPU Clock (50ns Resolution) CPU Clock / 64 (3.2µs Res.) 39.1 KHz 610 Hz 9.77 KHz Hz 2.44 KHz Hz 610 Hz 9.54 Hz Hz 2.4 Hz Resolution Input Clock 20 MHz) 8 Bit10 Bit12 Bit14 Bit16 Bit CPU Clock (50ns Resolution) CPU Clock / 64 (3.2µs Res.) 78.1 KHz 1.22 KHz 19.5 KHz 305 Hz 4.88 KHz 76.3 Hz 1.22 KHz 13.1 Hz 305 Hz 4.77 Hz

Infineon Technologies Corp. June 99 3 HOT167-1 Version 2.0 Run Enable Timer PT0-PT3 Comparator Shadow Register INTR Flag FlagINTR PWM unit Function Diagram Input Mode Control Pulse Width Reg. PW0-PW3 Shadow Register 4 identical PWM Channels with common Interrupt Control Register Period Register PP0-PP3 Output Polarity Enable 20 MHz 78 KHz at 20 MHz CPU Clock PWM Outputs Comparator up/down,clear

Infineon Technologies Corp. June 99 4 HOT167-1 Version 2.0 PWM unit - Mode 0 and 1 Contents of the PWx Register Interrupt Request and Latch of the Shadow Register Contents of the PWx Register IR and Latch of the Shadow Register Timer Period Contents of the Period Register (PPx) PWM Mode 0: Standard PWM’s or Edge-Aligned PWM’s PWM Mode 1: Symmetrical or Center-Aligned PWM’s PWM Signal If all channels are programmed to mode 0, edge-aligned PWM signals will be generated. A duty cycle from 0 to 100% is programmable If all channels are programmed to mode 1, center-aligned PWM signals will be generated. A duty cycle from 0 to 100% is programmable PWM Signal Possible PWM Signals from other channels programmed to the same mode: PWMx PWMy

Infineon Technologies Corp. June 99 5 HOT167-1 Version 2.0 PWM unit - Burst Mode / Single Shot Mode Burst Mode : Burst Sequence by combining PWM channel 0 and 1 Single Shot : Only one PWM Pulse is generated Mode available for channel 2 and 3 Period Value Pulse width Value Period Value Internal Signal of Channel 0 Period of Timer PT1 Int. Signal of Channel 1 Output Result: Channel 1 is modulated by Channel 0 Output Signal Timer is automatically stopped Timer is released by Software again The Timer can be dynamically changed to lengthen (retrigger) or shorten the output pulse Timer Period Timer Period PT0

Infineon Technologies Corp. June 99 6 HOT167-1 Version 2.0 Overview Port Structure  The Port lines provide the connection to the external world 111 Port lines on the C167  All Port lines are individually addressable and all I/0 lines are independently programmable for input or output  Each Port line is dedicated to one or more peripheral functions  Each Port is protected with fast diodes  Programmable open drain buffers P2, 3, 6, 7, 8 on the C167

Infineon Technologies Corp. June 99 7 HOT167-1 Version 2.0 Direction Register Output Latch Alternate Output Alternate Enable ReadDirection Write Clock Alternate Input Internal Bus Overview Port Structure Buffer Mux Buffer Input Latch Open Drain Control VCC Vss Port Pin ESD structure

Infineon Technologies Corp. June 99 8 HOT167-1 Version 2.0 Exercise 7PWM_1 - Two edge-aligned PWM Signals with the PWM unit  Objective: Generate an edge-aligned 25% duty cycle PWM Signal using PWM channel 1 (Period: 1ms) Generate an edge-aligned 50% duty cycle PWM Signal using PWM channel 3 (Period: 1ms)

Infineon Technologies Corp. June 99 9 HOT167-1 Version 2.0 * C167CS not yet supported by DAvE V1.0 CD ROM. See “Hints regarding DAvE.” Exercise 7PWM_1- DAvE Configurations  Start DAvE  Create new Project with microcontroller C167CR/CS* Project name: 7pwm_1 Select project path: c:\hot167_1\7pwm_1  Project Settings: General: -Select Keil Compiler, SMALL model System Clock: -External Oscillator Frequency: Set to 5 MHz Startup Configuration: -Bus Type after Reset: Set to 16 bit DEMUX -Write Configuration: Pin #WR and #BHE operates as #WRL and #WRH Save & close

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_1 - DAvE Configurations (cont.)  Configure PWM: Control: -Configure Channel 1: -General: Use PWM Channel 1 -PWM Channel Mode Control: Standard PWM (edge aligned) -Channel Output Enable: Enable Channel 1 output signal -PWM Timer Start Control: Start PWM Timer 1 after init -Period: Required Period: 1000 us -Duty Cycle: Required Duty Cycle: 25% -Save & Close -Configure Channel 3: -General: Use PWM Channel 3 -PWM Channel Mode Control: Standard PWM (edge aligned) -Channel Output Enable: Enable Channel 3 output signal -PWM Timer Start Control: Start PWM Timer 3 after init -Period: Required Period: 1000 us -Duty Cycle: Required Duty Cycle: 50% -Save & Close

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_1 - DAvE Configurations (cont.)  Configure PWM (cont.) Functions: -Include PWM initialization function PWM_vInit Save & Close  Configure Port 7: Port 7: -DAvE has reserved P7.1 and P7.3 for the PWM alternate functions with 0 as initial output -Don’t enable general purpose IO! Functions: -Include port initialization function IO_vInit Save & close  Generate Code

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_1 - µVision2 Configurations  Start µVision2  New Project  Add Files: Go to Project | Targets, Groups, Files… Click ‘Groups / Add Files’ Select ‘Source Group 1’ Click ‘Add Files to Group’ Select all C files and click ‘add’ Enter file name ‘start.asm’, click ‘add’ (Assembler Startup File) Click ‘Close’ and ‘OK’ Double-click all files in the Project Window to open them  Select Target Hardware (kitCON-167): Go to Project | Options for Target ‘Target 1’ Go to ‘Debug’ tab Click ‘Settings’ (upper right hand corner) Monitor configuration: select ‘Phytec KC167’ Click ‘OK’ twice

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_1 - µVision2 Configurations (cont.)  Edit MAIN.C: include endless loop in main(): // USER CODE BEGIN (Main,2) while(1) {}; // USER CODE END

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_1 - Running the Program  Reset Target Hardware (Press Reset Button on Starter Kit)  Build Project (Project | Rebuild Target)  Run integrated Debugger from within µVision2 Debug | Start / Stop Debug Session (click ‘OK’ when prompted) The Debugger will load the Keil Monitor into the kitCON-167’s RAM via bootstrap loader Object file c:\hot167_1\7pwm_1\7pwm_1 will be loaded automatically and the debugger will go to main().  Go! (Debug | Go)  Program Verification: Connect Scope to P7.1 / POUT1 (connector X3 pin 121) P7.3 / POUT3 (connector X3 pin 122)

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - Two center-aligned PWM Signals with the PWM unit  Objective: Generate a center-aligned 25% duty cycle PWM Signal using PWM channel 1 (Period: 250 us) Generate a center-aligned 50% duty cycle PWM Signal using PWM channel 3 (Period: 250us)

Infineon Technologies Corp. June HOT167-1 Version 2.0 * C167CS not yet supported by DAvE V1.0 CD ROM. See “Hints regarding DAvE.” Exercise 7PWM_2 - DAvE Configurations  Start DAvE  Create new Project with microcontroller C167CR/CS* Project name: 7pwm_2 Select project path: c:\hot167_1\7pwm_2  Project Settings: General: -Select Keil Compiler, SMALL model System Clock: -External Oscillator Frequency: Set to 5 MHz Startup Configuration: -Bus Type after Reset: Set to 16 bit DEMUX -Write Configuration: Pin #WR and #BHE operates as #WRL and #WRH Save & close

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - DAvE Configurations (cont.)  Configure PWM: Control: -Configure Channel 1: -General: Use PWM Channel 1 -PWM Channel Mode Control: Symmetrical PWM (center aligned) -Channel Output Enable: Enable Channel 1 output signal -PWM Timer Start Control: Start PWM Timer 1 after init -Period: Required Period: 250 us -Duty Cycle: Required Duty Cycle: 25% -Save & Close -Configure Channel 3: -General: Use PWM Channel 3 -PWM Channel Mode Control: Symmetrical PWM (center aligned) -Channel Output Enable: Enable Channel 3 output signal -PWM Timer Start Control: Start PWM Timer 3 after init -Period: Required Period: 250 us -Duty Cycle: Required Duty Cycle: 50% -Save & Close

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - DAvE Configurations (cont.)  Configure PWM (cont.) Functions: -Include PWM initialization function PWM_vInit Save & Close  Configure Port 7: Port 7: -DAvE has reserved P7.1 and P7.3 for the PWM alternate functions with 0 as initial output Functions: -Include port initialization function IO_vInit Save & close  Generate Code

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - µVision2 Configurations  Start µVision2  Open Project c:\hot167_1\7pwm_1\7pwm_1.uv2 (Project | Open Pr.)  Add Files: Go to Project | Targets, Groups, Files… Click ‘Groups / Add Files’ Select ‘Source Group 1’ Click ‘Add Files to Group’ Select all C files and click ‘add’ Enter file name ‘start.asm’, click ‘add’ (Assembler Startup File) Click ‘Close’ and ‘OK’ Double-click all files in the Project Window to open them  Select Target Hardware (kitCON-167): Go to Project | Options for Target ‘Target 1’ Go to ‘Debug’ tab Click ‘Settings’ (upper right hand corner) Monitor configuration: select ‘Phytec KC167’ Click ‘OK’ twice

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - µVision2 Configurations (cont.)  Edit MAIN.C: include endless loop in main(): // USER CODE BEGIN (Main,2) while(1) {}; // USER CODE END

Infineon Technologies Corp. June HOT167-1 Version 2.0 Exercise 7PWM_2 - Running the Program  Reset Target Hardware (Press Reset Button on Starter Kit)  Build Project (Project | Rebuild Target)  Run integrated Debugger from within µVision2 Debug | Start / Stop Debug Session (click ‘OK’ when prompted) The Debugger will load the Keil Monitor into the kitCON-167’s RAM via bootstrap loader Object file c:\hot167_1\7pwm_1\7pwm_1 will be loaded automatically and the debugger will go to main().  Go! (Debug | Go)  Program Verification: Connect Scope to P7.1 / POUT2 (connector X3 pin 121) P7.3 / POUT4 (connector X3 pin 123)