PICS / Microcontrollers

Slides:



Advertisements
Similar presentations
Microprocessors A Beginning.
Advertisements

Applications of PICs Advantages/disadvantages Digital and analogue control Loops, sub-routines, scanning, counting and feedback Interrupts Problems with.
EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
Microprocessors Typical microprocessor controlled devices: Camera, mobile phone, stereo, mp3 player, electronic toys… High-level microprocessor controlled.
Dr. Gary Stewardson, Raymond Boyles Hello again, Sparkey here. Slippery and I will help you explore how to create a program that simulates outputs on a.
PIC Programming with Logicator
By Solid State Workshop. ● A microcontroller is an integrated circuit that is programmed to do a specific task. ● Microcontrollers are really just “mini-computers”.
The Logic Machine We looked at programming at the high level and at the low level. The question now is: How can a physical computer be built to run a program?
CIS105 Chapter 1 Theory Review. Page 2 Hardware and Software are the two major components o any computer system Hardware is the set of physical devices.
Chapter 16 Control Unit Implemntation. A Basic Computer Model.
IT Systems Flip - Flops EN230-1 Justin Champion C208 –
Review Algorithm Analysis Problem Solving Space Complexity
PROGRAMMABLE INTERFACE CONTROLLERS Understanding what PIC’s are. How to use PIC logicator Knowing what you can do with PIC circuits.
GCSE Electronic Products
Introduction to Arduino Prepared by R. Lamond.  “Arduino is an open-source electronics prototyping platform based on flexible, easy- to-use hardware.
Module 2: Hardware and Terminology
Algorithm & Flowchart.
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Embedded Programming and Robotics
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
ARDUINO PROGRAMMING Working with the Arduino microcontroller.
PIC microcontrollers. PIC microcontrollers come in a wide range of packages from small chips with only 8 pins and 512 words of memory all the way up to.
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Programmable Systems  Electronic devices have been developed to make life more enjoyable, easier, safer or more productive.  Some examples: Microwave.
Applied Control Systems Technology. © t 4 Galway Education Centre 2 Applied Control Systems Inputs Push switches L.D.R. Microphone Tilt switch Infrared.
1 Applied Control Systems Technology. 2 Pin configuration Applied Control Systems.
8254 Programmable Interval Timer
Understanding Computers, Ch.31 Chapter 3 The System Unit: Processing and Memory.
School of Computer Science G51CSA 1 Computer Systems Architecture Fundamentals Of Digital Logic.
Introduction to Robo Pro
Do you have control? Mr. Caudy Systems and Computer Control.
How Computers Work … and how you can work them. Art 315 Lecture 03 Dr. J Parker Fall 2010.
Implementing software in IEC Languages in IEC IEC uses the following languages Instruction List – Assembly level programming using.
PICAXE Microcontrollers An Introduction by NearSys.
Algorithms & Flowchart
Starter Changes in technology are moving at a fast pace. Communication devices such as laptops, MP3 players, and mobile phones have become more and more.
EGR101-34R "lecture on hardware- software" FB 7/10/2004 Digital Electronics Logic Gates Logic gates work with the voltage level of the signals. They are.
CHAPTER-2 Fundamentals of Digital Logic. Digital Logic Digital electronic circuits are used to build computer hardware as well as other products (digital.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
PROGRAM DEVELOPMENT CYCLE. Problem Statement: Problem Statement help diagnose the situation so that your focus is on the problem, helpful tools at this.
Slide 1 Controlling Sequences of Events Traffic lights Event table.
Prepared by: Engr. Qurban Ali Memon 11ES (SEC- 1 & 2)
Slide 1 Computer Control The Gig. Slide 2 What features in the program can help us run the lighting & smoke effects? The computer is good at controlling.
Computer operation is of how the different parts of a computer system work together to perform a task.
Basic Elements of Processor ALU Registers Internal data pahs External data paths Control Unit.
Flowcharts. Learning Objectives To learn how to break down tasks How to create a flowchart.
Slides created by: Professor Ian G. Harris Embedded Systems  Embedded systems are computer-based systems which are embedded inside another device (car,
Traditionally ladder logic programs have been written by thinking about the process and then beginning to write the program. This always leads to programs.
Digital-to-Analog Analog-to-Digital Week 10. Data Handling Systems  Both data about the physical world and control signals sent to interact with the.
Processor Organization and Architecture Module III.
An introduction to PIC’s for KS3 and KS4. Mr Rooks Hetton School.
PLC APPLICATIONS MODULE 3 Time sequence processes.
 A transistor is the basic building block of electronic components.  The average computer may have millions of them within its circuits.  Essentially,
PLC APPLICATIONS MODULE 3 Time sequence processes.
Types of Micro-operation  Transfer data between registers  Transfer data from register to external  Transfer data from external to register  Perform.
Lesson 1 PLC BASICS. PLC Definition  Programmable Logic Controllers are industrial computers that control machine and other applications.  PLC have.
The Electronic Die Using the PICAXE 08
For further information
THE CPU i Bytes 1.1.
AQA GCSE 7 Electronic systems processing Design and Technology 8552
fischertechnik® RoboPro Software for Gateway To Technology® RoboPro
ECET 405 Innovative Education--snaptutorial.com
Unit# 9: Computer Program Development
Logic Gates Practical Objective: to develop an understanding of logic circuits and truth tables.
Welcome to Digital Electronics using the Arduino Board
CSCI1600: Embedded and Real Time Software
Digital Fundamentals Floyd Chapter 1 Tenth Edition
CSCI1600: Embedded and Real Time Software
Arduino म्हणजे काय?.
Flowchart Symbols What do these mean:.
Presentation transcript:

PICS / Microcontrollers

Objectives Understand: What is a Microcontroller (µC)-PIC What are the pros & cons of using µC’s How to design using µC’s Flowcharts Basic pseudo code Microcontrollers

What is a microcontroller (µC) What is a microcontroller (µC)? PIC; Programmable integrated circuit is a microcontroller The “process” element of any system it belongs to Microcontrollers

What is a microcontroller ? Essentially: a complete computer system on a chip ! CPU Flash Memory (same as a USB memory stick) Digital Inputs & outputs Most (but not all) µC’s also have analog inputs Need to be programmed to make them do something useful Microcontrollers

Some Example µC Applications Microcontrollers

microcontroller’s Lot of different types of PICs exist We use Genie Stamp Picaxe OOPic Arduino We use Genie Can be simulated & programmed whilst in circuit from a host computer via a USB cable from circuit wizard Microcontrollers

Task Generate 2 lists: What inputs could potentially be connected to a microcontroller (PIC) ? What outputs could potentially be connected to a microcontroller (PIC) ? For each input & output, draw the symbol that is associated with it Microcontrollers

Sample Task answer Microcontrollers

µC Sizes PICAXE-18M GENIE-E18 PICAXE-14M GENIE-C14 PICAXE-08M PICAXE-28X GENIE-E28 Microcontrollers

Functionality A µC can be programmed to perform any logical function Counting / maths Sequencing Latching Delays / timing Decoding Encoding Conditional switching For simple functions, it may be more cost efficient to use dedicated hardware (counter chips / timer chips / logic gates) Microcontrollers

Clocks A microcontroller (PIC) executes one instruction every time it receives a clock pulse TASKS: 1. Draw a clock waveform 2. Name a circuit that can produce a clock waveform? Some simple microcontroller’s have internal clock generator circuits Can also use crystals to generate very precise, very fast clocks Microcontrollers

Microcontroller (PIC) Considerations Cost For simple functions, may be more expensive than simple logic For complex functions may be more efficient Speed Typical clock speed for a Genie is 8MHz May be slower than dedicated hardware Complexity The hardware is very simple The complexity of design is in the programming (firmware) Flexibility microcontroller’s can be changed very easily during production or in the field (maintenance & reuse) Size Much more space efficient than dedicated logic or PC’s for complex functions Power supply They require a very precise voltage between 3.3 and 5.0 Volts Microcontrollers

Review What is a microcontroller (PIC) µC ? Do microcontroller’s do anything useful without being programmed ? What could they be used for ? Does changing the circuit function require a change to the electronic hardware ? Does removing the power mean that the microcontroller needs reprogramming ? What are some of the advantages of microcontroller’s What are some of the disadvantages of microcontroller’s Microcontrollers

How are microcontroller’s (PIC)Programmed ? A program is developed & simulated on a PC downloaded to the PIC via a programming cable The program can be written directly using a programming language BASIC C Other The program can be translated from a flow diagram Microcontrollers

Review How many times do you need to connect the microcontroller to a PC ? How is the program developed on the PC ? How do you know if the program you have written is going to do the right thing before you download it ? Microcontrollers

Flowcharts - symbols Terminator: used to start or stop a program Process box Describes an action of some sort The action may or may not be dependant on inputs The action may not affect any outputs Only one arrow may enter or leave the box Decision box Different routes out of the box can be taken depending upon a condition One arrow enters the box and two leave the box - arrows leaving the box should be labelled Set outputs 1 or more system outputs may change state Only one arrow may enter or leave the box Data flow direction arrows Microcontrollers

Flowchart Example Specification: start Specification: Turn on the lights as soon as it goes dark Turn all lights off Is it dark ? no yes Turn all lights on Microcontrollers

Flowchart Task You have 5 minutes !! A quiz game for 2 players Each player has a switch to activate a buzzer You must decide which was pressed first and indicate your result by lighting one of two LED’s for 5 seconds start You have 5 minutes !! Microcontrollers

start Turn off both LED’s Switch 1 pressed ? no yes Turn on LED 1 no Wait 5s Turn on LED 2 Wait 5s Microcontrollers

Task Show the sequence of events needed in the design of a pedestrian crossing A switch gets pressed and the man goes from red to green ....... What else ???? You have 5 minutes !! Microcontrollers

Traffic light = yellow (flashing) start Task Answer Traffic light = green “man” = red Switch pressed ? Traffic light = yellow “man” = red yes no Wait 2s Traffic light = red “man” = green Wait 20s Traffic light = yellow (flashing) “man” = red Wait 2s Microcontrollers

Exam Questions For the past 3 years, at least one big question has been on Microcontroller (µC)-PIC questions can be worth up to 22 marks This is 2 full grades worth of marks ! Don’t worry about types of Microcontroller (µC)-PIC or exact programming code Think about the logical processing flow that has to happen to make a function work Microcontrollers