PDA

View Full Version : Problem with HSERIN



financecatalyst
- 23rd June 2013, 23:32
Hi, I have the following defines added from PICMUltiCalc:


DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 64 ' 19200 Baud @ 20MHz, 0.16%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically


I am receiving the following data: 'Home*'

and I am trying to catch it in the following statement:

HSERIN [STR Name\25\"*"]

Then to check what is in Name (25 byte variable) I am doing :

HSEROUT ["Name=",STR Name,13,10]

What I am getting out is this:

Name=Hom²åHom²åHom²åHom¥åHområ ' Attempt 1
Name=Hom:åHomZåHomUşHom8åHom¸ù
Name=Hom(åHom¬ùHomZåHomLùHomZå
Name=HomYåHomœùHom:åHomŒùHomˆù ' Attempt 5

As you can see that it is not capturing the data properly, I also have to send 'Home*' like 5 times as it is not getting the data properly and it is filling the whole 25 byte array. Is there something wrong with the settings? Thanks

financecatalyst
- 24th June 2013, 00:11
Oscillator Error. Problem solved.