ACES PROGRAM Brad Ellison 28 January 2003 Basics of Interfacing to CanSat.

Post on 16-Dec-2015

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

Transcript

ACES PROGRAM

Brad Ellison

28 January 2003

Basics of Interfacing to CanSat

Digital InputEach of the Basic Stamp’s I/O Pins, P0…P15can be programmed to be an Input or an Output (Direction)

Improved circuit for reading a switch state.

NO = Normally OpenNC = Normally Closed Basic Stamp BUTTON Function is one solution

to switch contact bounce problem.

Digital Input

Digital Input

Digital Output

Digital Output

Digital OutputBasic Stamp can only source or sink about 20 milliamps. Some loads require more.

Digital I/O Command SummaryINPUTOUTPUTREVERSELOWHIGHTOGGLEPULSINPULSOUTBUTTONCOUNTPOLLINPOLLOUTPOLLMODE

XOUTLCDCMDLCDINLCDOUTSERINSEROUTOWINOWOUTSHIFTINSHIFTOUTI2CINI2COUT

Simple Analog In/Out Techniques

RCTIME 7, 1, result RCTIME 7, 0, result

Analog Input

Simple Analog In/Out TechniquesAnalog Output using PWM

PWM pin, duty, duration

Analog In/Out InterfacingAnalog-to-Digital & Digital-to-Analog Converters

But the BASIC Stamp has a limited numberof I/O pins for connection to bit-parallel devices.

Analog In/Out InterfacingAnalog-to-Digital & Digital-to-Analog Converters

Serial ADC uses fewer connections than a parallel output ADC.

SPI, I2C, Microwire and 1-Wire protocols.

Basic Stamp supports with built-in functions:

SHIFTIN, SHIFTOUT, I2CIN, I2COUT, OWIN, OWOUT, PULSIN, PULSOUT

CanSat Interface Board

+5 GND

P0P1P2P3P4P5P6P7

P15P14P13P12P11P10P9P8

top related