14 bit adc output to 5 bit data conversion in VHDL

Status
Not open for further replies.

prem ranjan

Newbie
Joined
Jul 3, 2013
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,331
I am having 14 bit ADC data which is in 2's complement format.
I require to convert in 5 bit format using vhdl language. What is the easiest way of doing it apart from using if then else statements comparing magnitude?
Consider the input data to be in two cases unsigned and signed.
 

Hi,

Maybe I misunderstand..

But if you want to generate 5 (linear. Not logarithmic like u-law, A-law) bits from a 14 bit ADC ... then just use the 5 upper bits and ignore the 9 lower significant bits.

Klaus
 

But if you want to generate 5 (linear. Not logarithmic like u-law, A-law) bits from a 14 bit ADC ... then just use the 5 upper bits and ignore the 9 lower significant bits.
May be the question is that trivial, may be some specific coding is intended. The OP missed to ask a clear question.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…