You are on page 1of 3

PROCESSOR

WITH
ARM
PWM
EX.NO:8 INTERFACING

DATE: a1lio la022


cyci
AIM variable duty
PWM with
to generate a
nis example describes how

Components Required:
CRO
PS- CORTEX-M4-TYRO-V412, Mini USB cable,

Procedure PCPWMI
1. Power: In the PCONP register, set bit
IOcON_P2_0 to IOCON_
P2_6.
P2.0 to P2.6 for PWM using
C o n f i g u r e pins
clock).
value for PWM (peripheral
3. Select the clock source and clock

.Set match value for PWM match channel


0 (Frequency of PWM ie period)
each channel (Match
registers)
5. Select and update the duty cycle for
6. Select the single edge mode of PwM
needed)
7. Enable PWM Channel Output and Interrupts (If

Connections:
HARDWARE
OUTPUT
PIN OUT CONNECTIONS

(PWMI)
CHI P2.0

CH2 P2.1
Measure the pulse width and duty cycle using
CH3 P2.2
J7-PWM CRO@J7 pins 1-7
CH4 P2.3
CHS P2.4 Each pulse has different duty cycle

CH6 P2.5
CH7 P2.6

PROGRAM:

tintucle LPC4DTx-8x ITtx -

3x*h
dele Po MPRE S ALE 2
/30 PCR Cycles to inuuamarct /by i e ) LHituoArcl
Page 76 of 105
Noid in it -pom (VDib);

ms (lor ms
Dol olalay
tmoin Cooid
R
intPuwm (\i
uub (1)

InE-Pum Cvovd)
a a t bit PePwHL
P - 3 2 -PconP C2))

endb beue h PwM 1"/

a Cenqo Piizs Pa d to PaS' PwH wt'rg ILDN -2-0-

PC toP
-

IocON >Pr-d=l7
/Pin Pa b to Pa uscol as PU
LPC -

IaoN > P-I 19=

tON > P 2=j


PC loco > Pa -3 =19

PC- locoN Pa-4 1


PC 0cong

PC P HI > PtR =
oD
9rap-3- Sekc Singl Edg PWH y dslault rts sgL
oclpol &o 1fus 1tno Cn be suumouo
Lec. fwAM PR PWH PRE SAe 1, -

Page 77 of 105
91e 4. l u
s404Dlut/ph C3DH4| lBd) tHHz
LePWM| > HRD IDo bo
tep-5 om9 ItdCo us beuoo olunahen te bo
1b. beleut te cherurol
cach
cluy og cle ber
LPC qwH > RL-qs0O

Duby s 7
PC PwH-SLee Or1F

Pwu b h pwHL outfat


PC PwM >Top = Czo)
IIena courtw ad
Cu)
Pwu Hle

t8 Resot the Counb


LPCPwuI->tce =Clet);

Roset fWH TC Crd RR


VDId cdelcu (lg-
ms m
holay lme
olelay me p tburt cCLR tRb HI&
S.NO INPUT OUTPUT

loncy
Lab Questions fo Ct=O, mS, '++)
1. Differentiate between RISC and CISC
RICR

You might also like