Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trying to write module that accepts serial data

Status
Not open for further replies.

ginger7

Programmer
Feb 6, 2006
1
CA
Hi,

I'm new to VHDL and I have to write small module that takes in encoded serial data and decodes it and displays it on an LED HEX digit.

Basically, the module receives bits on two 1-bit input lines: D+ and D-. Every second, it receives a series of 4 bits on these lines. For these four bits, one bit stays on the line for 3.125 microsecs.

When the lines aren't sending anything, they're both zero.
For sending intial 1: D+ = 1, D- =0
For sending intial 0: D+ = 0, D- = 1
The rest of the three bits in a 4-bit sequence use the following encoding: the lines (D+, D-) toggle when the bit sent is 0, and stay at their current values if the bit sent is a 1.

The job of this module that I'm trying to write is to figure out the 4 bit sequence that is being sent by sampling the two input lines and then displaying the hex digit created by the 4 bits on an LED display. The module has a 40MHz clock.

I think I know how to do the LED display part, however, I am really lost about how to sample the lines and to take into account the encoding of the sender. A counter is supposed to be used to keep track of the samples of a particular bit since there may be jitter between the bits.

Any help would be really appreciated!



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top