Designing a UART Counter for Receiver Unit

AI Thread Summary
The discussion focuses on designing a UART counter for a receiver unit, specifying a system clock of 20 MHz and a data arrival frequency of 2 MHz. The design requires asserting a STOP_RECEIVING signal after data reception, which includes a start bit and a stop bit, with a signal indicating when the start bit is detected. The initial calculations suggest it takes 10 clock cycles for the start bit and 5 cycles for the first data bit, followed by 10 cycles for subsequent bits. The main challenge lies in implementing the bit counting mechanism within a state machine framework, with suggestions to use a synchronous counter block for this purpose. The conversation emphasizes the need for clarity in the high-level design to effectively manage the counting of bits received.
EvLer
Messages
454
Reaction score
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
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
 
Thread 'Have I solved this structural engineering equation correctly?'
Hi all, I have a structural engineering book from 1979. I am trying to follow it as best as I can. I have come to a formula that calculates the rotations in radians at the rigid joint that requires an iterative procedure. This equation comes in the form of: $$ x_i = \frac {Q_ih_i + Q_{i+1}h_{i+1}}{4K} + \frac {C}{K}x_{i-1} + \frac {C}{K}x_{i+1} $$ Where: ## Q ## is the horizontal storey shear ## h ## is the storey height ## K = (6G_i + C_i + C_{i+1}) ## ## G = \frac {I_g}{h} ## ## C...
Back
Top