LockedBAUD RATE

Post
Guest
Super Member
2005/10/01 01:09:59
I am using a 20MHz and i have 10MHz in spare. Can someone please tell me what baud rate i need to use in my UART code. The signal is Asynchronous and continous.

Thanks
Kruse
Super Member
RE: BAUD RATE 2005/10/01 05:01:06
You mean your not able to calculate the value to set the baud rate or you can't decide which baud rate to use ?

Will you be able to get the UART working at all ?

Begin doing something yourself, try and try and try again. When it fails post your attempts and clearly explain what you want.
magio
Super Member
RE: BAUD RATE 2005/10/01 08:48:08
ORIGINAL: Rush05

I am using a 20MHz and i have 10MHz in spare. Can someone please tell me what baud rate i need to use in my UART code. The signal is Asynchronous and continous.

Thanks


As Kruse said you should ask more in a more clear way what you want or need.

1) Do you mean wich value you have to LOAD to the SPBRG to have the same baud rate with two pics one at 10Mhz and another at 20Mhz?

2) Do you mean wich value you have to LOAD to the SPBRG to have the same baud rate when switching your oscillator from 20Mhz to 10Mhz? --> the answer is there's no such a number that can do this. If SPBRG has a fixed value in the software then the baud rate will depend on the XTAL frequency.
Guest
Super Member
RE: BAUD RATE 2005/10/01 20:30:54
I wish to know what SPBRG value i need to use in code with a 20MHz clock. According to the formula given in the data sheet if the signal is Asynchronous with a 20MHz clock then the SPBRG value is 64. I have tried this value and others but all i see on the LCD is few black dots, nothing significant.

Thanks
Kruse
Super Member
RE: BAUD RATE 2005/10/02 05:17:45
Baud rate - LCD? -what/how are the relation between these ?
Guest
Super Member
RE: BAUD RATE 2005/10/02 07:17:18
ORIGINAL: Rush05

I wish to know what SPBRG value i need to use in code with a 20MHz clock. According to the formula given in the data sheet if the signal is Asynchronous with a 20MHz clock then the SPBRG value is 64. I have tried this value and others but all i see on the LCD is few black dots, nothing significant.

Thanks


If you look at the datasheet you will see a table with all the values pre calculated for you. Im assuming you want 19200? did you set the BRGH bit to 1?

Thats it there aint much to it really.
Guest
Super Member
RE: BAUD RATE 2005/10/02 07:18:44
ORIGINAL: Kruse

Baud rate - LCD? -what/how are the relation between these ?


Hes probably using an LCD with serial interface.
Artic
Super Member
RE: BAUD RATE 2005/10/03 02:11:40
Hi,

Just to add onto what the others have been saying...

...Also, its not that hard to set up a spreadsheet to calculate the value for the baud rate generator for you.

From Rush05 description - you may have some issues with the data that is being sent to the LCD. I would suggest you check the LCD serial spec - as this type of LCD tends to use ASCII encoded data...and not binary data

Cheers

Artic