To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 1955
1954  |  1956
Subject: 
Interfacing a STAMP
Newsgroups: 
lugnet.robotics
Date: 
Thu, 31 Dec 1998 05:02:11 GMT
Original-From: 
MwalimuB@aol.com^spamless^
Viewed: 
1047 times
  
Ok I did it.  I took another look at how to get a BASIC STAMP to talk to an
RCX.  They can talk through the ports digitally.  This would be inefficient.
The STAMP only has 8 I/O lines, the RCX has only three.  You could
theoretically decode 8 inputs with three signals, but then the STAMP would
only have 5 I/O lines left.

The STAMP is capable of transmitting up to 2400 BAUD serially.  There is an
application note available at Parallax (the maker of the STAMP) that shows how
to wire an IR transceiver using easy to find inexpensive parts.  The only
problem here is that the application note states that at 2400 baud, there is a
high probability of errors due to the way the STAMP interprets the start bit.
I might build it any way, just to see for myself.

Finally, the STAMP can output voltage through a command called PWM - pulse
width modulation.  It requires a capacitor and a resistor on the STAMP end and
the four diode, one resistor analog interface on Gasperi's wep page.


input port (RCX)

|
                                      1 micro farad
+--|<---+--->|-------+
STAMP ---->pin7---[10k]---| (------+------------[2.2K]----|
|-----gnd
                                                |
+--|<----+--->|------+
                                               gnd
|

input port (RCX)

STAMP PROGRAM - test if pin 0 is low.  If it is, output ~2.5 volts else output
5 volts

DIRS=%00000000 'set all pins to input
loop: if pin0=0 then p0 'trap pin 0 = low
b3=0 'set volt = 0
goto volt
p0: b3=128 'set volt to ~2.5v
volt: pwm 7,b3,255 'output PWM on pin7 for maximum number of
'cycles
goto loop

I found that if run this and hook up the STAMP, with pin 0 high, the RAW value
is 660, with pin 0 grounded it is 883.  The important thing is that the values
are stable within a point or two.

chris
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



Message has 1 Reply:
  Re: Interfacing a STAMP
 
(...) would be worth doing. maybe you could set up a a/b switch to go from ir to hardwire, since the ir is only used during programming anyway. -- Bobby (26 years ago, 1-Jan-99, to lugnet.robotics)

2 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR