L7 Algorithms and Flowcharts

L7 Algorithms and Flowcharts - Algorithms and Flowcharts...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon
Algorithms and Flowcharts ECET 209 – Lecture 7 Introduction to Microcontrollers
Background image of page 1

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 2 Overview • Example Algorithms • Flowcharts and C Code
Background image of page 2
ECET 209 Purdue University 3 Formal Problem Solving Steps • Understand the Problem • Develop an Algorithm • Refine the Algorithm • Create an Action Plan • Generate a Solution • Test the Solution
Background image of page 3

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 4 Algorithms • Step by step method to solve a problem • Must include ALL required information
Background image of page 4
ECET 209 Purdue University 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 6 Flowcharts • Graphical representations of algorithms • Few basic symbols – Terminal – Processes – Decisions • Tool to translate algorithms into software – Flowcharts of C structures – Rules for Structured Flowcharting
Background image of page 6
ECET 209 Purdue University 7 Flowcharting
Background image of page 7

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 8 Decisions
Background image of page 8
ECET 209 Purdue University 9 Decisions
Background image of page 9

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 10 Decisions
Background image of page 10
ECET 209 Purdue University 11 Decisions
Background image of page 11

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 12 For Loop vs. While Loop
Background image of page 12
ECET 209 Purdue University 13 Decision
Background image of page 13

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

View Full DocumentRight Arrow Icon
ECET 209 Purdue University 14 So Many Decisions, How do I choose? • Flexibility –For Examp le • Any For Loop can be expressed as a While Loop • Any Case Switch structure can be replaced by a series of IF/ELSE structures • The Flowchart is your guide!
Background image of page 14
ECET 209 Purdue University 15 Follow the Flowchart • May have to redraw the flowchart several times to get it into a form that fits one of the C structures.
Background image of page 15

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

View Full DocumentRight Arrow Icon
Image of page 16
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/22/2012 for the course ECET 209 taught by Professor Richardson during the Fall '08 term at Purdue.

Page1 / 44

L7 Algorithms and Flowcharts - Algorithms and Flowcharts...

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

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