Stingray Hardware Trap?
I have noticed something with the Stingray hardware today. I tried using a button (the schematic is from the PE labs page 33) on the breadboard, but using 5V since that is what the logic chips are at. I built the button into my program, but noticed some problems. I have had the button (working) on there a day or so before it started acting up without changing the hardware or that portion of the software, so I wrote the following code:
A first I thought my problem was a faulty button, so I took that part out. My circuit is as shown:
The wire is one of the included blue wires that I moved on the breadboard between the two terminals. I figured that there would be a period of time where the input was unstable, but that it wouldn't matter in the long run.
I ran the code, and much to my surprise I can move the wire between either terminal and both read 1! I hooked up my multimeter to the terminal side of the resistor, and the ground of the multimeter to ground. I then moved the wire, and it worked correctly. My next step was to replace the 10Kohm resistor with a 1Kohm resistor, and the circuit worked fine either with or without the multimeter in the loop.
So, my conclusion is that the level shifters used don't work with high resistance values. In my mind this is a bug, since the PE documentation clearly expects 10Kohms to work just fine.
I have uploaded the full code, but pretty much the only difference in practice with the code above is the addition of clock settings and the OBJ declaration for FDX.
Edited title from "Stingray Hardware Bug?" to "Stingray Hardware Trap?" per the request of Chris.
Post Edited (SRLM) : 11/18/2009 4:26:55 PM GMT
PUB Main | i, t1, t2, t3, lines com.start(31, 30, 0, 57600) waitcnt(clkfreq*2 + cnt) dira<FONT&NBSP;STYLE="FONT-SIZE:10PT;"> := 0 t3 := 0 t1 := t2 := ina<FONT&NBSP;STYLE="FONT-SIZE:10PT;"> repeat t1 := ina<FONT&NBSP;STYLE="FONT-SIZE:10PT;"> com.dec(t1) if t1 <> t2 com.str(string("new value!")) com.dec(++t3) com.tx(13) t2 := t1
A first I thought my problem was a faulty button, so I took that part out. My circuit is as shown:
5V GND | | | \ | / 10 Kohm | \ | / | \ | | | | 0 0 + | | | IO Pin
The wire is one of the included blue wires that I moved on the breadboard between the two terminals. I figured that there would be a period of time where the input was unstable, but that it wouldn't matter in the long run.
I ran the code, and much to my surprise I can move the wire between either terminal and both read 1! I hooked up my multimeter to the terminal side of the resistor, and the ground of the multimeter to ground. I then moved the wire, and it worked correctly. My next step was to replace the 10Kohm resistor with a 1Kohm resistor, and the circuit worked fine either with or without the multimeter in the loop.
So, my conclusion is that the level shifters used don't work with high resistance values. In my mind this is a bug, since the PE documentation clearly expects 10Kohms to work just fine.
I have uploaded the full code, but pretty much the only difference in practice with the code above is the addition of clock settings and the OBJ declaration for FDX.
Edited title from "Stingray Hardware Bug?" to "Stingray Hardware Trap?" per the request of Chris.
Post Edited (SRLM) : 11/18/2009 4:26:55 PM GMT
Comments
I'm going to step up on my soap box for this one because your subject is one of those ones that makes me cringe a little. It is irresposible to call something a bug in either hardware or software without fully understanding the nature of what you're referring to. Now others reading this may associate poor design with the Stingray even once it has been cleared as a misunderstanding. While some of your code was trashed by the editor, it really is irrelevant since the issue is in the way you're interfacing to the level shifters. From the datasheet:
The resources to disable the level shifters and use the I/O lines directly was provided and I would recommend in an application like this using the lines directly.· That is, I recommend disabling the translators and connecting switches and other devices which don't require the level shifting to be connected directly to the Propeller I/O pins.· Perhaps we did not make this easy enough in our design and it is something I will look at in greater detail in the near future.· Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
50 72 6F 6A 65 63 74 20 53 69 74 65
Post Edited (Chris Savage (Parallax)) : 11/18/2009 4:06:28 PM GMT
The Propeller Servo Controller USB uses the same TXB0108 8-Bit Bidirectional Voltage-Level Translator chips as the MSR1 board. The same output loading precautions should be taken.
Edit: sorry changed resistor value