1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Lecture Microcomputer principles and applications - Chapter 8: Analog-to-Digital Converter

21 41 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 21
Dung lượng 694,52 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

To transform an analog signal into a digital one, the analog-to-digital converter (ADC) samples the input at fixed interval and do the conversion.

Trang 1

Chapter 8

Analog-to-Digital Converter

Trang 2

8.1 Introduction

Microcomputer principles and applications

To transform an analog signal into a digital one, the

analog-to-digital converter (ADC) samples the input at fixed interval

and do the conversion

11:55:05

Trang 3

8.1 Introduction

Microcomputer principles and applications

Trang 4

8.1 Introduction

Microcomputer principles and applications

MSP430 may contain one or more converters:

• Comparator: Compare the voltages on its two input terminals

and return 0 or 1, e.g., Comparator_A+

• Successive-approximation ADC: Use binary search to

determine the closest digital representation of the input signal,

e.g., ADC10 and ADC12 to give 10 and 12 bits of output

• Sigma-delta ADC: A more complicated ADC that gives higher

resolution (more bits) but at a slower speed, e.g., SD16 and

SD16_A, both of which give a 16-bit output

11:55:05

Trang 5

8.1 Introduction

Microcomputer principles and applications

Trang 6

8.2 ADC10 Control Registers - ADC10CTL0

Microcomputer principles and applications

11:55:05

Trang 7

8.2 ADC10 Control Registers - ADC10CTL0

Microcomputer principles and applications

Trang 8

8.2 ADC10 Control Registers - ADC10CTL0

Microcomputer principles and applications

11:55:05

Trang 9

8.2 ADC10 Control Registers - ADC10CTL1

Microcomputer principles and applications

Trang 10

8.2 ADC10 Control Registers - ADC10CTL1

Microcomputer principles and applications

11:55:05

Trang 11

8.2 ADC10 Control Registers - ADC10CTL1

Microcomputer principles and applications

Trang 12

8.2 ADC10 Control Registers - ADC10AE0

Microcomputer principles and applications

Analog (Input) Enable Control Register 0

11:55:05

Trang 13

8.2 ADC10 Control Registers - ADC10AE1

Microcomputer principles and applications

Analog (Input) Enable Control Register 1

Trang 14

8.2 ADC10 Control Registers - ADC10MEM

Microcomputer principles and applications

Conversion-Memory Register, Binary Format

11:55:05

Trang 15

8.2 ADC10 Control Registers - ADC10MEM

Microcomputer principles and applications

Conversion-Memory Register, 2s Complement Format

Trang 16

8.2 ADC10 Control Registers - ADC10DTC0

Microcomputer principles and applications

Data Transfer Control Register 0

11:55:05

Trang 17

8.2 ADC10 Control Registers - ADC10DTC1

Microcomputer principles and applications

Data Transfer Control Register 1

Trang 18

8.2 ADC10 Control Registers - ADC10SA

Microcomputer principles and applications

Start Address Register for Data Transfer

11:55:05

Trang 19

8.3 Main components of ADC10

Microcomputer principles and applications

• Built-in voltage reference: Two selectable voltage levels, 2.5V

and 1.5V

• Setting REFON in ADC10CTL0 register to 1 enables the internal

reference

• Setting REF2_5V in ADC10CTL0 to 1 selects 2.5 V as the

internal reference, otherwise 1.5V

• After voltage reference is turned on, we must wait about 30µs

for it to settle

Trang 20

8.4 Steps for single conversion

Microcomputer principles and applications

• Configure ADC10, including the ADC10ON bit to enable the

module The ENC bit must be clear so that most bits in

ADC10CTL0 and ADC10CTL1 can be changed

• Set the ENC bit to enable a conversion This cannot be done

while the module is being configured in the previous step

• Trigger the conversion.This is done either by setting the

ADC10SC bit or by an edge from Timer_A

• ADC10ON, ENC, ADC10SC are all in control register

ADC10CTL0

11:55:05

Trang 21

8.5 ADC10 Interrupts

Microcomputer principles and applications

One interrupt and one interrupt vector:

• When DTC is not used (ADC10DTC1 = 0), ADC10IFG is set

when conversion results are loaded into ADC10MEM

• When DTC is used (ADC10DTC1 > 0), ADC10IFG is set when a

block transfer completes

If both ADC10IE and GIE bits are set:

• ADC10IFG generates an interrupt request

• ADC10IFG is automatically reset when interrupt request is

serviced, or it may be reset by software

Ngày đăng: 12/02/2020, 18:37