Hi,

Ok, I see. Thanks for the info. I thought I would try SERIN2/SEROUT2 at first since there is a simple example of it here:


Taken from the Physical Computing website (Dan O'Sullivan, Tom Igoe)

"The example below shows serin2 in action, and uses a timeout and a label to jump to on timeout. In it, <B>we're waiting for a byte value in (0 - 255),</B> and storing it in a variable called inputData. If we get data, we set pulseWidthVar equal to the new value. If we get no data, we skip to nodata, and use the last value we had for pulseWidthVar:"

inv9600 con 16468 ' <-----by the way what's happening here?

inputData var byte ' variable to receive data into
pulseWidthVar var byte

' set initial value for pulseWidthVar
pulseWidthVar = 255

main:
serin2 portc.7, 16468, 10, nodata, [inputData]
pulseWidthVar = inputData

nodata:
pulsout portb.2, pulseWidthVar
goto main


Their example above is for driving a servo motor, but I'll be just lighting a LED at first.

They said; "As with serout2, we can receive data in a number of formats using serin2.<B> The simplest is to receive it raw. If we expect a single byte, put a byte variable in the data parameter."</B>

So would anything being received by the pic via serial output from my PC be automatically stored in the byte variable (inputData)?

My Python program sends serial data out as a string. I can send out any string. I'm a little confused here probably because I haven't read up on it:

Must the string that's being sent out of my PC be formatted in a special way, in order to be received by the above example, or will whatever is sent automatically be stored in the inputData variable?

It states in the example; "we're waiting for a byte value in (0 - 255)", so does this mean my Python program must send a string containing only numbers 0-255?

The Python code that does the sending looks like this:

ser.write("Hello World") #write a string to com port

(I've been using <a href="http://www.microsoft.com/technet/sysinternals/utilities/portmon.mspx">PortMon </a>to monitor my com port and <I>anything</I> I type in place of the "Hello World" string is being sent out, numbers, words.)

Thanks again,
Tony