Table of Contents. Introductory Material

Similar documents
Parallax BASIC Stamp IIsx

Professional Development Board (#28138)

Finite State Machine Lab

Table of Contents. Introductory Material

CDN503 HIGH DENSITY I/O ADAPTER USER GUIDE

Physics 430 Laboratory Manual Rev.: 2004 Sept. 29

Lab 4: Digital Electronics BMEn 2151 Introductory Medical Device Prototyping Prof. Steven S. Saliterman

Basic Express, BasicX, BX-01, BX-24 and BX-35 are trademarks of NetMedia, Inc.

BSCB-2 BASIC STAMP CARRIER BOARD

BASIC Stamp Activity Board: Features and Specifications

Board Of Education USB (#28850)

DEV-1 HamStack Development Board

DEV16T. LCD Daughter board

ericssonz LBI-38616B MAINTENANCE MANUAL FOR MTD TM SERIES AND DATA RADIO LOGIC BOARD 19D902151G3 DESCRIPTION CIRCUIT ANALYSIS TABLE OF CONTENTS

BS2p24 Demo Board (#45183)

Propeller Activity Board (#32910)

PWR-I/O-DB Power and I/O Daughterboard (#28301)

CDN502 HIGH DENSITY I/O ADAPTER USER GUIDE

Copyright 2011 R.S.R. Electronics, Inc. All rights reserved. 04/11. Ver. 1.0web

Lab 16: Data Busses, Tri-State Outputs and Memory

Mega128-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

Downloaded from Elcodis.com electronic components distributor

Propeller Project Board USB (#32810)

BASIC Stamp 1 Project Board (#27112) Development / Education Platform for the BASIC Stamp 1

MegaAVR-DEVelopment Board Progressive Resources LLC 4105 Vincennes Road Indianapolis, IN (317) (317) FAX

EMBEDDED SYSTEMS COURSE CURRICULUM

Prop-2 Controller PN: 31102

Prop-1 Controller PN: 31101

ONYX-MM-XT PC/104 Format Counter/Timer & Digital I/O Module

Propeller Board of Education (#32900)

Slick Line Acquisition System Manual

Drexel University Electrical and Computer Engineering Department ECE 200 Intelligent Systems Spring Lab 1. Pencilbox Logic Designer

PK2200 Series. Features. C-Programmable Controller. Specifications Board Size Enclosure Size Operating Temp.

BS2p40tm OEM Module. Surface mount/through hole kit By Robert L. Doerr. Manual Revision.5

CONTENTS. dspicpro4 KEY FEATURES 4 CONNECTING THE SYSTEM 5 INTRODUCTION 6

The Freescale MC908JL16 Microcontroller

EasyPIC5 Development System

The Atmel ATmega328P Microcontroller

USER S MANUAL VER.1. C10D- PARALLEL PORT INTERFACE CARD BOARD Rev. 1

Internet-Based Remote Control using a Microcontroller and an Embedded Ethernet Board 1

Digilab 2E Reference Manual

Lab 4: Digital Electronics Innovation Fellows Program Boot Camp Prof. Steven S. Saliterman

Lab #2: Building the System

Prop-SX Controller PN: 31103

Digilab 2 XL Reference Manual

Web Site: Forums: forums.parallax.com Sales: Technical:

Digilab 2 Reference Manual

melabs Serial LCD Firmware Version 1.0 2/7/07

BIG8051. Development system. User manual

^3 Analog Servo Interface Board for PMAC2A-PC104. ^4 3Ax Hxx. ^5 December 15, 2009

melabs Serial LCD Firmware Version 1.1 3/5/07

BASIC STAMP FAQS (FREQUENTLY ASKED QUESTIONS AND ANSWERS)

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

Experiment 9: Binary Arithmetic Circuits. In-Lab Procedure and Report (30 points)

Revision: 5/7/ E Main Suite D Pullman, WA (509) Voice and Fax. Power jack 5-9VDC. Serial Port. Parallel Port

USB Debug Adapter. Power USB DEBUG ADAPTER. Silicon Laboratories. Stop. Run. Figure 1. Hardware Setup using a USB Debug Adapter

Introduction 1. Liquid crystal display (16 characters by 2 rows) Contrast dial: turn the dial to adjust the contrast of the display (see page 5)

Prototyping Module Datasheet

MicroBolt. Microcomputer/Controller Featuring the Philips LPC2106 FEATURES

Arduino Uno. Arduino Uno R3 Front. Arduino Uno R2 Front

USER MANUAL FOR HARDWARE REV

DSP240-LPI Inverter Controller Card. Technical Brief

Chapter 9. Input/Output (I/O) Ports and Interfacing. Updated: 3/13/12

F2MC MB90385 series Evaluation Board Documentation. Revision Date Comment V New document

HYDRA-X23/X23S. Power Application Controllers. PAC HYDRA-X User s Guide. Copyright 2014 Active-Semi, Inc.

RN-174 WiFly Super Module

Variable Power Supply Digital Control Circuit Diagram Using Lm317

MIDI CPU Hardware Rev K. User Manual

HYDRA-X10. Power Application Controllers TM. PAC HYDRA-X User s Guide. Copyright 2014 Active-Semi, Inc.

Keywords Digital IC tester, Microcontroller AT89S52

USER S MANUAL. C32- DUAL PORT MULTIFUNCTION CNC BOARD Rev. 4

Web Site: Forums: forums.parallax.com Sales: Technical:

EZ-Bv4 Datasheet v0.7

C23- DUAL PORT MULTIFUNCTION CNC BOARD Rev. 3.1

Axiom Manufacturing. Users Manual. for PROJECT DEVELOPMENT BOARD AXM xiom anufacturing

PVK40. User's manual. Feature Rich Development and Educational Kit for 40-pin Microchip PIC microcontrollers

Maxim Integrated Products 1

GRAVITECH GROUP

ARDUINO MEGA ADK REV3 Code: A000069

Propeller Proto Board (#32212) Propeller Proto Board USB (#32812) Proto Board Accessory Kit (# )

MeterBuilder MB-1 PROGRAMMABLE RF POWER METER. CIRCUIT DESCRIPTION Version 1.01 June 2011

The Atmel ATmega168A Microcontroller

BalloonSat. Assembly Manual

Proto-DB (#28310): Prototyping Daughterboard

4Trio Motion Technology3

Touch Control Switch + - R6 R4 R8 R7 CAT# Grading. Assembly Instructions by Earl D. Gates SUNY Oswego Fall Conference 2007.

ARDUINO UNO REV3 SMD Code: A The board everybody gets started with, based on the ATmega328 (SMD).

RS-232 to Logic Level Adapter with DB9M Connector and Power LED

A4988 Stepper Motor Driver Carrier with Voltage Regulators

GL116 ENCODER/DECODER MANUAL GLOLAB CORPORATION

Sierra Radio Systems. HamStack. Project Board Reference Manual V1.0

Easy Kit Board Manual

PAK-XI PS/2 Coprocessor Data Sheet by AWC

EE4380 Microprocessor Design Project

CEIBO FE-5111 Development System

REQUIRED MATERIALS Epiphany-DAQ board Wire Jumpers Switch LED Resistors Breadboard Multimeter (if needed)

ARDUINO UNO REV3 Code: A000066

USER S MANUAL. C11- MULTIFUNTCION CNC BOARD Rev. 9.9

ECE 270 Lab Verification / Evaluation Form. Experiment 1

LCMM024: DRV8825 Stepper Motor Driver Carrier,

Transcription:

Table of Contents Introductory Material 0.1 Equipment Intoduction 1 breadboard area stimulator board 2 The Board of Education The TDS 340 oscilloscope 0.2 Getting Started with the Micro-controller The Basic Stamp Signals The Basic Stamp Memory Organization Laboratory Scripts Lab 1: Lab 2: Lab 3: Lab 4: Lab 5: Lab 6: Lab 7: Logic Gates, Flip Flops and Registers Counters The Basic Stamp 2 micro-controller: Basic digital I/O Digital-to-Analog and Analog-to-Digital Conversion Counting and Timing Servo motors and Stepper Motors GPIB and LabView programming

Notes The schematics in the lab manual usually indicate the 7400 series logic chips without the letters indicating the family. Two common families in current use are the 74LSxx, low power TTL, and the 74HCxx CMOS variant. In the text it is indicated that we generally use the 74LS family. Several pages have been left blank so that sections and lab scripts will begin on the right-hand pages. Acknowledgments Fig 0.3, Pin Table and the RAM table are provided by Parallax inc.

Physics 430 Laboratory Manual 0.1 Equipment Intoduction This lab involves digital electronics and interfacing to a version of the PIC 16C57 micro-controller called the Basic Stamp II. All work is done on an experimental box and the micro-controller prototyping system called the "Board of Education". Fig 0.1 illustrate the basic components. 1. a breadboarding area 2. a breadboard stimulator 3. the Board of Education which contains the micro-controller a signal header to attach a jumper cable a small breadboard with signal connections on two sides (The ISA bus edge connector has been left on but is no longer used.) Buffered ISA bus edge connector (obsolete) 9V Board of Education RS232 Stamp II Breadboard Area Stimulator Connector for 16-pin jumper cable. Fuse On/Off Fig. 0.1 The Experimental Box (not to scale) The +5V and ±12V appearing on the bus edge connector come from the box power supply. The power for the board of education can be obtained from either a 9V power supply adapter or a 9V battery. The Board of

Education can be removed from the Experimental Box and is able to function independently of it. +12 V +5 V gnd 12 V Insert jumpers to create a continuous bus from one side to the other. Use the horizontal bus pins for the voltages shown here. ic ic ne These 5 are connected These 5 are connected but not to the ones above. These 25 holes are connected together, but not to the ones on the right-hand side. These 25 holes are connected together but not to the ones on the left-hand side. Fig. 0.2 The Breadboard Area The breadboard area is meant to accept IC leads, small diameter resistor and capacitor leads, and #22 solid, not stranded, wire. Do not force larger diameter wires into it. It is not meant to accept the thinner wire-wrap wire good contact may not be obtained. Note that the bare breadboard is divided into four identical areas. The four horizontal bus lines in each area, which are meant to distribute ground and power, are all divided at the center. If you wish them to be continuous, you must install small jumpers. Mount the ICs consistently. A convenient convention is to mount the ICs so that pin 1 is on the left when viewed from the top. The small circular sockets on the stimulator board are also designed to accept #22 solid wire. This makes interconnection between the breadboard and stimulator board simple. The stimulator board (Fig. 0.3) contains LEDs, pushbuttons, switches, a 10 kω potentiometer, power supply outputs, and several clock frequency outputs. There is a sixteen-pin connector to jumper some of these outputs the prototype board. The LEDs on the stimulator have current-limiting circuits so they may be connected directly to 5V without problems. Similarly the pushbuttons of the stimulator board have debouncing circuitry to avoid noisy signal edges. The first two labs on digital electronic fundamentals will use the breadboarding area and the stimulator board. The small bread board area on the Board of Education will be used starting in lab 3.

Fig. 0.3. The Stimulator Board The LEDs have current limiting resistors and the push-button switches are debounced. Clock signals on the stimulator board are somewhat noisy, use a function generator for "clean" clock signals. Do not leave loose wires or components lying around on top of the stimulator board because they might accidentally touch the exposed contacts. The TDS340 oscilloscope has many options which can make it difficult to operate at first. If you have trouble read the manual. Fig. 0.5 shows some settings for simple operation. If nothing seems to be happening, press the AUTOSET button. Most oscilloscope measurements should be made using a x10 probe to avoid affecting the circuit while it is being measured. An image of the oscilloscope screen can be transferred to your computer via the GPIB interface by a command-line program "SAVE" which is available. In order to use this

program the oscilloscope must be configured to use the GPIB interface. It is recommended to send bmp format files. General Purpose knob Cursor control Miscellaneous controls Acquisition controls TDS 34 Menu controls Menu controls Vertical controls Horizontal controls Trigger controls Fig. 0.4 The Tektronix TDS340 Oscilloscope Control Panel

0.2 Getting Started with The Micro-controller The Basic Stamp Pins 1.25 (32 m m ) 9 Vdc Rocklin, CA - USA Battery 6-9 C3 C4 1 Sout Sin ATN Vss P0 P1 P2 P3 P4 P5 P6 P7 VDC STAMPS in CLASS Need Tech Support? email: stamptech@parallaxinc.com TM Vss P0 P2 P4 P6 P8 P10 Vin P12 Vss P14 Rst Vdd Vdd X1 P15 P14 P13 P12 Pwr P11 P10 P9 P8 Reset Vss P1 P3 P5 P7 P9 P11 P13 P15 Vin X3 P15 P14 P13 P12 P11 P10 P9 P8 P7 P6 P5 P4 P3 P2 P1 P0 X2 3.7 (94 mm) 4.0 (101.5 mm) 15 14 13 12 X4 Vdd Red Black X5 Rev B Vin Vss (c) 1998 Board of Education www.stampsinclass.com (916) 624-8333 2. 75 (70 m m ) 3. 0 (77. 5 m m ) Fig 0.5 The Board of Education with the Basic Stamp module correctly inserted. The power supply and serial cable are not shown. The following signals are on the Basic Stamp chip. Most of them are available on the holes beside the small breadboard in the Board of Education and on its header which can be used for attaching a ribbon cable to another board.

Pin Name Description 1 SOUT Serial Out: connects to PC serial port RX pin (DB9 pin 2 / DB25 pin 3) for programming. 2 SIN Serial In: connects to PC serial port TX pin (DB9 pin 3 / DB25 pin 2) for programming. 3 ATN Attention: connects to PC serial port DTR pin (DB9 pin 4 / DB25 pin 20) for programming. 4 VSS System ground: (same as pin 23) connects to PC serial port GND pin (DB9 pin 5 / DB25 pin 7) for programming. 5-20 P0-P15 General-purpose I/O pins: each can sink 25 ma and source 20 ma. However, the total of all pins should not exceed 50 ma (sink) and 40 ma (source) if using the internal 5-volt regulator. The total per 8-pin groups (P0 P7 or P8 15) should not exceed 50 ma (sink) and 40 ma (source) if using an external 5-volt regulator. 21 VDD 5-volt DC input/output: if an unregulated voltage is applied to the VIN pin, then this pin will output 5 volts. If no voltage is applied to the VIN pin, then a regulated voltage between 4.5V and 5.5V should be applied to this pin. 22 RES Reset input/output: goes low when power supply is less than approximately 4.2 volts, causing the BASIC Stamp to reset. Can be driven low to force a reset. This pin is internally pulled high and may be left disconnected if not needed. Do not drive high. 23 VSS System ground: (same as pin 4) connects to power supply s ground (GND) terminal. 24 VIN Unregulated power in: accepts 5.5-15 VDC (6-40 VDC on BS2- IC rev. e), which is then internally regulated to 5 volts. May be left unconnected if 5 volts is applied to the VDD (+5V) pin. Basic Stamp 2 Memory organization (adapted from Parallax documentation) The BASIC Stamp has two kinds of memory; RAM (for variables used by your program) and EEPROM (for storing the program itself). EEPROM may also be used to store long-term data in much the same way that desktop computers use a hard drive to hold both programs and files. An important distinction between RAM and EEPROM is this: RAM loses its contents when the BASIC Stamp loses power; when power returns, all RAM locations are cleared to 0s. There are only 32 bytes of RAM. Three of these bytes have predetermined functions, the other 29 can be used in programs. The preassigned names can be changed by declaring other variable names in the PBasic program which are more convenient

Word Name Byte Names Nibble Names Bit Names Special Notes INS INL INA, INB IN0 IN7 Input pins INH INC, IND IN8 IN15 OUTS OUTL OUTA, OUTB OUT0 OUT7 Output pins OUTH OUTC, OUTD OUT8 OUT15 DIRS DIRL DIRA, DIRB DIR0 DIR7 I/O pin direction control DIRH DIRC, DIRD DIR8 DIR15 W0 B0 B1 W1 B2 B3 W2 B4 B5 W3 B6 B7 W4 B8 B9 W5 B10 B11 W6 B12 B13 W7 B14 B15 W8 B16 B17 W9 B18 B19 W10 B20 B21 W11 B22 B23 W12 B24 B25 Note: All registers are word, byte, nibble and bit addressable EEPROM retains the contents of memory, with or without power, until it is overwritten (such as during the program-downloadingprocess or with a WRITE instruction.) There are 2048 bytes of EEPROM in the Basic stamp 2. These locations are used to store the tokenized version of the program and for longterm data storage. The program tokens are stored starting at location 2047 and contining in successive lower locations (2046, 2045,...). Data written by the program starts at location 0 and continues at succesive higher locations (1, 2,...). Thus the longer the program, the less storage space you have for data. It is possible to clobber your program by writing too much data into the EEPROM so you must be careful. A memory map function is available in the Windows development system to help you avoid this catastrophe.

EEROM Memory Map 2047 Start of Program Program Tokens End of Program Last Data Data 0 First Data For an introduction to using the Basic Stamp 2 please read the document What is a Microcontroller supplied by the Parallax company (files WAM2_1.pdf). More complete information can be had in the Basic Stamp Programming Manual (file basicstampman.pdf).

Appendix A - Lab Integrated Circuits Inventory number I.C. Function 2 74LS00 Quad 2-in NAND 2 74LSO2 Quad 2-in NOR 2 74LS04 hex inverter 1 7407 hex open collector buffer 1 74LS10 triple 3-in NAND 1 74LS20 dual 4-in NAND 1 74LS30 8-in NAND 2 74LS73 dual JK flip flop 2 74LS74 dual D flip flop 1 74LS86 quad excl. OR 2 74LS90 decade counters 1 74LS123 dual monostables 2 74LS138 1 of 8 decoders 1 74LS153 dual 4 to 1 multiplexer 2 74LS161 4 bit binary counter 1 74LS174 hex D flip flop 1 SAA1027 stepper motor controller 1 MC1408 D/A converter 1 ADC0831 A/D Converter 1 LM358 Operational Amplifier 1 DS1307 Real-time Clock 1 24C32 32 k-bit EEPROM (4 k-byte) 1 LM35 Celcius Temperature Sensor (voltage output 10 mv/ C)

Other components 1 CdS Photocell (photoresistor) 2 SPST pushbutton switches 1 DPDT Pushbutton switch 1 Hexadecimal encoded rotary switch 1 4 bit DIP switch

Pin Outs and Descriptions TOP VIEW.