PDA

View Full Version : PIC16F876 baud rate 7812.5, I can ????



AndreaIta
- 4th August 2005, 19:17
I have a big problem. How can I set the baud rate to 7812.5 (8N1) ????
I have try whit 9600 baud but don't work, there is a solution ???
Please help me, I am an italian boy. Thanks.

mister_e
- 4th August 2005, 20:06
By using the internal USART and HSEROUT...
@20 MHZ


DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 159 ' 7812.5 Bauds

@10mhz


DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h
DEFINE HSER_SPBRG 79 ' 7812.5 Bauds

and blah blah blah for other speed.

I did a simple calc software for that few months ago.
Download here (http://www.picbasic.co.uk/forum/attachment.php?attachmentid=316)

yettie
- 5th August 2005, 05:46
AndreaIta,

mister e was right. utilize the hardware USART. only i wonder where will you use a 7812.5 bps baud? may i know? im just curious. Thank.

regards,
yettie

AndreaIta
- 6th August 2005, 00:59
All right.
I must interface my car (Fiat Coupè) whit a stand-alone tester, that I have made.
I have just written all the code, and i must try it.
The function is: Read all engine et electric parameter, and Remove Error .
:)