Still me, with the same problem
I spent one day without success !
abstract : I got garbage using Hserout (to test my RS232 line for bootloader function)
see my terminal V1.9 log file (hexa dump and ascii dump)
question :
What is wrong in my design ?
I have tested in XT and HS clock mode
I have changed the MAX232
LCD and Blink led seems normal (pic is alive !)
I am lost !
Thnaks in advance
Francois
the program test is the following :
' Using PIC 16F874 @ 20MHZ
'
DEFINE OSC 20
' Set LCD Data port
DEFINE LCD_DREG PORTD
' Set starting Data bit (0 or 4) if 4-bit bus
DEFINE LCD_DBIT 4
' Set LCD Register Select port
DEFINE LCD_RSREG PORTD
' Set LCD Register Select bit
DEFINE LCD_RSBIT 2
' Set LCD Enable port
DEFINE LCD_EREG PORTD
' Set LCD Enable bit
DEFINE LCD_EBIT 3
' Set LCD bus size (4 or 8 bits)
DEFINE LCD_BITS 4
' Set number of lines on LCD
DEFINE LCD_LINES 2
' Hardware configuration
' ======================
TRISC = %10000000 ' PORTC.7 is the RX input
' PORTC.6 is the TX output
' Serial communication definition
' ===============================
' Using internal USART and MAX232 to interface to PC
DEFINE HSER_RCSTA 90h ' enable serial port, enable continuous receive
DEFINE HSER_TXSTA 20h ' enable transmit, BRGH=1
DEFINE HSER_SPBRG 129 ' 2400 Baud @ 20MHz, 0,17%
DEFINE HSER_CLROERR 1 ' Clear overflow automatically
Pause 500
start:
high portd.1
pause 100
low portd.1
lcdout $FE ,1,"test"
pause 500
lcdout $FE ,1, "to see"
pause 500
hserout ["test TEST"]
pause 1000
goto start




Bookmarks