Embedded Systems Lab Tutorial PDF

Summary

This document is a tutorial on embedded systems, covering topics such as system examples, embedded system definitions, characteristics of embedded systems, and examples of how microcontrollers are used.

Full Transcript

EMBEDDED SYSTEMS LAB ♣ Syllabus ♣ Embedded systems. Today’s ♣ CCS instructions revision. agenda INTRODUCTION What is a system? o A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or set of rules. o A system is also an arrangement...

EMBEDDED SYSTEMS LAB ♣ Syllabus ♣ Embedded systems. Today’s ♣ CCS instructions revision. agenda INTRODUCTION What is a system? o A system is a way of working, organizing or doing one or many tasks according to a fixed plan, program or set of rules. o A system is also an arrangement in which all its units assemble and work together according to the plan or program. SYSTEM EXAMPLE ◦ Watch: It is a time display SYSTEM Parts: Needles, Battery, Dial, Chassis and Strap ◦ Rules 1. All needles move clockwise only 2. A thin needle rotates every second 3. A long needle rotates every minute 4. A short needle rotates every hour 5. All needles return to the original position after 12 hours What is an embedded system? ◦ Definition: An embedded system can be thought of as a computer hardware system having software embedded in it. ◦ An embedded system can be an independent system, or it can be a part of a large system. ◦ An embedded system is a microcontroller or microprocessor-based system which is designed to perform a specific task. For example, a fire alarm is an embedded system; it will sense only smoke. The embedded system is unlike the Single general-purpose computer, which is engineered to manage a wide range of functioned processing tasks. Executes a single program, repeatedly. Characteristics Tightly- of embedded constrained Low coast, low power, small, fast, etc. systems Reactive Continually reacts to changes in the system’s environment. and real- Must compute certain results in real time time. without delay. Embedded System Example ◦ Air conditioner. Microcontroller o In our lab we will use PIC 16f877a. CCS Instruction Set_tris_a(0x00); //port A pins are all output. Output_d(0xff); //output high to all port d pins. Output_bit(pin_D2,1); //output high to pin D2 GENERAL Output_low(pin_C0); //output low to pin C0 I/O PINS FUNCTIONS Input(pin_c1); //pin read. input_a( ); // Inputs an entire word from port a. Example INTERFACE WITH LCD o #include //Should be used before any other function o Lcd_init(); //Initialize LCD o lcd_gotoxy(x,y); // Determine cursor position o printf(lcd_putc,”%s \f \n\b”,x); //Print on LCD o lcd_getc(x,y); // Returns a character at position x,y on LCD Example

Use Quizgecko on...
Browser
Browser