PDA

View Full Version : Baud rate 115200 on PIC16F877A



csooi08
- 14th May 2012, 15:11
Dear all,
Good day!

can anyone tell me how to write the code with baud rate 115200 for PIC16F877A/PIC18F4620 using Picbasic Pro compiler (BASIC)?

i only know use SEROUT2 PORTC.6, 16468, ["Hello"] that send baud rate 9600 to PC. But SEROUT2 does not support baud rate 115200.

FYI.
Crystal => 20MHz (Used)
PIC => PIC16F877A / PIC18F4620
Compiler => PicBasic Pro compiler 2.60 version
IDE => Microcode studio

TQ and BR

mackrackit
- 14th May 2012, 19:10
A forum search returned these.

http://www.picbasic.co.uk/forum/showthread.php?t=8263&highlight=115200

http://www.picbasic.co.uk/forum/showthread.php?t=14580&highlight=115200

http://www.picbasic.co.uk/forum/showthread.php?t=5596&highlight=115200

http://www.picbasic.co.uk/forum/showthread.php?t=5892&p=34356#post34356

c_moore
- 14th May 2012, 23:37
Why not use Hserout and use the hardware serial port?

csooi08
- 15th May 2012, 14:55
Dear c_moore,

I am not familiar with this Hserout command. If we use this command, does it means only hardware serial port can send out 115200 baud rate? How about other port on the IC? can we assign it?

TQ and BR

csooi08
- 15th May 2012, 14:57
Dear mackrackit,
Thanks for the information.

BR

mackrackit
- 15th May 2012, 18:38
If I remember correctly the 16F877A only has one hardware serial port (one each TX-RX). There are some others with two.