ECS Lab 1: Timer Basics

main( )
{
// initialization part omitted 
while (1)  // runs forever
{
	x = readAD( );		// read input from A/D module
	u = compute(x); 	 // compute control varialbles
	DAout (u);		// send output to D/A module
}

Listing 1: C-program for ECS lab 1 (timer basics)

Reference

  1. S. Siewert. Real-Time Embedded Systems and Components, Thompson, 2007.
  2. L.D. Jasio. Programming 32-bit Microcontrollers in C, Elsevier, 2008.

MPLAB X project: Lab1X.zip

Comments

comments

Comments are closed.