You 'r right skimask,
We cannot achive 115200 baud with SERIN2, According to manual and limitation of compiler,
But i think one day we all will use SERIN2 at 115200 baud as below,
DEFINE OSC 20
INCLUDE "My_Lcd.bas"
INCLUDE "DT_INTS-14.bas"
INCLUDE "LCDbar_INC.bas"
INCLUDE "DT_INS-SERIN2.bas"
B0 var word
Main:
@ DT_SERIN2 , 115200, [B0]
LCDOUT $fe,1, "Value", DEC 5 B0
pause 200
goto main
Sory Sir Darrel Taylor, its impossible for us to achive 115200 baud in serin2 mode without your MAGIC code.
Last edited by precision; - 9th March 2008 at 10:35.
Oky Here is the code after trial it on PIC16f877a to communicate with PC at 115200 bps baud rate and it's working fine without any error
===============================================
DEFINE OSC 20
' Set receive register to receiver enabled
DEFINE HSER_RCSTA 90h
' Set transmit register to transmitter enabled
DEFINE HSER_TXSTA 24h
' Set baud rate
DEFINE HSER_BAUD 115200
' Set SPBRG directly (normally set by HSER_BAUD)
DEFINE HSER_SPBRG 10
main:
HSEROUT ["yes its working",13,10]
pause 300
goto main
end
Bookmarks