![]() The different options are principally differentiated by their accuracy, cost, and component count. Specific options will depend on what make and model of microcontroller you will be using, so we’ll discuss all the standard options here. There are usually a few different options to choose from when selecting a clock source for any particular microcontroller. The issue simplifies to what differences between the transmit and receive UART clocks can be tolerated. Taking the example of UART devices, we can see that the absolute clock rate is unimportant because the UART receiver synchronizes itself at the start of every frame. For example, the CAN bus protocol makes it very sensitive to clock skew to the extent that the use of any non-crystal based clock signal source may be problematic. However, for high-speed serial communications with long data streams, the required accuracy can become more precise. For short data streams, the accuracy requirements can be quite loose as the sampling clock resets every time a new data stream is received. It will also depend on the clock speed and the message format. The presence of noise can also increase the time required for the signal to stabilize. Long transmission lengths and cables with a high capacitive will increase the rise and fall times. This sampling period will depend on the type and length of the communications link. Each data bit will potentially have a rising edge and falling edge to its signal where the data’s value is indeterminate, leaving the period between the edges when the data is valid and can be sampled. The required accuracy will be dependent upon the window where the data has to be sampled. It then needs to maintain the correct clock speed for the data stream’s duration to sample the data bits at the correct times. This is because the receiver starts processing the incoming data stream when detecting the first edge on the signal line. However, these clocks do not need to be synchronized they just need to have sufficiently equal clock rates. With asynchronous communications, the transmitter and receiver are reliant on having the same clock speed for encoding and decoding data streams. Asynchronous Serial CommunicationsĪ critical application for the microcontroller clock signal will be to manage asynchronous communications where the clock signal determines when the incoming data stream is sampled once the start bit is received and the waveform of the outgoing data stream in terms of when transitions between each bit of data occur. The accuracy of the clock will determine the accuracy of the generated waveform. The clock’s speed will determine the maximum frequencies that can be generated for the analog signal. Waveform GenerationĪs for data sampling, the microcontroller clock signal will govern the conversion rate of any digital-to-analog operations. With a 1% constant offset of the clock source, your sample’s timestamp will be out by over 14 minutes every day. In that case, it doesn’t take long before a one percent error in the clock’s frequency (not uncommon with internal oscillators) removes any correlation between your sample’s timestamp and the time shown on your wall clock. Suppose you are recording a sample twice a second with a timestamp. The clock’s speed will determine the maximum rate at which the analog signal can be sampled the clock’s accuracy will determine the sampling rate’s accuracy. The microcontroller clock signal will govern the conversion rate of any analog-to-digital operations. ![]() Any significant error in clock speed will have unpredictable consequences for internal microcontroller operations. If the clock runs too fast, there may not be enough time to complete the required operations before the next set begins-the processor interfaces with a range of different component blocks, from dynamic memory to interface pins. If the clock runs too slow, the processing takes longer. The microcontroller’s central processor can be thought of as a synchronized chain of logic blocks that perform a specific function. Why the clock source matters Microcontroller processing Two considerations need to be taken into account: the clock’s speed, which determines how fast things happen, and the clock’s accuracy, which determines the consistency of the period between each clock tick and how the clock speed can change over time. ![]() But how important is the clock source? Does it matter how accurate it is? The short answer is that it depends… it depends on what the microcontroller is doing and its interfaces. The clock determines how fast the processor executes its instructions, so it is fundamental to performance. The processor, the bus, and peripherals all use the clock to synchronize their operations. Microcontrollers are reliant on their clock source. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |