Hello again,
I have a working code for sending a byte using PIC18F24J50 but the same code doesn't send the correct values in PIC18F2450. I send $05 and receive 252 instead.

Here is my code:
Code:
DEFINE LOADER_USED 1
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_BAUD 115200
DEFINE HSER_SPBRG 12 
DEFINE HSER_CLOERR 1
DEFINE OSC 24

ADCON0 = 000000
ADCON1 = 001011
ADCON2 = 110101

TRISC.0 = 0
TRISC.1 = 1
TRISC.6 = 0
TRISC.7 = 1


tx1 VAR PORTC.6
rx1 VAR PORTC.7
   
LED VAR PORTC.0  
Pause 1000

mainloop:

   high LED
   Pause 1000 

  Hserout [$05] 
   Pause 100
   
    low LED
   Pause 1000 

   Goto mainloop
Any ideas? Thanks!