Difference: Lecture7:AccessingTheRealWorld (5 vs. 6)

Revision 62017-11-01 - uli

Line: 1 to 1
 
META TOPICPARENT name="LectureSlides"

Start Presentation

Slide 1: Accessing the Real World

Line: 291 to 291
 

Bit handling functions

We need to learn a few bit handling functions before being able to prepare the data for the DAC:
| : bitwise or
& : bitwise and
data += 5 <=> data = data + 5
data |= 5 <=> data = data | 5
~data: invert all bits in data
data >> 4 all bits in data are shifted right by 4
data << 4 all bits in data are shifted left by 4

Changed:
<
<

---++

>
>

 

Writing data to a DAC

Imagine a 12 bit digital to analogue converter with the following register outline:

Line: 306 to 307
  The medium significant digit to register 1
(RS=01)
Changed:
<
<
And the highest significant digit to register 2
(RS=01)
>
>
And the highest significant digit to register 2
(RS=10)
  To strobe the data into the register the strobe line must see a low to high transition
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback