University of Pennsylvania 1 The BASIC Stamp 2. University of Pennsylvania 2 The BASIC Stamp 2 Serial Signal Conditioning Conditions voltage signals between.

Slides:



Advertisements
Similar presentations
Introduction to PIC Microcontrollers
Advertisements

Microcontroller – PIC – 4 PIC types PIC architecture
Introduction 2 BASIC Stamp®. Microcontrollers Microcontrollers can be thought of as very small computers which may be programmed to control systems such.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
Read Chapter 3 (David E. Simon, An Embedded Software Primer)
1 ECE 263 Embedded System Design Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System.
GCSE Computing - The CPU
Microcontrollers Instructor:Shuvra Das mechanical engineering department University of Detroit Mercy.
The 8051 Microcontroller Architecture
Digital I/O Connecting to the Outside World
Engineering 1040: Mechanisms & Electric Circuits Fall 2011 Introduction to Embedded Systems.
Micro controllers A self-contained system in which a processor, support, memory, and input/output (I/O) are all contained in a single package.
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.
COMPONENTS OF THE SYSTEM UNIT
1 © Unitec New Zealand Embedded Hardware ETEC 6416 Date: - 10 Aug,2011.
Atmega32 Architectural Overview
Objectives How Microcontroller works
E0001 Computers in Engineering1 The System Unit & Memory.
Introduction to Computing: Lecture 4
Revised: Aug 1, ECE 263 Embedded System Design Lesson 1 68HC12 Overview.
MICRO CONTROLLER MODULE 1. Learning Objectives Name some gadgets that use microcontrollers. Define a microcontroller. Differentiate between a computer.
MOBILE OPERATING ROBOT ON EMBEDDED SYSTEM
Computers Are Your Future Eleventh Edition Chapter 2: Inside the System Unit Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall1.
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Prepared by Eng. Musa Alyaman1 Chapter Seven Chapter Seven PIC16F87x.
The Central Processing Unit: What Goes on Inside the Computer
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
CHAPTER 4 The Central Processing Unit. Chapter Overview Microprocessors Replacing and Upgrading a CPU.
Chapter 2 Introducing the PIC Mid-Range Family and the 16F84A The aims of this chapter are to introduce: The PIC mid-range family, in overview The overall.
ME456: Mechatronics Prof. Clark J. Radcliffe Mechanical Engineering
1 Chapter 1: Getting Started Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by: Martin A. Hebel.
July 7, 2003 Slide 1 of 6 Automation, Robotics and Mechatronics Lab, SUNY at Buffalo Introduction To Programming Chetan Jadhav Talib Bhabharawala Seung-Kook.
Microcontrollers Class : 4th Semister E&C and EEE Subject Code: 06ES42
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
INTRODUCTION TO PIC MICROCONTROLLER. Overview and Features The term PIC stands for Peripheral Interface Controller. Microchip Technology, USA. Basically.
Digital Electronics Introduction to Microcontrollers and the Board of Education.
ME456:Mechatronics WAM Chapter 1: Getting Started Prof. Clark J. Radcliffe Mechanical Engineering Michigan State University
The Computer System.
Presented by Sadhish Prabhu
Computer operation is of how the different parts of a computer system work together to perform a task.
Department of Electronic & Electrical Engineering Introduction to microcontrollers A microcontroller is a small computer on a single integrated circuit.
Chapter 2.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Chapter Microcontroller
Chapter 20 Computer Operations Computer Studies Today Chapter 20.
Components of a typical full-featured microcontroller.
BATCH MEMBERS R.ABHISHEK-08N41A0401 K.DHEERAJ REDDY-08N41A0412 S.RAJENDRA REDDY-08N41A0458 JYOTHISHMATHI COLLEGE OF ENGINEERING AND TECHNOLOGY,TURKAPALLY.
USING TV REMOTE AS A CORDLESS MOUSE FOR THE COMPUTER
CORDLESS MOUSE FEATURES BY TV REMOTE USING PIC MICROCONTROLLER
The Central Processing Unit: What Goes on Inside the Computer
Hoda Roodaki AVR Family Overview Hoda Roodaki
PROGRAMMABLE LOGIC CONTROLLERS SINGLE CHIP COMPUTER
8051 Pin - out PORT 0 PORT 1 PORT 2 PORT 3.
Atmega32 Architectural Overview
Computer Hardware – System Unit
Discovering Computers 2011: Living in a Digital World Chapter 4
Diagram of the Board of Education
Chapter 1: Getting Started
Chapter 1: Getting Started
Introduction to Microcontrollers and the Board of Education
BASIC Stamp II Programming for Descartes Robots
Project Title EVM IN PIC Under the Guidance of Submitted by.
Programming Boe-Bots (Part 1)
The Arduino Microcontroller: Atmel AVR Atmega 328
Controlling YOUR ROBOT
Computers: Tools for an Information Age
Important 8051 Features On chip oscillator 4K bytes ROM 128 bytes RAM
8051 Micro Controller.
Chapter 1: Getting Started
Computers: Tools for an Information Age
Presentation transcript:

University of Pennsylvania 1 The BASIC Stamp 2

University of Pennsylvania 2 The BASIC Stamp 2 Serial Signal Conditioning Conditions voltage signals between PC serial connection (+/- 12V) and BASIC Stamp (5V) Interpreter Chip Reads the BASIC program from the EEPROM and executes the instructions. EEPROM Stores the tokenized PBASIC program. 5V Regulator Regulates voltage to 5V with a supply of 5.5VDC to 15VDC

University of Pennsylvania 3 1. Microcontroller (PIC16C57) – Brains of the system, provides BASIC interpreter, serial communication, and I/O. 2.Memory (EEPROM) – User program storage and long term data storage. 3.Voltage Regulator – Generates 5Vdc from supply power of 5.5Vdc to 15Vdc. 4.Clock – 20MHz resonator. 5.Miscellaneous Support Components – 4v brown out detector, transistors, and resistors. BASIC Stamp 2 (BS2) The BASIC Stamp 2 (BS2) is an embedded system that includes:

University of Pennsylvania 4 BASIC Stamp 2 microcontroller PIC16C57 l 8-bit CMOS Microcontroller l RISC CPU (only 33 single word, single cycle instructions) l 28 pin, DIP l 12 bit wide instructions l 8 bit wide data l 8 bit clock counter l 72 bytes of RAM l 1 watch dog timer 16 I/O pins + 2 dedicated serial 2K EEPROM/ROM See

University of Pennsylvania 5 BASIC Stamp Pin Descriptions

University of Pennsylvania 6 BASIC Stamp 2 microcontroller - 2 PIC16C57 16 I/O pins + 2 dedicated serial 2K EEPROM/ROM 72 bytes of RAM on PIC l Only 26 bytes available 20 MHz clock, 4000 instructions per second 20 mA current (source) limit at each pin (25 mA sink limit) Caution! PIC16F84 -Discussed extensively in book -F = flash memory (a type of EEPROM)

University of Pennsylvania 7 BASIC Stamp 2 Memory Memory (space for code) l 2K Bytes l 500 lines of code Speed l 20 MHz l 4000 instructions/second RAM (space for storing variables) l 26 Bytes l REG0 – REG12 are 16-bit registers t bit variables (Bits) t 52 4-bit variables (Nibbles) t 26 8-bit variables (Bytes) t bit variables (Words) Program l Stored in EEPROM memory +6 bytes for storing I/O

University of Pennsylvania 8 BASIC Stamp 2 Proto Board

University of Pennsylvania 9

10 Vss (System ground) – Any external circuitry connected to the BS2 must have a common ground with the BS2. P0-P15 (general purpose I/O) – Maximum current limits for I/O pins must be obeyed. Vdd (5Vdc supply) – If user has 5Vdc available, connect it to this pin. Vin (5.5Vdc-15Vdc supply) – If user has Vdc, connect it to this pin. Note that the onboard regulator will step this down to 5Vdc for use by the BS2 circuitry. MAKE SURE THIS 5Vdc IS NOT USED BY EXTERNAL CIRCUITRY OR DAMAGE TO THE bs2 WILL OCCUR. IMPORTANT: PIN CHARACTERISTICS

University of Pennsylvania 11 Static sensitive device, use grounded wrist strap or touch a grounded surface before handling the BS2. Verify power is off before connecting and disconnecting the BS2 and any external circuitry. Verify BS2 orientation before inserting it into the carrier board. Do not overdrive I/O pins, abide by maximum limits. If using an unregulated supply (5.5-15Vdc), do not drive external circuitry with the regulated 5Vdc generated by the BS2. Precautions

University of Pennsylvania 12 Communicate with the BS2 via the PC serial port (RS232). Download program from PC to BS2, cannot upload a program that is already in the BS2. Can upload data from the BS2 to the PC using the DEBUG command. PC to BASIC Stamp 2

University of Pennsylvania 13 RAM: - storage of program variables - losses contents at power down - 32 bytes available 6 – I/O pin status 26 – general purpose use EEPROM: -2K bytes, ~500 instructions - program storage - long term data storage - retains data at power down Memory Configuration

University of Pennsylvania 14 MouseVARBIT‘variable can be 0 thru 1 CatVARNIB‘variable can be 0 thru 15 DogVARBYTE‘variable can be 0 thru 255 RhinoVARWORD‘variable can be 0 thru HorseVARRhino.BIT9 ‘bit 9 of Rhino CowVARRhino.HIGHBYTE ‘highest 8 bit of Rhino Constant Definition CheersCON5 Variable Definition

University of Pennsylvania 15 1Decimal $1A6Hex %1011Binary LetterACON“A”‘ASCII code for A (65) CheersCON3‘decimal Hex128CON$80‘hex FewBitsCON%1101‘binary Examples: Number Representation

University of Pennsylvania 16 - Addition and Subtraction, order is not important = =38 - Multiplication and Division, order is important 12+3*2/4=7 ** 2*12/4+3=9 - Note that the BS2 performs integer math only, as shown in ** 30/4=7 not BS2 solves equations in the order they are written, left to right - Use parenthesis to change order of evaluation 12+((3*2)/4)=13 Mathematical Expressions

University of Pennsylvania

University of Pennsylvania 18 BASIC Stamp 2 Commands

University of Pennsylvania 19 BASIC Stamp 2 Commands

University of Pennsylvania 20 BASIC Stamp 2 Commands

University of Pennsylvania 21 units in Variable – 2 microseconds maximum pulse width – milliseconds

University of Pennsylvania 22 units in Period – 2 microseconds maximum pulse width – milliseconds

University of Pennsylvania 23

University of Pennsylvania 24

University of Pennsylvania 25

University of Pennsylvania 26 units in Cycle – 1millisecond Average voltage – avg. volt.=(Duty/255)*5 Required charge time – 4*R*C

University of Pennsylvania 27

University of Pennsylvania 28

University of Pennsylvania 29

University of Pennsylvania 30

University of Pennsylvania 31