ECE 4436 Lecture Notes - Lecture 17: Clock Rate, 3

58 views5 pages

Document Summary

Analog input conversion of analog voltage to digital value for use in the computer: ex: 2. 5v converts to 8-bit digital value (0x40, conversion performed by atd device. 3 ways to use this port: a/d (analog inputs only, analog and digital inputs, gpio (digital inputs and digital outputs) To use digital input: bit set (1) atddien, bit cleared (0) ddrad. To use digital output: bit set (1) ddrad. Configure pad2 - pad6 as analog input: ddrad = 0b00000000. Configure pad0, pad1, and pad7 as digital input: atddien = 0b10000011. Atdctl5: djm result register data justification. 1 = right justified (must be unsigned: dsgn result register data signed/unsigned. 1 = signed: scan continuous conversion sequence mode. 1 = continuous conversion sequences: mult multi-channel sample mode. 0 = sample only one channel entire sequence (default) 1 = sample across channels: cc, cb, ca analog input channel select code, cc:cb:ca = 0-7 = channel # (default is channel 0)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents