Special Lecture. Basic Stamp 2 Programming. (Presented on popular demand)



Similar documents
ServoPAL (#28824): Servo Pulser and Timer

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

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

Additional Guides. TETRIX Getting Started Guide NXT Brick Guide

E-Blocks Easy RFID Bundle

TRILOGI 5.3 PLC Ladder Diagram Programmer and Simulator. A tutorial prepared for IE 575 by Dr. T.C. Chang. Use On-Line Help

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

MICROCONTROLLER INTERFACING CIRCUITS

Downloading a Sample Program over USB

Programming PIC Microcontrollers in PicBasic Pro Lesson 1 Cornerstone Electronics Technology and Robotics II

Accurate Measurement of the Mains Electricity Frequency

Lab Experiment 1: The LPC 2148 Education Board

ECIO40P ECIO28P ECRM40. Page 1. USB programmable microcontrollers. 0.6 DIP footprint. Supplied with a free version of Flowcode. E-blocks compatible

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Chapter 4: Pulse Width Modulation

E-Blocks Easy Internet Bundle

ET-BASE AVR ATmega64/128

Embedded Systems on ARM Cortex-M3 (4weeks/45hrs)

SKP16C62P Tutorial 1 Software Development Process using HEW. Renesas Technology America Inc.

Computer and Set of Robots

STEPPER MOTOR SPEED AND POSITION CONTROL

EasyC. Programming Tips

Six-servo Robot Arm. DAGU Hi-Tech Electronic Co., LTD Six-servo Robot Arm

Pulse Width Modulation (PWM) LED Dimmer Circuit. Using a 555 Timer Chip

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Dr Robot C# Advance Sputnik Demo Program

User Manual. AS-Interface Programmer

Tutorial for Programming the LEGO MINDSTORMS NXT

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

A 5 Degree Feedback Control Robotic Arm (Haptic Arm)

Microtronics technologies Mobile:

Microcontrollers Figure 26-1 Objectives Key Words and Terms 26.1 OVERVIEW OF THE MICROCONTROLLER microcontroller

GAS LEAKAGE DETECTION & AUTO ON-OFF GAS SYSTEM

AVR Butterfly Training. Atmel Norway, AVR Applications Group

How to read this guide

Quick Start Guide. TWR-MECH Mechatronics Board TOWER SYSTEM

POCKET SCOPE 2. The idea 2. Design criteria 3

Measuring Resistance Using Digital I/O

ezsystem elab16m Project 1F: Alarm System (Full Project description)

USING I2C WITH PICAXE

8051 MICROCONTROLLER COURSE

EVAL-UFDC-1/UFDC-1M-16

MAX6683 Evaluation System/Evaluation Kit

Bluetooth + USB 16 Servo Controller [RKI-1005 & RKI-1205]

By: John W. Raffensperger, Jr. Revision: 0.1 Date: March 14, 2008

Parallax Serial LCD 2 rows x 16 characters Non-backlit (#27976) 2 rows x 16 characters Backlit (#27977) 4 rows x 20 characters Backlit (#27979)

Embedded Patient Monitoring System

1. Learn about the 555 timer integrated circuit and applications 2. Apply the 555 timer to build an infrared (IR) transmitter and receiver

DESIGN OF SMS ENABLED CAR SECURITY SYSTEM

Work with Arduino Hardware

Zeros, Ones, and the Morse Code

Display Board Pulse Width Modulation (PWM) Power/Speed Controller Module

Application Note. Example of user log on Magelis HMI with XB5S5B2L2 biometric switch. Advanced Technical Support - Brazil. Version: 1.

LAB4: Audio Synthesizer

QL-PROG Microchip MCU Programmer User s Manual Qianlongsheng Electronic Technology Co., Ltd.

Using the VEX Cortex with ROBOTC

Access Control Using Smartcard And Passcode

An Introduction to MPLAB Integrated Development Environment

INTRODUCTION TO SERIAL ARM

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

OPTICAL COMMUNICATION BASED STEPPER MOTOR CONTROL USING PULSE WIDTH MODULATION

Tutorial for MPLAB Starter Kit for PIC18F

MARTECH SPI Tools. MARTECH SPI Tools User Manual v1.0. User Manual

CodeWarrior Development Studio for Freescale S12(X) Microcontrollers Quick Start

Ocean Controls RC Servo Motor Controller

Start A New Project with Keil Microcontroller Development Kit Version 5 and Freescale FRDM-KL25Z

Introduction to LogixPro - Lab

UIM2901-5A MACH3 breakout board

Easy Step 1000 Stepper Driver Module

Design and Construction of Variable DC Source for Laboratory Using Solar Energy

HC(S)08-System for Development and Training

Crazy Alarm Clock L A K S H M I M E Y Y A P P A N J A M E S K A Y E W I L L I A M D I E H L C O N G C H E N

The Programming Interface

CHAPTER 11: Flip Flops

EvB 5.1 v5 User s Guide

OWNERS MANUAL. Status Monitor. for Windows 95, 98, ME, NT 4, 2000 & XP. SIGNALCRAFTERS TECH, INC.

GPS & GSM BASED REAL-TIME VEHICLE TRACKING SYSTEM.

INTRODUCTION: ABSTRACT:

Eric Mitchell April 2, 2012 Application Note: Control of a 180 Servo Motor with Arduino UNO Development Board

PHYS 2P32 Project: MIDI for Arduino/ 8 Note Keyboard

Training Document for Comprehensive Automation Solutions Totally Integrated Automation (T I A) MODULE A5 Programming the CPU 314C-2DP

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Experiment #26: Stepper Motor Control

S7 for Windows S7-300/400

How to use AVR Studio for Assembler Programming

revolution Contents: Introduction Power 28-pin Project Board with input/output cables

[F/T] [5] [KHz] [AMP] [3] [V] 4 ) To set DC offset to -2.5V press the following keys [OFS] [+/-] [2] [.] [5] [V]

Creating a Project with PSoC Designer

Introduction to Arduino

ISL88731 Software Instructions

B Robo Claw 2 Channel 5A Motor Controller Data Sheet

Pulse Width Modulation Applications

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

Opgui and OpenProg user s guide. v.1.2

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors

WinProladder software package

Transcription:

Special Lecture Basic Stamp 2 Programming (Presented on popular demand)

Programming Environment

Servo Motor: How It Work? The editor window consists of the main edit pane with an integrated explorer panel to its left, as shown above. The main edit pane can be used to view and modify up to 16 different source code files at once.

Servo Motor Wiring

Servo Motor with BS2 Only when you use AA battery pack 2 servo motors only Need another capacitor for additional servo motors

Sample Code Automatic line numbers can be enabled or disabled via the Show LineNumbers checkbox on the Preferences Editor Appearance tab. Bookmarks can be enabled or disabled via the Show Bookmarks checkbox on the Preferences Editor Appearance tab. The bookmarks appear in the gutter as small numbered icons, providing a way to mark lines or sections of code that you need to navigate to quickly or repeatedly. You can define up to nine bookmarks by clicking on the gutter where you want one placed,

PWM The BASIC Stamp Editor supports all of the BASIC Stamp models, and all versions of the PBASIC programming language. Compiler directives must be placed in each program to indicate the desired BASIC Stamp model and language version. ' {$STAMP BS1} 'This indicates to use a BASIC Stamp 1 module ' {$STAMP BS2} 'This indicates to use a BASIC Stamp 2 module ' {$STAMP BS2e} 'This indicates to use a BASIC Stamp 2e module ' {$STAMP BS2sx} 'This indicates to use a BASIC Stamp 2sx module ' {$STAMP BS2p} 'This indicates to use a BASIC Stamp 2p module ' {$STAMP BS2pe} 'This indicates to use a BASIC Stamp 2pe module ' {$STAMP BS2px} 'This indicates to use a BASIC Stamp 2px module

PWM - Duty Cycle The Memory Map is divided into two sections, the RAM map and the EEPROM map. The RAM map shows how much of each register has been allotted to program variables. The RAM legend details how much is used by I/O Pins, Word, Byte, Nibble and Bit variables, and how much is unused. The main view is the detailed EEPROM map, which displays the data in hexadecimal format in each location.

The Basic PWM Control The Debug Terminal window provides a convienent display for data received from a BASIC Stamp during run-time, and also allows for the transmission of characters from the PC keyboard to the BASIC Stamp. The Debug Terminal is automatically opened and configured when a PBASIC program, containing a DEBUG command, is downloaded. You can manually open a Debug Terminal one of three ways: select Run Debug New, press Ctrl+D on the keyboard, or click on the Debug Terminal toolbar button. Up to four (4) Debug Terminals can be open at once (on four different ports) and all can be left open while editing and downloading source code.

PBASIC Bible The BASIC Stamp Editor includes searchable, indexed help files. Access Help by selecting Help Contents or Help Index.

Stepper Motor with BS2 ULN 2803 high-current transistor driver

Motor Experiments Experiments What s micro controller Basic A and D Chapters 4 Earth measurements Robotics StampWorks 2 26 and 27 Others

Lecture 9 555 Timer

Pulse Generation Pulsout Software version of pulse generation Pulsout pin, Period Pin: specified I/O pin from 0 to 15 Period: 2 μsec per each unit 555 Timer Hardware version of pulse generation BS2 can do other works Microcontroller is not necessary

555 Timer Highly stable devices for generating accurate time delay or oscillation Not programmable Controlled by resistors and capacitors Applications Pulse generation PWM Time delay generation

555 Timer Block Diagram 5 5 5

Connection Diagram Identifier

555 Timer without BS2 Connect to P1

555 Timer with BS2 P1

Astable Operation 1

Calculation of Duty Cycle t t low high Duty f = t = 0.693 R = 0.693 ( R cycle = t high 1 + t low 2 C 1 + t high R high 2 + t ) C low

Calculation of Duty Cycle t t low high = 0.693(20K)(680nF) = 9.6ms = 0.693(10K + 20K)(680nF) = 14.1ms 14.1ms Dutycycle= = 0.6 14.1ms+ 9.6ms 1 f = = 42Hz 14.1ms+ 9.6ms

Astable Operation 2

Applications 1 It will sound an alarm if it gets too dark all over sudden The LDR enables the alarm when light falls below a certain level

Applications 2 This circuit can be used as a audible 'Power-out Alarm' When the line voltage fails, the tone will be heard in the speaker

Applications 3 Actually really a alarm circuit, it shows how to use a 555 timer and a small glass-encapsulated mercury switch to indicate 'tilt'.

Applications 4 A Metronome is a device used in the music industry It indicates the rhythm by a 'tic-toc' sound which speed can be adjusted with the 250K potentiometer

555 Timer Experiments Experiments What s micro controller Basic A and D Chapters 5 6 Earth measurements Robotics StampWorks 17 and 18 Others