ARM Session 3 2010, Spring Copyright © 2012 Mohammad Moallemi.

Slides:



Advertisements
Similar presentations
PROGRAMMABLE PERIPHERAL INTERFACE -8255
Advertisements

More fun with Timer/Counters
Programmable Interval Timer
8253/54 Timer Section /54 Timer Description and Initialization
Programmable Keyboard/ Display Interface: 8279
8088 Microprocessor Hardware. Microprocessor System Modules CPU Memory (RAM, ROM) Peripherals (IO) Data Bus Control Bus Address Bus Keyboard Monitor Printer.
Spartan II Features  Plentiful logic and memory resources –15K to 200K system gates (up to 5,292 logic cells) –Up to 57 Kb block RAM storage  Flexible.
Decision Tree.
مثال های کاربردی (1) محاسبه سطوح دايره ای شکل –آبياری بارانی –سم پاشها تعريف مسئله: تهيه برنامه ای که بر اساس يک شعاع مفروض ورودی سطح دايره متناظر را محاسبه.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
1.  8051 Timers “count up,” incrementing the Timer’s respective “count register” each time there is a triggering clock pulse. 2  When the “count register”
1 Timing System Timing System Applications. 2 Timing System components Counting mechanisms Input capture mechanisms Output capture mechanisms.
Lecture 5. AT91 - Memory Map, Timers, and AIC -
SC200x Peripherals Broadband Entertainment Division DTV Source Applications July 2001.
8254 Programmable Interval Timer
ENEE 440 Chapter Timer 8254 Register Select The 8254 timer is actually 3 timers in one. It is an upgraded version of the 8253 timer which was.
7/23 Timers in Coldfire Processor Computer Science & Engineering Department Arizona State University Tempe, AZ Dr. Yann-Hang Lee (480)
PIT: Programmable Interval Timer
ARM Timers.
System Clocks.
16F877A. Timer 0 The Timer0 module timer/counter has the following features: –8-bit timer/counter –Readable and writable –8-bit software programmable.
MS_uC / fue1 / V TIMx - Timer Programming Microcontroller TIMx - Timer Autumn term 2012.
The 8253 Programmable Interval Timer
AT91 Embedded Peripherals
ECE 447 Fall 2009 Lecture 10: TI MSP430 Timers and Capture Modes.
Timers.
CCP MODULES  The CCP module (Capture/Compare/PWM) is a peripheral which allows the user to time and control different events.  Capture Mode provides.
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
Input / Output (Peripheral) Interfacing
8254 Timer.
KyungHee Univ. 1-0 Parallel Input/Output Controller (PIO)
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.
Timer 1 and 2 operation, PWM Principles. Timer 1 Operation.
Lecturer: Reza Arjmandi Autumn 2015
 The Programmable Interrupt Controller (PlC) functions as an overall manager in an Interrupt-Driven system. It accepts requests from the peripheral equipment,
Timer Counter 1 Lecturer: Reza Arjmandi Autumn 2015 Lecture 14, 15: Introduction Timer/Counter1 Registers, initialization.
8255:Programmable Peripheral Interface
Analog to Digital Converter(ADC) Lecturer: Reza Arjmandi Autumn 2015 Lecture 18: Introduction ADC Unit and initialization.
ADC 1 Analog to Digital Converter. ADC 2 ADC Features n General Features -Supports 8 or 10-bit resolution Modes, -Track period fully programmable up to.
Timer modules in PIC 16F877.  The PIC 16F877 basically has three independent timer modules,  denoted by the symbols, TIMER-0, TIMER1,andTIMER2. . These.
8255 Programmable Peripheral Interface
16F877A.
Why are Timer Functions Important?
ARM AT91EB55 Development Board & ATMEL AT91M55800A ARM7TDMI
Lecture 10: TI MSP430 Timers and Capture Modes
Timer and Interrupts.
NS Training Hardware.
Programmable Interval Timer
Programmable Interval Timer
Programmable Interval Timer 8254 LECTURE 3
Session 7,8.
Interrupt and Exception Programming
Pugazhendhi.M 11/12/2018 TIMERS 11/12/2018 CCET CCET.
8254 Timer and Counter (8254 IC).
Atmel ARM Timer Programming
AT91 Memory Interface This training module describes the External Bus Interface (EBI), which generatesthe signals that control the access to the external.
Route configuration for 5400W ADSL Router
مقدمه اي بر مهندسي نيازمنديها
Timers.
Programmable Interval timer 8253 / 8254
اصطکاک Designed By: Soheil Soorghali.
Programmable Interval timer 8253 / 8254
فصل ششم مدارهای ترتیبی.
Programmable Peripheral Interface
Lecture 12 Multi-Function Timer Pulse Unit 2 (MTU2a)
8253 – PROGRAMMABLE INTERVAL TIMER (PIT). What is a Timer? Timer is a specialized type of device that is used to measure timing intervals. Timers can.
Programmable Interval Timer
ADSP 21065L.
Presentation transcript:

ARM Session , Spring Copyright © 2012 Mohammad Moallemi

Timer - Counter  سه واحد تایمر/کانتر 16 بیتی کاملا مجزا و قابل برنامه ریزی مستقل  هر کانال دارای3 رودی کلاک خارجی، 5 ورودی کلاک داخلی و دو ورودی/ خروجی قابل تنظیم توسط کاربر  کار در دو مد کاری مختلف: Capture Mode : به منظور اندازه گیری بر روی سیگنال ورودی به سیستم (فرکانس- اختلاف فاز – دوره تناوب و...) Waveform Mode : به منظور تولید شکل موج های مورد نیاز

منابع کلاک تایمر- کانتر : PB12/ETXER/TCLK0 PB19/PWM0/TCLK1 PA15/SPI0_NPCS3/TCLK2 PB23/TIOA0/DCD1 PB24/TIOB0/DSR1 PB25/TIOA1/DTR1 PB26/TIOB1/RI1 PB27/TIOA2/PWM0/AD0 PB28/TIOB2/PWM1/AD1 منابع کلاک داخلی منابع کلاک خارجی ورودی / خروجی واحد TC TIOA0,TIOA1,TIOA2 می توانند ورودی کلاک هم باشند

چند نکته  I/O Lines The pins used for interfacing the compliant external devices may be multiplexed with PIO lines. The programmer must first program the PIO controllers to assign the TC pins to their peripheral functions.  Power Management The TC is clocked through the Power Management Controller (PMC), thus the programmer must first configure the PMC to enable the Timer Counter clock.  Interrupt The TC has an interrupt line connected to the Advanced Interrupt Controller (AIC). Handling the TC interrupt requires programming the AIC before configuring the TC.

منابع کلاک تایمر- کانتر : منابع کلاک داخلی نماینده کلاک خارجی The clock of each counter can be controlled in two different ways: it can be enabled/disabled and started/stopped

TC Operating Modes Each channel can independently operate in two different modes: Capture Mode provides measurement on signals. Waveform Mode provides wave generation. The TC Operating Mode is programmed with the WAVE bit in the TC Channel Mode Register. In Capture Mode, TIOA and TIOB are configured as inputs. In Waveform Mode, TIOA is always configured to be an output and TIOB is an output if it is not selected to be the external trigger.

Trigger A trigger resets the counter and starts the counter clock. Three types of triggers are common to both modes, and a fourth external trigger is available to each mode. The following triggers are common to both modes: Software Trigger: Each channel has a software trigger, available by setting SWTRG in TC_CCR. SYNC: Each channel has a synchronization signal SYNC. When asserted, this signal has the same effect as a software trigger. The SYNC signals of all channels are asserted simultaneously by writing TC_BCR (Block Control) with SYNC set. Compare RC Trigger: RC is implemented in each channel and can provide a trigger when the counter value matches the RC value if CPCTRG is set in TC_CMR. The channel can also be configured to have an external trigger. In Capture Mode, the external trigger signal can be selected between TIOA and TIOB. In Waveform Mode, an external event can be programmed on one of the following signals: TIOB, XC0, XC1 or XC2. This external event can then be programmed to perform a trigger by setting ENETRG in TC_CMR. If an external trigger is used, the duration of the pulses must be longer than the master clock period in order to be detected. Regardless of the trigger used,

TC – Capture Mode

TC – Waveform Mode

WAVSEL

TC Registers

External Clock Selection  In all cases, if an external clock is used, the duration of each of its levels must be longer than the master clock period. The external clock frequency must be at least 2.5 times lower than the master clock. External Clock Frequency < 2.5 MCK

External Clock Selection پس در صورتی که قصد استفاده از کلاک خارجی برای واحد TC را داشتیم این رجیستر را (TC_BMR) مقدار دهی می کنیم.

Channel Control Reg.

Chanel Mode Reg.

Chanel Mode Reg. [Capture Mode]

Chanel Mode Reg. [Waveform Mode]

1. If TIOB is chosen as the external event signal, it is configured as an input and no longer generates waveforms and subsequently no IRQs.

Chanel Mode Reg. [Waveform Mode]

Counter Value / A-B-C Reg.  رجیستر های B و C نیز همانند رجیستر A می باشند.