Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Maximum speed of hardware UART

Status
Not open for further replies.

kraiders

Newbie level 2
Joined
Mar 11, 2005
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,298
uart speed

I am using PIC16f876. May I know what is the maximum transfer rate of the hardware UART? I am currently using 115kbps, by writing this line:

set_uart_speed(115200)

1) What is the maximum hardware UART speed that I can use?

2) I check the PIC16f876 datasheet and found out that it supports synchronous mode and asynchronous mode. How should I know which mode am I using? The asynchronous mode supports up to 325000 kbps. What is the maximum synchronous speed?

3) Since the maximum of set_uart_speed is 115200, how should I achieve higher speed that 115200? What command line should I write?
 

uart max speed

you should mention your CPU clock (crystal)


Mik
 

hardware uart

This depends on your clock speed and whether you want synchronous or asynchronous mode

This depends on your hardware interface. In asynchronous mode the transmitter provides the clock signal to the receiver through an additional wire. Because of the extra costs for this extra wire you won't see this kind of communications very often.
 

    kraiders

    Points: 2
    Helpful Answer Positive Rating
pic uart speed

You didn't study the datasheet well enough. Table 10-1 on page 97 gives you the formula for calculating bit rates.
With BRGH set to 1 and running at 20MHz the maximum baudrate = 1250kbaud = 1.250Mbaud. This is also shown in table 10-4 on page 98.

Please be aware that the baudrate generator has some limitations. The baudrate is generated by dividing the clock frequency by a user selectable 8-bits value. When using a clock frequency like 16MHz there is no 8 bit dividing value that will give you an exact baudrate value, only a value that comes close. You are allowed a total baudrate error of 4% for sender and transmitter together. This is the reason you can buy crystals with the odd frequencies like 18.4320MHz because they will give you a 0% baudrate error.

For example running at 20MHz you can't run at 115kbaud because the error margin would be to large. Higher baudrates up to 1250kbaud are possible when choosing outside the range of the default baudrates, make sure to check the receiving device to be capable of handling these odd baudrates

Added after 38 minutes:

I hope you understant it...

Added after 5 minutes:

Ofcourse if you use CCS c compiler you can define soft. and hardware serial comunications.
For a hardware UART it should be the same as the maximum speed the PIC can support.
FOr a software UART I'm not sure, a bit tricky to answer.

Added after 21 seconds:

Ofcourse if you use CCS c compiler you can define soft. and hardware serial comunications.
For a hardware UART it should be the same as the maximum speed the PIC can support.
FOr a software UART I'm not sure, a bit tricky to answer.
 

    kraiders

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top