Control of Compass
Blades
Posts: 3
I just recently bought a compass from www.ocean-server.com·and i am unable to communicate to the Basic Stamp 2 P40. The compass is the 3500
Comments
Since it will be communicating in standard NMEA type sentences in RS232, wouldn't the code used to intrerface with the Parallax GPS unit be a good starting place?· (Actually, I have to admit here that I don't know anything about the Parallax unit... yet.)· The GPS·speaks serial NMEA, right?
http://www.parallax.com/dl/docs/article/GPSReadings.pdf
You might want to pick some PINS to assign to RS232 communication and use a MAX232 (or similar) level converter for TX and RX.
Is it possible to connect the wires from the compass used to assemble a serial plug to the board?
If it is unable to be connected directly to the board do you belive that if we were to aquire a serial that splits would programing the basic stamp foul up the compass?
The compass is going to be used inside of a submarine for a competition. So we were hopeing to be able to have the serial port connected to the outside of the hull for quick modification of the program.
One possable solution thought of was the I^2C IN command.
We haven't don't have a large ammount of experiance programming.
The PDF I attached in my post above showed how to deal with NMEA sentences on the Stamp. Since the Compass natively supports Serial Communications and the Stamp can talk Serial In/Out on any pins, this does seem to be the best approach to me.
You should be able to use pins 5 (XMT),6 (GND),7(RCV) on the 3x00 10 pin connector and use say pins P14 & P15 on the Stamp for Serial in and Serial out but like I said... pay attention to the need to invert the signal if you don't use a level converter and that you need to cross-over the signals (XMT --> RCV, etc).
First, how would we invert the signal or what would be a good level converter to use? Which method would be easier and quicker to apply?
Second, we have seen the term cross-over used in different situations all meaning a different thing each time, just wondering exactly what you mean.
Finally, if you are using wires 5,6, and 7; are wires 2,3, and 4 are left out the the system?