{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec1-5-BasicIO

lec1-5-BasicIO - WPI ECE2801 Foundations of Embedded...

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

View Full Document Right Arrow Icon
WPI ECE2801 Foundations of Embedded Computer Systems Lecture 5: Basic I/O Using MSP430F449
Image of page 1

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

View Full Document Right Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 5 Review: C programming and Syntax Find yourselves a good C reference!
Image of page 2
EE2801: Foundations of Embedded Systems Lecture 5 Input/Output Consider this C code for a General Purpose computer (with keyboard and monitor) #include <stdio.h> void main() { char inKey = '-'; // declare variable named inKey // and initialize it to be '-' while (inKey != 'X'); { inKey = getchar(); // get character from keyboard putchar(inKey); // display character entered on screen } } Note: getchar() and putchar() are C functions and part of the standard C.
Image of page 3

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

View Full Document Right Arrow Icon