Software loopback
Buck Rogers
Posts: 2,187
Hello!
I've written this preliminary program which simply collects data sploshing into a terminal from a serial input function. Then waits a few moments and sends it back via a serial output function.
It looks like this:
What I'm up to is one of taking that idea and translating it into a stream to deliver to a Prop Backpack. Said backpack will be used to display what I'm collecting from the device, a Palm Pilot M100 or Palm Pilot 3x, on a small LCD screen.
Now the audience question, is that the correct way to go about it?
I've written this preliminary program which simply collects data sploshing into a terminal from a serial input function. Then waits a few moments and sends it back via a serial output function.
It looks like this:
' {$STAMP BS2} ' {$PBASIC 2.5} X VAR Word DD VAR Word FOR DD=0 TO 255 SERIN 0, 16468, [X] PAUSE 2200 SEROUT 1, 16468, [X] NEXT
What I'm up to is one of taking that idea and translating it into a stream to deliver to a Prop Backpack. Said backpack will be used to display what I'm collecting from the device, a Palm Pilot M100 or Palm Pilot 3x, on a small LCD screen.
Now the audience question, is that the correct way to go about it?
Comments
The Palm Pilot is likely to send bursts of data and since the BS2 has no buffer capability data can easily be lost.
Oddly enough it works fine without the buffer.
It seems to be working. I remembered a problem with the original I/O device a now discontinued DS275 part. According to Mike Green, the part uses inversion to make itself work properly for the purposes of sending and receiving data via the RS232 levels. And to be honest that I did not know.
Thats the reason why I chose to use the level of 9600 baud and set it to be delivered inverted.
What I'll do next time I'm working on it, is to make a video and post it.
Did you try the code incidentally?
Oh and folks the fact that it works can be attributed to my not buying the Palm device from eBay. That one I bought from Amazon, its a Palm 3x. The other one I tried was a Palm M100.
No I did not try the code. It should operate as I stated though.
Okay I've changed the delay time from the one shown of
to
Turns out that your theory about the delay and the possible loss of data attributed to it, made sense. The change now seems to be working properly.