Application of Microcontrollers Labs Part I - Principles & The ... - ISL
Application of Microcontrollers Labs Part I - Principles & The ... - ISL
Application of Microcontrollers Labs Part I - Principles & The ... - ISL
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Microcontroller <strong>Labs</strong> - <strong>Part</strong> I (V0.9p)<br />
7. (2 pts) Complete the PBASIC2 code to accept a serial byte on P6 using the SERIN<br />
command. <strong>The</strong> data will be a non-inverted 8-bit transmission at 19200 baud and saved to the<br />
variable ByteIn. Use a timeout <strong>of</strong> 1 second.<br />
Loop:<br />
ByteIn var byte<br />
Timeout:<br />
Debug "Timed out",CR<br />
Goto Loop<br />
8. (9 pts) Write code for a serial transmitter/receiver. <strong>The</strong> transmitter will send the setting <strong>of</strong><br />
the Activity Board potentiometer scaled to fit in a byte at 9600 baud on P2 every 1 second.<br />
<strong>The</strong> receiver will read the byte on P3, re-scale it back to the approximate original value, and<br />
sound the speaker at the specified frequency.<br />
30