PDA

View Full Version : Sending a word var to a PC using HSerout



modifyit
- 19th June 2005, 16:44
I've been trying to send a word variable from a 877a chip to a pc microcode studio plus hyperterminal with not much luck.

I have gotten an echo program to work where the pic will send to the pc what ever I send to the pic.

Now if I try to send a word file from the pic to the pc I get nothing but jiberish. I realize I may need to convert the word variable to ascii characters, but I am not sure how.

I think I am missing somthing obvious but not sure what thanks for any input.

mister_e
- 19th June 2005, 16:58
you must use the HSERIN modifiers. DEC,HEX,BIN depending what you need to see



MyVar var word
MyVar=4321

Hserout[DEC MyVar]


now you're suppose to see 4321

modifyit
- 20th June 2005, 04:44
Thanks for your help, it seems to work for the most part. Right now the first time I read out to the PC after I use the microloader bootloader to load my file on to the pic all I get is jibberish. Once I reset the pic using the mclr everything works as expected.