1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

Robot Builders Source Book - Gordon McComb Episode 1 Part 10 docx

40 565 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề The Basic Stamp Microcontroller
Trường học Parallax
Chuyên ngành Robotics and Microcontroller Systems
Thể loại Khóa luận tốt nghiệp
Định dạng
Số trang 40
Dung lượng 4,04 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

This thumbprint-sized microcontroller uses Basic language com-mands for instructions and is popular among robot enthusi-asts, electronics and computer science instructors, and even desig

Trang 1

The Basic Stamp Microcontroller

Since its inception, the Basic Stamp has provided the

“onboard brains” for countless robotics projects This

thumbprint-sized microcontroller uses Basic language

com-mands for instructions and is popular among robot

enthusi-asts, electronics and computer science instructors, and

even design engineers looking for an inexpensive alternative

to microprocessor-based systems

The Basic Stamp, which is manufactured by Parallax is

really an off-the-shelf Microchip PICmicro microcontroller

Embedded in this PIC is a proprietary Basic-like language

interpreter, called PBasic The chip stores commands

downloaded from a PC or other development environment

When the program is run, the language interpreter built inside the Stamp converts theinstructions into code the chip can use

As a result, the Basic Stamp acts like a programmable electronic circuit, with the added

benefit of intelligent control—but without the complexity and circuitry overhead of a

dedi-cated microprocessor Instead of building a logic circuit out of numerous inverters, ANDgates, flip-flops, and other hardware; you can use just the Basic Stamp module to providethe same functionality, doing everything in software

The Basic Stamp uses two kinds of memory: PROM (programmable read-only memory)and RAM The PROM memory is used to store the PBASIC interpreter; the RAM is used tostore data while a PBASIC program is running Housed in a separate chip (but still part ofthe Basic Stamp itself; see the description of the BSII module, later) is EEPROM memoryfor the programs you download from your computer

In operation, your PBASIC program is written on a PC, then downloaded—via a serialconnection—to the Basic Stamp The program is stored in EEPROM

The Basic Stamp is available directly from its manufacturer or from a variety of dealersworld over Prices from most sources are about the same The Basic Stamp is available inseveral versions, including the older BSI, the ever-popular BSII, and new BSII-SX, 2p, and2e The Stamp comes stand-alone or is part of several kits:

• BSII Module The Basic Stamp module contains the actual microcontroller chip, as well

as other support circuitry All are mounted on a small printed circuit board that is thesame general shape as a 24-pin IC In fact, the BSII is made to plug into a 24-pin ICsocket The BSII module contains the microcontroller, which holds the PBASIC inter-preter, a 5-volt regulator, a resonator (required for the microcontroller), and a serialEEPROM chip

• BSII Starter Kit The starter kit is ideal for those just, well, starting out It includes a BSII

module, a carrier board, programming cable, power adapter, and software on ROM The carrier board has a 24-pin socket for the BSII module, a connector for theprogramming cable, power adapter jack, and a prototype area for designing your owninterface circuitry

CD-• Basic Stamp Activity Board The Activity Board, which is typically sold without a BSII

module, offers a convenient way of experimenting with the Basic Stamp It containsfour LEDs, four switches, a modular jack for experimenting with X-10 remote-controlmodules, a speaker, and two sockets for easy interfacing of such things as serial ana-log-to-digital converters (ADCs)

• Growbot and BOE Bot The Growbot and BOE Bot products are small mobile robot kits

that are designed to use the Basic Stamp microcontroller The robots are similar, with

The Basic Stamp microcontroller.

Trang 2

the BOE Bot a little larger and heavier and able to accommodate more experiments ABSII module is generally not included with either robot kit.

• Basic Stamp Bug II Another robot kit, the Basic Stamp Bug II is a six-legged walking

robot The Bug is meant to be controlled with a BSI microcontroller, though it could berefitted to use the BSII The Basic Stamp module is extra

The PBASIC language supports several dozen special functions, many of which are

ideal for robotics You’ll want to study these statements more fully in the Basic Stamp

manual, which is available for free download from Parallax and is also included in the

Starter Kit as a printed book

• button—The button statement momentarily checks the value of an input and then

branches to another part of the program should the button be in a LOW (0) or HIGH (1)

state The button statement lets you choose the I/O pin to examine, the “target state”

that you are looking for (either 0 or 1), and delay and rate parameters that can be usedfor such things as switch debouncing

• debug—The Basic Stamp Editor (which runs on your PC) has a built-in terminal that plays the result of bytes sent from the Basic Stamp back to the PC The debug state-

dis-ment “echos” numbers or text to the screen and is highly useful during testing

• freqout—The freqout statement is used to generate tones primarily intended for audio reproduction You can set the I/O pin, duration, and frequency (in Hertz) using the fre- qout statement An interesting feature of freqout is that you can apply a second fre-

quency, which intermixes with the first

• input—The input statement makes the specified I/O pin an input As an input, the value

of the pin can be read in the program Many of the special function statements, such as

button and pulsin, automatically set an I/O pin as an input, so the input statement is not

needed for these

• pause—The pause statement is used to delay execution by a set amount of time To use pause you specify the number of milliseconds (thousandths of a second) to wait For example, pause 1000 pauses for one second.

• pulsin—The pulsin statement measures the width of a single pulse, with a resolution of

two microseconds (2 µs) on the Basic Stamp II

• pulsout—Pulsout is the inverse of pulsin: with pulsout you can create a finely measured

pulse, with a duration of between 2 µs (on the Basic Stamp II) and 131 milliseconds The

pulsout statement is ideal when you need to provide highly accurate waveforms.

• rctime—The rctime statement measures the time it takes for an RC (resistor/capacitor) network to discharge to an opposite logical state The rctime statement is often used

to indirectly measure the capacitance or resistance of a circuit, or simply as a kind ofsimplified analog-to-digital circuit

• serin and serout—Serin and serout are used to send and receive asynchronous serial

communications It is one method of communicating with other devices, even other Basic

Stamps, all connected together You use serout to send commands and text to the LCD.

• shiftin and shiftout—The serin and serout statements (see previous) are used in wire asynchronous serial communications The shiftin and shiftout statements are used

one-in two- or three-wire synchronous serial communications The maone-in difference is that

with shiftin/shiftout a separate pin is used for clocking the data between its source and

destination

Additional information on the Basic Stamp can be found at the following Parallax Web sites:http://www.parallaxinc.com/

http://www.stampsinclass.com/

Trang 3

x V

Crownhill Associates Ltd 203650

32 Broad St

Ely CambridgeshireCB7 4PWUK

 +44 (0) 1353 666709

 +44 (0) 1353 666710

 http://www.crownhill.co.ukResellers of PC microcontrollers, development boards,PIC compilers, and related hardware/software

x V

CSMicro Systems 203450

213 Sage St

Ste #3Carson City, NV 89706USA

x V

Also try these Google.com search phrases to locate program examples and circuit grams using the Basic Stamp:

dia-“basic stamp” program examples

“basic stamp” programming examples

“basic stamp”—site:www.parallaxinc.com

The BasicX-35 microcontroller and

development board, from NetMedia Photo

Trang 4

Dontronics specializes in microcontrollers, as well as

the SimmStick prototyping development board system

Highlight products:

• DT007 Micro Motherboard

• DT104 Atmel Micro on a SimmStick

• DT107 SimmStick for 8051, 8252, AVR 8515, and

AVR 28-pin Micros

• DT108 SimmStick Video

• DT205 Relay Board

• SIMM100 SimmStick compatible for the AT90S8535

• Gigatechnologies USB

There’s lots more; Don’s Web site is jammed with useful

trinkets for robot builders and electronics

experi-menters He ships worldwide

x V

Elan makes a number of microcontroller, interface,and specialty ICs These include:

• 4-bit microcontroller, general purpose

• 4-bit microcontroller, with DTMF

• 4-bit microcontroller, for LCD

• 8-bit microcontroller, general purpose

• Mouse controller

• Keyboard encoder

• Analog-to-digital converter high-speed ADC

Data sheets and application notes provided on the Website

 +49 (0) 5232 8171

 +49 (0) 5232 86197

 detmold@elektronikladen.de

 http://www.elektronikladen.de/

Microcontroller development boards, including:

• USB08 Starter Kit-MC68HC908 Evaluation Boardand USB Reference Design

• HC08 Welcome Kit-Low-cost MC68HC908Evaluation Board

• HC12 Welcome Kit-A Starter Kit with Motorola’s68HC812A4

Web site is in German and English

x V

SimmStick DT003, from Dontronics.

Dontronics: PIC List 204117

http://www.dontronics.com/piclinks.html

Don McKenzie’s listing of useful PIC Web sites

Elan Microelectronics Corp 202027

Trang 5

Embedded Systems Design

Website 202264

http://www.microcontroller.com/

News, product announcements, tutorials, references,

selection guides, and more for the serious

microcon-troller developer You can search for information by

microcontroller brand to help you zero in on the data

Makers of low-cost development systems and add-ons

for (among other things) Atmel AVR microcontrollers:

• AVR Sprint 2313 development system

• AVR Sprint 2313 Basic starter kit

• AVR Sprint 2313 microprocessor module

Sellers of the MIT Handy Board and Handy Cricket

sin-gle board computers The Handy Board is a favorite at

MIT and for many university and college robotics

• Infrared output and input

• Start and stop buttons

• Piezo buzzer

• 32K battery-backed memory to store programs

• 4 1.1 amp H-bridge motor drivers (not included insome versions)

• Serial (RS-232) and SPI interfaces

The HandyBoard.com Web site is a facilitator of theHandy Board; MIT allows the board to be reproduced

by anyone for noncommercial purposes However, youmay find it easier to get one already made, either assem-bled or in form Vendors are listed on the Web site andinclude Gleason Research, The Robot Store in HongKong, and Acroname (all are listed in this book)

A variety of software choices are available for the HandyBoard, but the most common recommended isInteractive C, a multitasking C language that allows forcompiling programs, as well as line-at-a-time commandexecution A free version of Interactive C is available for

Main informational Web site for the Handy Board.

Trang 6

the PC (running in a DOS window), Mac, and

Unix-based computers

A great deal of documentation, user-supplies programs,

and other material exists to support the Handy Board

But one of the best is a book by the Handy Board’s

cre-ator, Fred Martin Check out Robotic Explorations: A

Hands-on Introduction to Engineering (ISBN 0130895687).

It is not an inexpensive book, but it does an excellent

job of teaching robotic concepts Though “controller

agnostic,” most of the examples revolve around the

Basic Stamp enhancement products (timer,

coproces-sor) The company sells what they describe as

“innova-tive enhancements for your BS2, BX-24 and ATOM.”

Datasheets (in Adobe Acrobat PDF format) available

for all products

Resellers of Basic Stamp, Atmel AVR, and Basic-X

microcontrollers, as well as the BASCOM programming

software Web site is in Swedish and English

x 

JStampSee the listing for Systronix (this section)

Kanda Systems Ltd  203311 Units 17-18 Glanyrafon Enterprise Park

Aberystwyth, CeredigionSY23 3JQ

Trang 7

The BasicX Microcontroller

Microcontrollers are fast becoming a favorite method of

endowing a robot with smarts Offering both speed and

ability is the BasicX by NetMedia, a company that previously

devoted itself to home automation and small Web cams

The BasicX-24 is actually a member of a family of

microcon-trollers from NetMedia, which also includes the less

expen-sive (but network-capable) 1, as well as the

BasicX-35 We’ll concentrate just on the BasicX-24 (or BX-24) from

here on out

A selling point of the BX-24 is that it is pin-for-pin

com-patible with Parallax’s Basic Stamp II It’s important to note

that the BX-24 is not a Stamp “clone.” The two microcontrollers don’t share the sameprogramming languages, so programs written for one will not work on the other

The BX-24 directly supports 16 input/output (I/O) lines For each I/O line, or pin, you canchange the direction from an input or an output When an I/O line is an output, you canindividually control the value of the pin, either 0 (logic LOW) or 1 (logic HIGH) When an I/Oline is an input, you can read a digital or analog value of a TTL-compatible device con-nected to the BX-24 Eight of the 16 I/O lines can be used for analog connections TheBX-24 incorporates its own built-in 10-bit analog-to-digital converter (ADC) Under soft-ware control, you can indicate which of the eight input lines is to be read

Three of the plated-through holes of the BX-24 serve as optional I/O and are grammatically referred to as pins 25, 26, and 27, making a total of 19 input/output pins.(The remaining plated-through holes provide a way to connect to the chip’s serialperipheral interface, or SPI, lines Connecting to these lines is not recommended unlessyou’re familiar with SPI interfaces, especially as the BX-24’s EEPROM is controlled bythese same I/O lines.)

pro-A nice touch on the BX-24 is its two LEDs: one red and one green The green LED isnormally used to indicate power-on for the chip, but you can individually control bothLEDs from your own programs You might use the LEDs as status indicators, for example.The LEDs share two of the additional plated-through hole connectors on the BX-24.The BX-24 board comes with its own 5-volt voltage regulator, which provides enoughoperating current for all the components on the board, plus several LEDs or logic ICs Ifyou plan on using the BX-24 to operate a robot, you’ll want to provide a separate powersupply of adequate current rating to the other components of the robot You should notrely on the BX-24’s onboard regulator for this task

