{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture23 - 0306-250 Assembly Language Programming Lecture...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
0306-250 Assembly Language Programming Lecture Twenty-Three: Lab in Week Seven Midterm Review
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Week Seven Connections 2 ATD Connect potentiometer (POT) from project board to HCS12 AN3 through MCU pin 24 Get 10-bit unsigned digital value for voltage PWM Connect servo (white) control input to HCS12 PWM0 through MCU pin 9 Connect servo to lab workstation power supply (red) power input to +5 V (black) ground input to GND Connect project board GND to power supply GND Generate 20-ms PWM servo control signal
Background image of page 2
Week Seven Pseudocode 3 Initialize ATD, PWM, and SCI Repeat { Prompt user to adjust potentiometer Wait for user to adjust and then press a key Get A/D conversion of potentiometer voltage Print digital value Compute new servo position Print new servo position Adjust PWM to move servo to position } forever
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Week Seven New Output Subroutine 4 Need to print unsigned word value Write subroutine PutNumW –Input: D: Unsigned word value to print
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}