I need to send very simple string (a very basic home rolled protocol) from a picaxe based remote device to a PC. How is the simplest way to bring output from the receiver to a PC?
Left in my ignorance, I will probable use another microcontroller with a rs232 connection to the PC but there must be a simpler way … can I connect the data pins on the receiver directly to pin 2 on a PC’s serial port?
Thansk for putting up with what may be trivial questions
It wouldn’t be a good idea to connect the output of the receiver directly to the PC serial port. If you have one of those serial ports that are true RS-232, then you really don’t want to do that. The two things you need to watch for are the proper levels. The receiver (with its digital output) outputs a 5v signal, probably TTL compatible. RS-232 (if it really is RS-232) uses a range +/- (i.e., -5 / +5v) for mark and space. The other factor is the polarity of the logic levels (i.e. mark is +5v, space is -5 OR mark is -5v and space is +5).
To do things “right”, use a MAX232 (or any of its cousins) to provide the proper level conversion. You can also use other types of level converters. Do a search on the main SparkFun site for level converters.
I have a few SparkFun BOB-08745 to use as a level converter … I understand is is needed per the RS232 specification but if I’m using a usb to serial cable at the PC, is it still needed?
The events detected by a remote accelerometer are correlated by a remote picaxe so only a simple message needs to be transmitted from the ASK transmitter module to the PC.
Again, please excuse my possibly stupid questions … I’m stumbling through my first project like this.
Woooo watch out… the BOB-08745 is just a level converter and not a LEVEL SHIFTER. The most popular level shifter is the MAX232 (I would actually recommend a MAX233 because it doesn’t need external capacitors).
Look, the USB to serial converter is probably a USB to RS232 (unless you specifically bought a USB to TTL converter wich is unlikely). What this means is that you get a differential signal out of it (probably +/- 5V but could be bigger).
Now, a TTL serial comunication (found in most microcontrollers) and a RS323 (mainly found on computers and other devices) have the same logic transmission protocol but have a key difference: TTL is NOT differential => that means the expected levels are 0 to 5V.
All that being said, you just need an RS323 to TTL level shifter like the MAX232 or MAX233 to conect the USB to serial adapter to your device (IF YOUR DEVICE HAS A TTL SERIAL INTERFACE)
If all of this seems to problematic (it can get confusing when you’re new), you could buy this USB to TTL converter that doesn’t need additional components like the MAX232: http://letsmakerobots.com/node/7320