"ie i send 12 and nothing is echoed back
then i send 16 and 12 is echoed back
then i send 58 and 16 is echoed back
etc...
what would be the cause of this?"
o.k i don't know if it's working for you now without the delay but in case not it seems to be an baud rate problem. So now you have to try those one and remove DEFINE HSER_BAUD 9600 command line.
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
DEFINE HSER_SPBRG 31
or if it's not working good
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 129
Q."what is this hash supposed to do?"
A. typing problem from myself ... i'm not proud of me. but in this
case it suppose to return you the ASCII decimal value of your
entry. EX if you send 1 to pic he will return 49
Q."also what is your reasons for leaving out the
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 20h
lines?"
A. it seems that you don't need them if you use DEFINE
HSER_BAUD 9600 line... but i'm really not sure since i've never
use them before this post
"the echo back seems to be delayed by 1 transmission."
As you must know, if you use MicroCode Studio or hyperterm or other if you send 11, the result of datain is not 11. It will be separate in two byte that contain ASCII value (49 decimal,31 Hex). if you want to send value you must send them in one byte.
that mean if you want to get 11 as value you have to send 11 in hexadecimal. or baddest way if value<99
Hserin [FByte, SByte]
value = ((FByte-48)*10)+(Sbyte-48)
Hserout[#value]
it works but this is really stupid to do it like this.
regards
Last edited by mister_e; - 14th October 2004 at 02:49.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks