Analog to Digital Conversion and Pulse Width Modulation ECE Senior - - PowerPoint PPT Presentation

β–Ά
analog to digital conversion and pulse width modulation
SMART_READER_LITE
LIVE PREVIEW

Analog to Digital Conversion and Pulse Width Modulation ECE Senior - - PowerPoint PPT Presentation

Analog to Digital Conversion and Pulse Width Modulation ECE Senior Design 28 February 2017 Analog to Digital Conversion 2 n -1 111 = 110 2 101 10-bit Conversion and V ref = 5V Digital Value 100 011 5 5


slide-1
SLIDE 1

Analog to Digital Conversion and Pulse Width Modulation

ECE Senior Design 28 February 2017

slide-2
SLIDE 2

Analog to Digital Conversion

2n-1

000

Digital Value Analog Voltage VDD/2n VDD

001 010 011 100 101 110 111

𝑀𝑇𝑐 = πΊπ‘‡π‘Š 2π‘œ 10-bit Conversion and Vref = 5V 𝑀𝑇𝑐 =

5 210 = 5 1024 = 4.9π‘›π‘Š/𝑐𝑗𝑒

slide-3
SLIDE 3

PIC 16F18324 A/D Converter

  • 10-bit Converter
  • 11 External Channels Available
  • External VREF+ and VREF- Available
  • Auto Conversion Trigger
slide-4
SLIDE 4
slide-5
SLIDE 5

10-bit A/D Result Format

slide-6
SLIDE 6

ADC Clock Selection

5𝑣𝑇

slide-7
SLIDE 7

ANSELA: PORTA Analog Select

slide-8
SLIDE 8

ADCON0

slide-9
SLIDE 9

ADCON1

slide-10
SLIDE 10
slide-11
SLIDE 11

Pulse Width Modulation (PWM)

Vdd Voltage Time Effective Voltage

1 Cycle 50% 50% Duty Cycle Voltage = Vdd*0.50

slide-12
SLIDE 12

PWM 20% Duty Cycle

Vdd Voltage Time Effective Voltage

1 Cycle 20% Duty Cycle Voltage = Vdd*0.20 20%

slide-13
SLIDE 13

PWM 80% Duty Cycle

Vdd Voltage Time Effective Voltage

1 Cycle 80% Duty Cycle Voltage = Vdd*0.80 80%

slide-14
SLIDE 14

PWM Sine Generation

slide-15
SLIDE 15

CCP & PWM

  • 2 CCP Modules
  • 2 PWM Modules
  • Timer 2 Sets Freq
slide-16
SLIDE 16

Dedicated PWM Module

PWM Output on PPS Registers:

  • TMR2
  • PR2
  • PWMxCON
  • PWMxDCH
  • PWMxDCL
slide-17
SLIDE 17

PWMxCON

slide-18
SLIDE 18

T2CON

slide-19
SLIDE 19

Peripheral Pin Select

Inputs:

Each Peripheral Has A PPS Register XXX – Specifies the Peripheral

Outputs:

Each I/O Pin Has A PPS Register Rxy – Specifies the Pin

slide-20
SLIDE 20

RxyPPS Output Select