If i remember correctly, lower bits of PORTB, ( PORTB.2 ) is also multiplexed with RX of the USART. And i don't remember if this PIC allow you to disable the RX part, so my guess would be...
Code:
for value = 1 to 255
RCSTA=0 ' Disable USART
TRISB.2=0
pause 25
LCDout $FE,$C0, dec value
pause 25
RCSTA=$90 ' enable USART
pause 25
hserout [0,dec value] ; IF THIS LINE IS ENABLED, LCD DOESN NOT DISPLAY ANYTHING
pause 50
next value
sure enough there's few unecessary delay up here... not sure if this will help and work at all using the above... Maybe a good situation to use SEROUT/SEROUT2/DEBUG?
PS: Make sure of your DEFINES, must all be in UPPERCASE, unless, it may not work.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks