110 likes | 281 Views
ME456:Mechatronics WAM Chapter 1: Getting Started. Prof. Clark J. Radcliffe Mechanical Engineering Michigan State University. http://www.egr.msu.edu/classes/me456/radcliff. I/O Pins 8-15. 5 volt Regulator. 2k byte EEPROM. 20 MHz Resonator. Interpreter Chip PIC16C57 w/ 26 bytes RAM.
E N D
ME456:MechatronicsWAM Chapter 1:Getting Started Prof. Clark J. Radcliffe Mechanical Engineering Michigan State University http://www.egr.msu.edu/classes/me456/radcliff
I/O Pins 8-15 5 volt Regulator 2k byte EEPROM 20 MHz Resonator Interpreter Chip PIC16C57 w/ 26 bytes RAM Serial Interface I/O Pins 0-7 BASIC Stamp II • An integrated microcontroller system • Postage Stamp Size, Programmed in BASIC
The Basic Stamp • Introduced them in 1992. • As of July 2000, > 200,000 BASIC Stamp modules into use. • Each BASIC Stamp includes: • a BASIC Interpreter chip • internal memory (RAM and EEPROM) • a 5-volt regulator • 16 general-purpose I/O pins (TTL-level, 0-5 volts) • built-in commands for math and I/O pin operations. • 5 models: BS1, BS2, BS2e, BS2sx & BS2p.
BASIC Stamp I • The original Basic Stamp • 8 i/o pins • 16 bytes of RAM • 256 bytes of program storage • Fewer programming functions • 2000 PBASIC statements/sec • 2 ma running power requirement • Parallel port interface
BASIC Stamp II • Specifications • 4000 BASIC Statements per second • 16 Digital I/O pins • Source 20 mA, Sink 25 mA • Special purpose control routines • 5v power supply (50 mA) • Low power (8 mA, sleep at 0.1mA) • RS232 serial programming interface • 2k bytes program token storage
Other BS2 • BS2e: • 64 bytes scratch pad RAM • 30 mA i/o pin current • BS2sx: • 39 PBASIC Commands • 10,000 instructions/sec • BS2p24: • 12,000 instructions/sec • 55 PBASIC Commands • BSp40, BS2pe - more features
Board of Education Allows easy prototyping with BSII Wall Transformer Connection 5 volt 1.5A Regulator RC Servo Connections 9 volt Battery Connector 5v Power Supply Connection USB / Serial Interface To PC Circuit Prototyping Area Digital I/O Connector BASIC Stamp II Microcontroller Reset Button On-Off Switch
PBASIC Examples '{$STAMP BS2} '{$PBASIC 2.5} ‘Define symbols LED CON 14 'LED control pin Time CON 15 'Pause time (ms) ‘Flash LED’s (pins connected “low”) DO ‘loop forever HIGH LED ‘Turn LED off PAUSE Time LOW LED ‘Turn LED on PAUSE Time LOOP
Some Examples Let’s run the Basic Stamp Editor …