Example: Using a dedicated baud rate generator

Example: Using a dedicated baud rate generator

As we noted in ‘Solution’, some 8051 microcontrollers have a timer dedicated to baud rate generation. This can be a useful facility, since it leaves us (usually) with three free timers for use in the scheduler, creation of delays and so on.

In this example, we present an ‘output only’ library for the Infineon C515c (list- ings 18.6 to 18.11). This uses the C515C baud rate generator. In the example, we display elapsed time on the screen of a PC or similar terminal.

There are two main points to note in this example:

● The library is considerably smaller and simpler than the ‘duplex’ library presented earlier.

● The microcontroller is running at 10 MHz; despite this, the internal baud rate gen- erator allows us to create a very accurate baud rate for the serial link. This is a very useful feature.

image

image

image

image

image

image

image

image

image

image

Leave a comment

Your email address will not be published. Required fields are marked *