serial communications
Doug Shave
Posts: 2
hello all,
I am working on a project with the basic stamp, I have multiple temp sensors on the stamp that I am reading using the 1-wire protocol; however, I also want to read serial input from another device.· My question is:
···· I am trying to get serial data into the stamp, but I am unsure about the timing.·
·The device I am using has 9600 baud, n, 8, 1.· How would I go about getting the data without any losses.
and is there a way to poll the data every so often to refresh it.
thanks,
Doug
I am working on a project with the basic stamp, I have multiple temp sensors on the stamp that I am reading using the 1-wire protocol; however, I also want to read serial input from another device.· My question is:
···· I am trying to get serial data into the stamp, but I am unsure about the timing.·
·The device I am using has 9600 baud, n, 8, 1.· How would I go about getting the data without any losses.
and is there a way to poll the data every so often to refresh it.
thanks,
Doug
Comments
·What about this device? http://www.gaoresearch.com/onlinestore/index.php?main_page=product_info&products_id=49
Post Edited (Philip Gamblin) : 7/21/2005 4:39:36 PM GMT
·
Serin pin, 16468,[noparse][[/noparse] use String or ]
Serin pin, 16468,[noparse][[/noparse]byte1,byte2- byte8,byte9]
OR
Serin pin, 84,[noparse][[/noparse] use String or ]
Serin pin, 84,[noparse][[/noparse]byte1,byte2- byte8,byte9]
·
And then do a debug out take a look at what shows up
Not knowing what the data is and how much will be showing up will be your major problem
I am using the BS2p basic stamp, as far as the device that I am trying to attach to the stamp it is a pulse oximeter.· I am concerned with 3 bytes of data.· The first byte being the status, Second byte the heart rate, and the third byte is the (Oxygen level) Spo2. These 3 bytes are transmitted once per second.
Packet description:
Byte-1······················ Byte-2················· Byte-3
bit7 = 1····················· = 0····················· ·= 0
bit6 = snsd················ =· hr6··················· = sp6
bit5 = oot················· = hr5····················· =sp5
bit4 = lprf················· = hr4······················=sp4
bit3 = mprf··············· = hr3······················ =sp3
bit2 = artf················ = hr2······················ =sp2
bit1 = hr8················ = hr1······················ =sp1
bit0 = hr7················ =hr0························=sp0·
thanks again for the help