Getting a 5 volt output using VBASIC with the BS2p24?
Freezepop
Posts: 23
Is there a command I could use in VBASIC to do that?
Comments
The BS2p24 uses an SX microprocessor and Parallax has datasheets available for download that discuss
the amount of current available from an I/O pin or group of I/O pins. The datasheets also show the
I/O pin voltage vs current drain
Look in the PBasic manual under the HIGH, INPUT, LOW, OUTPUT, and TOGGLE commands. Also
look at the descriptions of the DIRS, INS, and OUTS predefined memory locations.
Note that an I/O pin is not a power source although it can typically supply up to maybe 30ma
The only thing in my PBASIC code is asking my reader module to get the tag numbers >.>
So the main thing I should be asking is how do I use VBASIC to communicate with my STAMP
Post Edited (Freezepop) : 12/20/2007 3:30:48 AM GMT
Generally, you have to communicate from a PC using serial I/O. Somehow, you're asking your PBasic code to send the RFID tag numbers to the PC. You have to ask your PBasic code to set the I/O pins HIGH or LOW. For example, say that whenever your Stamp receives an "A", it returns the last RFID code read or something else to indicate that nothing was read since the PC asked previously. You'd add additional codes "B" and "C" to set some I/O pin HIGH or LOW respectively. If you want multiple I/O pins, you could use a digit like 0 to 7 to represent 3 I/O pins and the numeric value received is copied to the 3 I/O pins as a group.
what I'm asking is there anyway using VB to tell the STAMP to activate one of it's IO pin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Jeff T
Then x will be going to my stamp and there's where I'm stuck!
So I went to do abit of searching and I found this
So I guess with my BS2p24 I would write something about the SIn pin but I have no idea what to do with it since I'm not too hot with pbasic
Post Edited (Freezepop) : 12/20/2007 7:08:49 AM GMT
Jeff T.
I'd probably use select case and a subroutine but this is the idea.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
But it says that serin is in used and I have completely no idea how to go around it any help?
Sorry about this but I'm really not used to using PBASIC yet
Jeff T.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
"PIN" became a reserved word as of PBASIC 2.5. Use some other variable name, and the problem will disappear.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
And Franklin, I want to make this code work, it has to control the RFID reader and the activation of 1 of the other pins to a 5 volt via datain by VB
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen