Stupid Serial Question
Archiver
Posts: 46,084
Hi, I've been a long time lurker on the list, and just dragged the
stamp out for a little experimentation.
I'm trying to build an appliance that is configured via a simple
serial interface. Draw a menu, get some key strokes, update
configuration.
Code excerpt looks like this:
SEROUT 16, 16780, [noparse][[/noparse]"########################################",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# Current Temp: 25
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# Low Limit: 10
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# High Limit: 40
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"########################################",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"Enter Command",10,13]
SEROUT 16, 16780, [noparse][[/noparse]">>"]
And then read key strokes in using a SerIn.
SerData VAR Byte
.
.
.
.
SERIN 16, 16780, [noparse][[/noparse]SerData]
I'm trying to use the Sin and SOut ports to keep things simple. I
can read and write text with no problems in the debugger but,
hyperterminal seems to display text only. Any key strokes I enter
don't seem to get passed on.
Does this come down to flow contro1? – my settings in Htm were 2400,
8, N, 1 with no flow control – although I tried everything else.
Any help would be appreciated.
Cheers
Peter Kerr
stamp out for a little experimentation.
I'm trying to build an appliance that is configured via a simple
serial interface. Draw a menu, get some key strokes, update
configuration.
Code excerpt looks like this:
SEROUT 16, 16780, [noparse][[/noparse]"########################################",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# Current Temp: 25
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# Low Limit: 10
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"# High Limit: 40
DegC #",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"########################################",10,13]
SEROUT 16, 16780, [noparse][[/noparse]"Enter Command",10,13]
SEROUT 16, 16780, [noparse][[/noparse]">>"]
And then read key strokes in using a SerIn.
SerData VAR Byte
.
.
.
.
SERIN 16, 16780, [noparse][[/noparse]SerData]
I'm trying to use the Sin and SOut ports to keep things simple. I
can read and write text with no problems in the debugger but,
hyperterminal seems to display text only. Any key strokes I enter
don't seem to get passed on.
Does this come down to flow contro1? – my settings in Htm were 2400,
8, N, 1 with no flow control – although I tried everything else.
Any help would be appreciated.
Cheers
Peter Kerr
Comments
number (0-9) in ASCII code to the stamp. Correct?
(I don't like HyperTerminal)
Ok, HyperTerminal don't actually print the character/number you're
writing on the keyboard. But he print the echo from you're stamp.
He still sends the character serially, but he doesn't print it on
the screen.
Remember to turn off all other programs that use the serial com port.
Set the baud rate slow. (2400 or less is ok)
mmmm..... I wonder if the cable should NOT be a 1 to 1 cable. But
you do receive some data, so I thereby presume you're cable is
correct.
Could you put up a led and resistor to indicate data transfer on the
in/output(pin 2 and 3)? (1K resistor)
Some HyperTerminal on win98 is not working well. Have you tried an
other PC and HyperTerminal?
I can try to use the HyperTerminal my self during the weekend, so
perhaps I can come back with a solution.
Stein.
--- In basicstamps@yahoogroups.com, "empeg_addict" <peter.kerr@z...>
wrote:
> Hi, I've been a long time lurker on the list, and just dragged the
> stamp out for a little experimentation.
>
>
>
> I'm trying to build an appliance that is configured via a simple
> serial interface. Draw a menu, get some key strokes, update
> configuration.
>
>
>
> Code excerpt looks like this:
>
> SEROUT 16, 16780,
[noparse][[/noparse]"########################################",10,13]
>
> SEROUT 16, 16780, [noparse][[/noparse]"# Current Temp: 25
> DegC #",10,13]
>
> SEROUT 16, 16780, [noparse][[/noparse]"# Low Limit: 10
> DegC #",10,13]
>
> SEROUT 16, 16780, [noparse][[/noparse]"# High Limit: 40
> DegC #",10,13]
>
> SEROUT 16, 16780,
[noparse][[/noparse]"########################################",10,13]
>
> SEROUT 16, 16780, [noparse][[/noparse]"Enter Command",10,13]
>
> SEROUT 16, 16780, [noparse][[/noparse]">>"]
>
>
>
>
>
> And then read key strokes in using a SerIn.
>
>
>
> SerData VAR Byte
>
> .
>
> .
>
> .
>
> .
>
> SERIN 16, 16780, [noparse][[/noparse]SerData]
>
>
>
> I'm trying to use the Sin and SOut ports to keep things simple. I
> can read and write text with no problems in the debugger but,
> hyperterminal seems to display text only. Any key strokes I enter
> don't seem to get passed on.
>
>
>
> Does this come down to flow contro1? – my settings in Htm were
2400,
> 8, N, 1 with no flow control – although I tried everything else.
>
>
>
> Any help would be appreciated.
>
>
>
> Cheers
>
> Peter Kerr