Designing a UART Counter for Receiver Unit

In summary, the conversation discusses the need to design a counter for a receiver unit in a UART problem. The system clock is 20 MHz and the data arrival frequency is 2 MHz. A STOP_RECEIVING signal must be asserted once all data is received and there is a start bit and stop bit for each data. The data arrives asynchronously but is synchronized using 2 FFs. The idea is to use a state machine and a synchronous counter block to count the clock cycles and the received bits. The conversation ends with a request for guidance on implementing the high-level part of the solution.
  • #1
EvLer
458
0
This is a UART problem, we need to design a counter for the receiver unit. And the specs go like this:
system clock is 20 MHz, while data arival frequency is 2MHz, also I need to assert a STOP_RECEIVING signal once all data is received. And of course, data has a start bit and a stop bit. And assume that there is a signal saying start bit detected. Also after a bit is received, I need to assert a strobe signal, i.e. for each bit. Data arrives asynchronously but is synchronized using 2 FFs.

So, here's my thinking thread:
it will take 10 system clock cycles to get through the start bit and 5 cycles to sample the first bit. After that i need to count only 10 cycles to sample the following bit, and I need to count the bits received.
I think i get the idea... BUT i run into problems with implemeting it... i can count the clock cycles ... state machine basically... then i reset the counter... but how would I count the bits? An embedded state machine sounds too much...
if someone could walk me through the high-level part of this, i would really appreciate it...
 
Physics news on Phys.org
  • #2
You can embed a synchronous counter block in your circuit. Check out the description of synchronous counters in your textbook, or at wikipedia:

http://en.wikipedia.org/wiki/Counter
 
  • #3


I would approach this problem by breaking it down into smaller, more manageable parts. First, I would focus on designing a counter that can accurately count the system clock cycles and generate a strobe signal for each bit received. This can be achieved by using a simple state machine that resets the counter after each bit is received and generates a strobe signal every 10 cycles.

Next, I would focus on detecting the start bit and synchronizing the data using 2 FFs. This can be done by using a shift register to store the incoming data and comparing it to a known start bit pattern. Once the start bit is detected, the shift register can be reset and the data can be synchronized using the 2 FFs.

Finally, I would focus on counting the number of bits received and asserting the STOP_RECEIVING signal once all data is received. This can be done by using a separate counter that increments with each bit received and comparing it to the expected number of bits. Once the counter reaches the expected number, the STOP_RECEIVING signal can be asserted.

Overall, it is important to approach this problem systematically and break it down into smaller, more manageable tasks. By focusing on one aspect at a time, it will be easier to design and implement a successful UART counter for the receiver unit. Additionally, seeking guidance from experts or colleagues in the field can also be helpful in finding a suitable solution.
 

1. What is a UART Counter and why is it important for a Receiver Unit?

A UART (Universal Asynchronous Receiver/Transmitter) Counter is a hardware component that counts the number of bytes received by a UART Receiver Unit. It is important because it allows the receiver to accurately keep track of the data being transmitted and ensures that there are no errors or lost data.

2. How is a UART Counter designed?

A UART Counter is typically designed using a combination of logic gates, counters, and registers. The design process involves determining the desired counting rate, selecting appropriate components, and designing the necessary logic circuits to count the data bits received by the receiver.

3. What factors should be considered when designing a UART Counter?

Some important factors to consider when designing a UART Counter for a Receiver Unit include the desired counting rate, the number of data bits to be counted, the baud rate of the communication, and the accuracy and reliability requirements of the system.

4. Are there any common challenges when designing a UART Counter?

Yes, there are some common challenges that may arise when designing a UART Counter. These can include issues with synchronization, error correction, and data overflow. It is important to carefully consider these challenges and design the counter accordingly to ensure accurate and reliable data counting.

5. Can a UART Counter be used for other applications besides a Receiver Unit?

Yes, a UART Counter can be used for other applications such as data logging, frequency measurement, and signal analysis. However, the design may need to be modified to suit the specific requirements of the application.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Replies
9
Views
1K
  • Electrical Engineering
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
25
Views
11K
  • Engineering and Comp Sci Homework Help
Replies
19
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
3K
  • Sticky
  • Programming and Computer Science
Replies
13
Views
4K
Back
Top