Professional Documents
Culture Documents
L23
L23
• Review Homework #8
• Study Timing Diagram for MAX1243
• Develop an Algorithm to Interface with the
MAX1243
Homework #8
MAX1243 10-Bit ADC
Algorithm for MAX1243
• Take the Chip Select Line Low
• Wait for EOC
• Take the CLK High
• Take CLK back Low
• Take the CLK High
• Read the Data bit
• Take the CLK Low
• …
• Bring the Chip Select Line High
Reading Serial Data
7 6 5 4 3 2 1 0
Reading Serial Data
• When Reading Serial Data, it is very
common to use a “shifting” operation
– Get the 1st bit of data
– Shift the data (inside a variable)
– Get the 2nd bit of data
– Shift the data
– …
Reading Serial Data (MSB 1st)
7
7 6
7 6 5
7 6 5 4
7 6 5 4 3 2 1 0
Reading Serial Data (LSB 1st)
0
1 0
2 1 0
3 2 1 0
7 6 5 4 3 2 1 0
Reading Serial Data
}
• If the bit of data is “set” use a Bitwise OR
to set the corresponding bit in the variable
Reading Serial Data (MSB 1st)