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 / 2041
2040  |  2042
Subject: 
Re: Interfacing a STAMP
Newsgroups: 
lugnet.robotics
Date: 
Fri, 1 Jan 1999 02:23:37 GMT
Viewed: 
1406 times
  
lego-robotics@crynwr.com wrote:

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

  If you could just offload some tasks and use the stamp for additional sensors it
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



Message is in Reply To:
  Interfacing a STAMP
 
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 (...) (26 years ago, 31-Dec-98, 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