P89LPC935 Microcontroller Tutorial - gmitWEB
P89LPC935 Microcontroller Tutorial - gmitWEB
P89LPC935 Microcontroller Tutorial - gmitWEB
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Example Code (1)<br />
//program to add 2 8-bit variables<br />
void main()<br />
{<br />
unsigned char data num1, num2, result;<br />
}<br />
num1 = 10;<br />
num2 = 25;<br />
result = num1 + num2;<br />
• This code will use 3 bytes of internal data memory (00 to 7FH)<br />
• What happens if the result exceeds 255?<br />
Diploma Project <strong>Tutorial</strong> 22