Interface to winbox
Craig N
Posts: 17
Q from newbie:
Just got a basic stamp homework board from a radio shack going out of business (bummer), and immediately set to work on a robot. Very interesting controller here.
My question is: I'd like to interface it to a PC to, for example, download external EEPROM data or communicate via RC while the robot is roaming. I started experimenting with the SERIN/SEROUT commands, as I understand that if I write to PIN 16, that would use the onboard serial connector (?) and started trying to figure out corresponding VC++ code, but feel like I'm reinventing the wheel. Does anyone have sample VC++ code and the corresponding PBASIC commands that would get the PC talking to the stamp?
Many TIA,
Craig
Just got a basic stamp homework board from a radio shack going out of business (bummer), and immediately set to work on a robot. Very interesting controller here.
My question is: I'd like to interface it to a PC to, for example, download external EEPROM data or communicate via RC while the robot is roaming. I started experimenting with the SERIN/SEROUT commands, as I understand that if I write to PIN 16, that would use the onboard serial connector (?) and started trying to figure out corresponding VC++ code, but feel like I'm reinventing the wheel. Does anyone have sample VC++ code and the corresponding PBASIC commands that would get the PC talking to the stamp?
Many TIA,
Craig
Comments
As far as C++, visual or otherwise, you simply need to determine the port you are trying to get the communication from, and pull serial data accordingly.
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
Craig
if you are not set-on C++, there are several articles in nuts n volts about using visual basic and a stamp..
in addition, there is probably quite a bit out there on using c++ for serial communication in general..
Here's a really interesting Q: has anyone got TCP/IP working on a BASIC stamp?
Again, many TIA,
Craig
there are several products that would help you.
i am certain the nuts n volts articles wil be handy even if you are not going to use VB. you can see how the stamp can be made to respond\transmit serial data, etc... also, i havent used c++, but i would imagine it has a way to access the windows mscomm32, like VB. the concepts and practices should be applicable.
cheers.
Hardware question: in the PINK manual (http://www.parallax.com/dl/docs/prod/comm/30013-PINK-v1.02.pdf bottom of page 2), the interface pins are connected to the wires by what looks like jumpers--a really elegant solution to a problem I've had over the years trying to connect those two things without, to date, a satisfactory solution. Is that what it is? If so, where do you get jumpers like that?
Many TIA,
Craig
If you are looking for TCP/IP stacks, there is also a stack for the SX- but really you should move to chips designed for TCP/IP if this is the direction that you are heading...
You can either make wires like that (just crimp & heatshrink on the 'socket' ends)- or with some looking around you can find them via Google...I'm not sure where we get them.
Ryan
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Ryan Clarke
Parallax Tech Support
RClarke@Parallax.com
The hardware connection is basically just a jumper wire, but Parallax includes a very nicely designed set of wires for the purpose. Been meaning to see if I can buy a couple of dozen extras for other purposes. They have a square female connector soldered on each end, and one end they inserted a matching double male connector pin. The male pin fits nicely into breadboard holes and the female connector accepts the standard pins on IC's and what have you. I'm not sure why this was used in lieu of the usual 28 ga jumper wires but I like it better on the whole. Probably for the female connector to attach to pins. Nice job, Parallax.
The only drawback with the PINK is that you only get into the comm stack at two levels: high level HTML and the very low level User Datagram Protocol. (Actually, you can send e-mail too, but you can't receive it, just send.) So the pink was conceived as a way to let your stamp display data to the world at large, and accept inbound entries from people using the html 'post' protocol. Using it for computer-to-computer stuff you have to drop clear down to the UDP level and that adds to the coding work a little. Nevertheless, it's well worth the price as you said, and the extra work as well. Tying it to a wireless hub will work fine.
Incidentally, if you have a PINK on each of two Stamps, they can exchange UDP quite easily. The extra work comes when you want to talk to Linux boxes because there are no directly applicable UDP scripts I can find. Someone did find or craft such scripts for Windows as I said. I'll try to look those up this morning and edit this post to include a link.
Update: This thread discusses the subject and includes UDP scripts for Windows:
http://forums.parallax.com/showthread.php?p=556951
Post Edited (Harbor) : 6/5/2006 10:16:26 PM GMT
Ironically, I *did* get 2 basic stamps, as they were so cheap at the Radio Shack going out of business.
Many, many thanks,
Craig