lec1-5-BasicIO

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

Info iconThis 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
Background image of page 1

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

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 5 Review: C programming and Syntax Find yourselves a good C reference!
Background 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.
Background image of page 3

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

View Full DocumentRight Arrow Icon
EE2801: Foundations of Embedded Systems Lecture 5 Input/Output A high-level language like C provides “canned” software routines as part of standard C Because they are so common and everybody using general computers needs to read characters from a keyboard and write to a monitor. In fact, there are several “layers” below these simple routines. The actual input/output is done by “system calls” or device drivers. Embedded systems are application specific and unique. There are certain “standard options” peripherals on-chip, such as
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.

This note was uploaded on 10/12/2009 for the course ECE 2801 taught by Professor Jarvis during the Spring '08 term at WPI.

Page1 / 11

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

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online