In order to program the BX-24 you need to purchase the BasicX-24 developer’s kit,which contains one BX-24, a programming cable, a power supply, a “carrier board,” andprogramming software on CD-ROM Cost as of this writing is $99 for the developer’s kit,with additional BX-24s at $49.95 each You plug the BX-24 into the carrier board, whichhas a 24-pin socket and empty solder pads that you can use to add your own circuitry.The programming cable connects between the carrier board and a serial port on your PC.The power supply is the “wall wart” variety and provides about 12 to 16 vdc

The BX-24 uses a proprietary programming environment, which consists of an editorand a download console, which also serves double-duty as a terminal for data sent fromthe microcontroller The program editor supports the BasicX language, which is a subset

of Microsoft Visual Basic Don’t expect all Visual Basic commands to be available inBasicX, however BasicX supports the same general syntax as Visual Basic and many ofthe same data types (bytes, integers, strings, and so forth)

If you’re familiar with Visual Basic, then you should feel right at home with BasicX TheBasicX language supports the usual control structures, such as If/End If, While/Wend,

The BasicX-24 (BX-24) controller, on a development board.

Trang 8

micro-For/Next, and Select/Case Your BasicX programs can be subroutines, and you can callthose subroutines from anywhere in the program

The BX-24 is a general-purpose microcontroller, so many of its built-in features are

geared toward any typical personal or commercial microcontroller application Still, a

number of features of the BasicX programming language lend themselves to use in ics These features are implemented as functions added to the BasicX language To use afeature, you merely include it in your program, along with any necessary command

robot-parameters

• GetADC and PutDAC Recall from previously that the BX-24 has its own eight-channel,

10-bit ADC With the GetADC function, you can read a voltage level on any of eight I/Opins and correlate that voltage level with a binary number (from 0 to 1,023) Conversely,you can use the PutDAC function to output a pulse train that will mimic a variable volt-age

• ShiftIn and ShiftOut With ShiftIn you can receive a series of bits on a single I/O pin and

convert them to a single byte in a variable ShiftOut does the inverse, where you canconvert a byte into a series of bits Both functions allow you to specify an I/O pin for

use as the data source and another I/O pin for the clock The BasicX software matically triggers the clock pin for each bit received or sent

auto-• OpenCom The BX-24 supports as many serial ports as you have available I/O pins.

With OpenCom you can establish serial communications with other BX-24 chips or anyother device that supports serial data transfer One common use for OpenCom is toestablish a link from the BX-24 chip back to the download window of your PC; this win-dow can serve as a terminal for debugging and other monitoring tasks

• PulseIn and PulseOut The PulseIn function waits for the level at a given I/O pin to

change state One practical application of this feature is to watch for a critical buttonpress to activate some function on your robot PulseOut sends a pulse of a certain

duration (in 1.085-microsecond units) out a given I/O pin PulseOut is one of the mostcommonly used functions, used to blink LEDs, trigger sonar pings, and command ser-vomotors to move to a new location

• InputCapture Somewhat akin to PulseIn, InputCapture watches for signal transition on

a specific I/O pin of the BX-24 InputCapture can time the duration of these transitions,thereby giving you a “snapshot” of a digital pulse train, including how long each pulselasted

• PlaySound The PlaySound function outputs a waveform that, when connected to an

amplifier via a decoupling capacitor, allows you to play previously sampled sound thathas been stored in the EEPROM You can play back sounds at various sampling ratesand control the number of times the sound is repeated

Find out more about the BasicX-24 and other members of the BasicX family at the

company’s Web site:

http://www.basicx.com/

Try these Google.com search phrases to locate program examples and circuit

dia-grams using the BasicX:

basicx program examples

basicx programming examples

basicx—site:www.basicx.com—site:basicx.com

Trang 9

Support for the Atmel AVR line is a specialty Also sells

starter kits, microcontroller chips and development

boards, project boards, compilers and programming

software (for both Basic and C), books, and PC

inter-faces Additional offices in the U.S

LAWICEL 204207Klubbgatan 3

S-282 32 TyringeSweden

Web site is in English and Swedish

Kevin Ross sells a whole mess of BotBoard Plus

micro-controller boards and BotBoard interface products

Many of the boards are available in parts kit or

assem-bled form

For those who are new to the BotBoard Plus, it uses a

Motorola 68HC11-based microcontroller and provides

various connectors to attach robotic parts to it

According to Kevin, “The BotBoard Plus is widely used

by Universities and hobbyist for learning and

experi-mentation The members of the Seattle Robotics

Society have been using the BotBoard design for several

years.”

Additional boards using other models of Motorola

microcontrollers, such as the MC68HC912D60 and

MC68HC812A4, are available as well All are

profession-ally produced, with green solder mask and

plated-through holes

Kevin is also the editor of Encoder, the official

publica-tion of the Seattle Robotics Society; see:

Trang 10

Device programmers for EPROM, 8751 devices,

Microchip PICmicro controllers

Micro Engineering Labs makes and sells development

tools for the Microchip PICmicro microcontrollers

Their products in review:

• PicBasic Compiler-Compatible with the Basic Stamp

I, adds I2C support, instructions to access external

serial EEPROMs, serial speeds to 9600 baud, in-line

assembler code

• PicBasic Pro Compiler-Compatible with the Basic

Stamp II, adds I2C support, direct and library

rou-tine access to any pin or register, automatic page

boundary handling past 2K, real

If Then Else Endif structures, built-in LCD

sup-port, to access more external devices including

serial EEPROMs

• EPIC Plus PICmicro Programmer-For Windows and

DOS compatible, capable of in-circuit serial

pro-gramming, parallel port interface, and works with

most PICmicro microcontrollers

• LAB-X1 experimenter board-Includes its own 2x20

LCD, 16-button keypad, serial port with 9-pin D

con-nector, programmable oscillator, speaker, and more

Also offered is the LAB-X2 with less built-in

hard-ware

Additional support products include:

• 2x16 LCD

• Serial graphics LCD module

• Coprocessor modules (analog input, pulse out,

be sure to download and save them for study

The company is also involved with radio frequencyidentification (RFID), selling readers and tags, as well

Trang 11

(micro-of wires and talk to each one using its unique

identifica-tion number Up to 256 such devices can share a single

serial port

The owner of NCD wrote several articles for Nuts &

Volts magazine in 1998/99 describing practical uses for

the products; the articles are reprinted for your

edifica-tion at the Web site

The URL http://www.controleverything.com/ gets you

to the same Web site

NetMedia’s BasicX family of rapid development

micro-controllers includes the BasicX-1, BasicX-24, and the

BasixX-35, plus various development boards and serial

LCD modules The BasicX sports a Windows-based

Basic language development platform, and the BX-24

product has the same form factor and pinout as the

Parallax Basic Stamp microcontroller

x 

New Micros is a leading manufacturer of single boardcomputers (SBC), peripherals, and support electronics.The company specializes in embedded systems and par-ticularly the Motorola processor line

Robotics is singled out as an ideal application for thecompany’s line of DSP-based microcontrollers Asnoted on their Web site: “The DSP803-Mini is the per-fect board for robotic applications Small in size, offer-ing many features NMIN-0803 Mini Features: Memory32K x 16, program Flash 512 x 16, program RAM 2K x 16,data RAM 4K x 16, data Flash 2K x 16, boot Flash, 10I/O(s), 8-channel 12-bit A/D 6 PWMs, one quadraturedecoder, two timers, two external interrupts, one serialcommunication interface, CAN 2.0, A/B JTAG, inputpower: 7 to 9V DC (3.3V and 5V regulators on board).With LCD interfacing and two LED indicators.”

x V

SitePlayer embedded Internet Web server

microcontroller Photo NetMedia Inc.

New Micros, Inc 202007

Trang 12

The OOPic Microcontroller

Taking an unusual approach to embedded hardware is the

OOPic, from Savage Innovations This chip, which comes on

its own carrier/developer board, uses object-oriented

pro-gramming rather than the “procedural” propro-gramming found

in the Basic Stamp and similar products The OOPic—which

is an acronym for “Object-Oriented Programmable

Integrated Circuit”—is said to be the first programmable

microcontroller that uses an object-oriented language The

language used by the OOPic is modeled after Microsoft’s

popular Visual Basic You don’t need Visual Basic on your

computer to use the OOPic; the OOPic programming environment is completely alone and available free

stand-The OOPic supports 31 input/output (I/O) lines, and with few exceptions, any of the

lines can serve as any kind of hardware interface—using what the OOPic documentationcalls “hardware objects,” which are digital I/O lines that can be addressed individually or

by nibble (4 bits), by byte (8 bits), or by word (16 bits) The OOPic also supports fined objects that serve as analog-to-digital conversion inputs, serial inputs/outputs,

prede-pulse-width modulation outputs, timers/counters, radio-control (R/C) servo controllers,and 4x4 matrix keypad inputs The device can even be networked with other OOPics, aswell other components that support the Philips I2C network interface

The OOPic comes with a 4K EEPROM for program storage, but memory can be

expanded to 32K, which will hold some 32,000 instructions The EEPROM is “hot pable,” meaning that you can change EEPRPOM chips even while the OOPic is on andrunning When a new EEPROM is inserted into the socket, the program stored in it is

swap-immediately started

Additional connectors are provided on the OOPic for add-ins such as floating point

math, precision data acquisition, DTMF/modem/musical-tone generator, digital

ther-mometer, and even a voice synthesizer, currently under development The OOPic’s ware interface is an open system; the I2C interface is published by Philips, allowing any ICthat uses the I2C interface to “talk” to the OOPic

hard-While the hardware capabilities of the OOPic are attractive, its main benefit is what itoffers robot hackers: Much of the core functionality required for robot control is alreadyembedded in the chip This will save you time in writing and testing your robot control

programs Instead of several dozen lines of code to set up and operate an R/C servo, youneed about four lines when programming the OOPic

A second important benefit is that the OOPic’s various hardware objects are ing, which means they run independently of and concurrently with one another You mightcommand a servo in your robot to go to a particular location

multitask-Though the OOPic is meant as a general-purpose microcontroller, many of its objectsare ideally suited for use with robotics Of the built-in objects of the OOPic, the oA2D,

oDiox, oKeypad, oPWM, oSerial, and oServo objects are probably the most useful for

robotics work

• Analog-to-Digital Conversion The oA2D object converts a voltage present on an I/O

line and compares it to a reference voltage It then generates a digital value, which resents the percentage of the voltage in relation to the reference voltage There are

rep-four physical analog-to-digital circuits implemented within the OOPic, available on I/Olines 1 through 4

• Digital I/O Several digital I/O objects are provided in 1-bit, 4-bit, 8-bit, or 16-bit blocks.

In the case of the 1-bit I/O object (named oDio1), the Value property of the object sents the electrical state of a single I/O line In the case of the remaining digital I/O

repre-The OOPic microcontroller.

Trang 13

objects, the Value property presents the binary value of all the lines of the group (4, 8,

or 16, depending on the object used) There are 31 physical 1-bit I/O lines implementedwithin the OOPic The OOPic offers six physical 4-bit I/O groups; three 8-bit groups, andone 16-bit group

• R/C Servo Control The oServo object outputs a servo control pulse on any IO line The

servo control pulse is tailored to control a standard radio-controlled (R/C) servo and iscapable of generating a logical high-going pulse from 0 to 3 ms in duration in 1/36-msincrements A typical servo requires a 5-volt pulse in the range of 1 to 2 ms in duration.This allows for a rotational range of 180 degrees

• Keypad Input The oKeypad object splits two sets of four I/O lines in order to read a

standard 4x4 keypad matrix The four row lines are individually and sequentially set low(0 volts), while the four column lines are used to read which switch is pressed withinthat row If any switch is pressed, the Value property of the oKeypad object is updatedwith the value of the switch; a Received property is used to indicate that at least onebutton of the keypad is pressed Once all keys are released, the Received property iscleared to 0

• Pulse Width Modulation The oPWM object provides a convenient

pulse-width-modu-lated (PWM) output, suitable for driving motors (through an appropriate external sistor output stage, of course) The oPWM object lets you specify the I/O line to use—

tran-up to two at a time for PWM output—the cycle frequency, and the pulse width

• Asynchronous Serial Port The oSerial object transmits and receives data at a baud rate

specified by the Baud property The baud rate can be either 1,200, 2,400, or 9,600baud The oSerial object is used to communicate with other serial devices, such as a

PC or a serial LCD display

Several versions of the OOpic are available: the original OOPic (or OOPic I) and theOOPic II The OOPic II adds several features useful for robotics, including built-in supportfor many popular sensors and motor controllers These include:

• oCompassDN—Reads a Dinsmore compass (http://www.dinsmoresensors.com/)

• oLCDSE(T)—Set of objects that control Scott Edwards serial LCDs

• oTracker—Tracks the position of a line

• oUVTronHM—Reads a Hamamatsu UVTron flame detector

(http://www.hamamatsu.com/)

More information on the OOPic can be found here:

http://www.oopic.com/

http://www.robotprojects.com/ (Web site sponsored by Savage Innovations)

Also check the following Google.com searches for programming examples and ect tips:

proj-oopic example robot OR robotics

oopic motor control—site:www.oopic.com

oopic OSC robot—site:www.oopic.com

Trang 14

Olimex produces printed circuit boards and also sells

ready-made boards Ready-made board products

include:

• PIC-Programmers, ICD, prototype boards

• AVR-Programmers, prototype boards

• MSP430-Flash emulation tool, prototype boards

Oricom develops “Bot-CoPs”-coprocessors for

off-load-ing computation-intensive real-time tasks from main

controllers in small robotic systems Web site includes

experimental project info, links, and articles

The Basic Stamp revolutionized amateur robotics, yet

the concept is simple: Take an 8-bit microcontroller,

normally intended to be programmed in assembly

lan-guage Instead of requiring folks to learn assembly,

embed within the microcontroller a language

inter-preter, so that it can be programmed in a simpler

lan-guage, namely Basic The Basic Stamp is a PICmicro

microcontroller with such a language interpreter It

also includes additional basic components so that it iscompletely self-contained, and runs just by applyingpower to it A voltage regulator, crystal, and additionalmemory are mounted on the Basic Stamp chip, which isthe same size as a “fat” 24-pin integrated circuit While the Basic Stamp is a main product for Parallax,they recognize that robotics is a central area of interest,

so they also offer a number of robotcentric items,including robot kits (GrowBot and BOE-Bot), varioussensor packages (line following, compass, etc.), anddevelopment boards They also team up with third-party companies to offer integrated products, such as

RF modules, video cameras, LCD panels, and soundmodules

Some additional URLs of interest related to the BasicStamp:

Trang 15

Professor Anderson provides products and help when

he’s not teaching class at Morgan State University

You’ll find sales and tutorials on PC parallel port

inter-facing, BasicX microcontroller, BASIC Stamp

micro-controller, 68HC11 micromicro-controller, PIC, JKMicro

Flashlite V25 single board computer, and others Prices

are reasonable, and there’s a ton of information at the

Microcontroller mail-order retail, including Motorola

HC11 microcontroller boards, PICmicro project

boards, and LCD modules

Makers of single board computers and microcontroller

boards, many using the TICKit interpreter engine, said

to offer faster processing than the Basic Stamp

Products include:

• TICKit 63 processor IC

• TICKit 63 computer module

• RSB509b serial data buffer IC

• TICKit 63 single board computer

x 

Rabbit Semiconductor 202006

2932 Spafford St

Davis, CA 95616USA

asso-4, or 8 MHz of most other microcontrollers) In tion to bare controllers, the company also sells “coremodules” such as the RabbitCore RCM2200 withEthernet connectivity built in

addi-Technical documentation and other support ments (most in Adobe Acrobat PDF format) available atthe Web site

docu-x 

RCM3000 RabbitCore Ethernet-based microcontroller Photo Ryan Fardo, Z-World.

Reynolds Electronics  202009

3101 Eastridge Ln

Canon City, CO 81212USA

x V

Trang 16

Kits and modules for microcontrollers, including serial

LCD interface, SX28 proto board, and SX28 proto

board starter kit

Sells Roboblock kits, mobile robot kits, toy robot kits,

microcontrollers, AVR C and Basic programming

soft-ware, parts, and other robot/electronics products Web

page is a mix of English and Korean

RDK sells Atmel AVR microcontrollers and robotics kits

(minibot, Micro Mouse) The Web site provides useful

examples of using the AVR with the BASCOM AVR

Basic language compiler

x V

Sage Telecommunications Pty Ltd 202341

P.O Box 2171 Warwick

x V

Savage Innovations/OOPic  203982 http://www.oopic.com/

Manufacturer of the OOPic and OOPic2 trollers that offer multitasking and built-in “objects”that simplify programming Many of the objects aredirectly suitable for robotics Sold by distributors

Circuit schematic and PCB layout for a based microcontroller board

68HC812A4-

Systronix 203654

555 South 300 EastSalt Lake City, UT 84111USA

x V

2508 Spruce SEAlbuquerque, NM 87106USA

Trang 17

 (505) 239-8483

 (505) 243-7514

 tecel@tecel.com

 http://www.tecel.com/

Microcontroller boards using 80C251, 80C552, 8051,

and 68HC11 controllers Compiler, assembler and

loader software included upon purchasing any of the

microcontroller boards Also:

• High-power motor driver board

• Sensors

• Encoder disks

• IC components

• Diodes

• Wire and connectors

• Misc: capacitors and bare boards

Technological Arts produces postage stamp-sized single

board computers using the Motorola 68HC1x

micro-controllers A number of special-purpose application

boards are also offered, and many are suitable for

robotics These boards include:

• Quad 12-bit DAC

• 8-channel differential amplifier

52070 AachenGermany

 +49 (0) 2419 18900

 +49 (0) 2419 189044

Adapt 912B32 controller Photo Carl Barnes

of Technological Arts

Trang 18

 info@wilke-technology.com

 http://www.wilke-technology.com/

Single-tasking and multitasking single board

comput-ers Products include BASIC-Tiger professional

Makers and sellers of HC11-based embedded

micro-controller systems Products include:

• ModCon Microcontroller-Modular controller

• Digital Input and Event Processing System-Take

actions based on sensors, push buttons, and other

See the main Microcontrollers section for a description

of the listings in this section

http://www.focalpoint.freeserve.co.uk/

Anvil combat robot With building diary and pictures

Also how-to pages using the OOPic microcontroller

• AWC-Windows and Web development, consulting,training, books, and Al Williams’s Java@Workcolumns

• AWCE-Microcontroller development, consulting,our solderless breadboard products, and PAKcoprocessors Look here for Stamp-related info,including a BS2 to PS/2 keyboard interface

• WD5GNR-Ham radio or hobby electronics

Broad and detailed information on microcontrollerand computer topics with an emphasis on interfacing.Articles include:

• uClinux-Linux for microcontrollers

• Universal serial bus

• AT keyboards

One of a number of informational pages at Beyond Logic.

Trang 19

• Windows device drivers (Windows NT/2000/XP

and 98/ME)

• CMOS image sensors

• Parallel port interfacing

Programming training and development labs for

PICmicro microcontrollers; software, breadboards, and

A C compiler for the Atmel AVR family of

microcon-trollers Free demo

Connecting a PC Keyboard

to the BS2 203069

http://www.emf-design.com/bs2/reader.htm

Instructional article on how to connect a PS/2

key-board to a Basic Stamp Includes programming code

Control a Serial LCD from a PIC 202147http://www.mastincrosbie.com/mark/

electronics/pic/lcd.htmlSample code for interfacing a PIC to an LCD, via aserial line Requires a serial LCD, such as those sold byScott Edwards Electronics

Custom Computer Services, Inc 202187P.O Box 2452

Brookfield, WI 53008USA

x V

FSMLabs, Inc 202672P.O Box 1822

Socorro, NM 87801USA

Trang 20

Generating Sony Remote Control

Signals with a BASIC Stamp II 203068

Programming examples for the Atmel AVR line of

microcontrollers Most examples are in either C or

assembler, with a few in BASCOM Basic

This Web site provides hands-on examples of a variety

of interesting robotics projects, most of which revolvearound using the OOPic microcontroller (the Web site

is maintained by Scott Savage, the developer of theOOPic) Projects include:

• Racing Rover-Collision avoidance sensors on a speed robot

high-• Big-OTrak-Retrofitting a Milton Bradley Big Trakwith an OOPic

• WilbyWalker-CADD drawings and source code for asix-legged walker

• Contactless Angular Measurement-Measure theangle your robot is to a wall

• Recycling the sonar unit from a Polaroid Camera

• Experiments with the SP0256 speech synthesizer

• Controlling 21 servos from your PC

Robotics Information and Articles  204120 http://www.leang.com/robotics/

Example ‘bots and online articles, good ones on suchsubjects as:

• Controlling servo motors with various trollers

microcon-• RF serial communication for the MIT Handy Board

• H-bridge motor driver circuit

• Infrared proximity sensor

For Kam Leang’s past and current robot projects, seealso:

http://www.leang.com/robotics/

Serial LCD interface using AVR 90s2313 202155http://members.tripod.com/Stelios_Cellar/AVR/

L.O.S.A - List of Stamp Applications

Lud’s Open Source Corner 204056

http://drolez.com/hardware/

How-to articles with code and programming examples

on:

• Atmel AVROpen Source Software: PWM/Servo

con-trollers with GPIO and serial interface

• Palm Cybot-Control a Cybot from your

PalmOS-based device and SmallBASIC

Ngày đăng: 10/08/2014, 02:20

TỪ KHÓA LIÊN QUAN