HSEROUT rules for Oshonsoft

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi,
Can someone clarify some rules regarding HSEROUT in Oshonsoft please?

What rules have to be followed when using: '#', 'BYTE', 'WORD' and 'STRING' in HSEROUT

Camerart.
 

jjw

Joined Dec 24, 2013
823
Hi,
Can someone clarify some rules regarding HSEROUT in Oshonsoft please?

What rules have to be followed when using: '#', 'BYTE', 'WORD' and 'STRING' in HSEROUT

Camerart.
Do you mean using # before a variable or something else?
 

sagor

Joined Mar 10, 2019
903
No "rules" I can think of, but I usually only use byte variables or quoted strings (ie: HSEROUT "Hello") or
Code:
For i = 0 To 13
Hserout buf(i)
Next i
Best to make a simple test program with the Hserout strings/values you want, and watch them in the hardware UART simulator as they are output.That way you can see if you are outputting the values you want. Modify the code from there.
The UART monitor can be set up for binary/ascii or HEX display (HEX check box in upper right corner). I always start with HEX display first to see if there are any non-displayable characters, then switch to regular (ascii/binary) if outputting regular text
 

Thread Starter

camerart

Joined Feb 25, 2013
3,724
Hi All,
1st, I've just spotted that I've set Oshonsoft for the wrong PIC, so perhaps one of the problems I'm having is that:oops:
----------------------------------------------------------------------------------------------------------------
[E's Code and results:

Dim nmsg As String
nmsg = "A String"
Dim nbyte As Byte
nbyte = 0x41
Dim nword As Word
nword = 0x1234

Hserout "no hash string= ", nmsg, CrLf
Hserout "hash string= ", #nmsg, CrLf
Hserout "no hash byte= ", nbyte, CrLf
Hserout "hash byte= ", #nbyte, CrLf
Hserout "no hash word=", nword, CrLf
Hserout "hash word= ", #nword, CrLf
---------------------------------------------------------------------------------------------------------------------
When programming a calculation, it will most likely be needing BYTES, WORDS, STRINGS and perhaps LONGs.
EDIT: I use HSEROUT to test each result as a calculation progresses, so I need to know when to choose, which one?


Thanks to all, C.
 

Attachments

Last edited:
Top