Hi all,
Could anyone guide me about setting up the serial communication to 115200 baudrate?
Thanks
kblim
Hi all,
Could anyone guide me about setting up the serial communication to 115200 baudrate?
Thanks
kblim
I use DEBUG & DEBUGIN. These commands produce much smaller code, and
you can get higher data-rates like 19200 with a 4MHz osc.
This example works with a max232 PIC-PC interface. If you need direct, thenCode:DEFINE OSC 20 DEFINE DEBUG_REG PORTC DEFINE DEBUGIN_REG PORTC DEFINE DEBUGIN_BIT 7 DEFINE DEBUG_BIT 6 DEFINE DEBUG_MODE 0 '1 = Inverted, 0 = true DEFINE DEBUGIN_MODE 0 DEFINE DEBUG_BAUD 19200 X VAR BYTE[3] MAIN: DEBUGIN 6000,NoData,[WAIT("A"),str X\3] DEBUG "Received: ",str X\3,13,10 GOTO MAIN NoData: DEBUG "Nada",13,10 GOTO Main END
just change mode to inverted.
Last edited by Bruce; - 25th July 2010 at 22:39. Reason: baud rate change to 19200 max
Hi Bruce,
Just wonder how to use Serout2, Serin2 with 115200 baudrate.
From the formula :int(1000000/baudrate)-20,
if use 115200 i will have int(1000000/115200)-20 = -12
Please help.
kblim
If the baud rate calc doesn't work out to a positive number, then I'm pretty
sure the data rate you need isn't supported by the command.
Use this:
DEFINE HSER_SPBRG 21 'Configuración de velocidad de USART
DEFINE HSER_TXSTA 36 'a 115200 baudios.
Now you can use hserin and hserout at 115200 bauds
Yeah but in synchronous mode... and all that imply too![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks