完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我们使用IQ16进行计算,但是我们需要8位输出。所以,我们正在改变比特,但是我们正在丢失LSB部分。是否可以将16位数据转换为8位数据而不丢失位。
以上来自于百度翻译 以下为原文 We are using IQ16 for calculations but we want 8 bit output. so,we are shifting the bits but we are loosing LSB part. is it possible to convert 16 bit data to 8 bit data without loosing bits. |
|
相关推荐
19个回答
|
|
|
2升苏打水在1升瓶装瓶中不会损失吗?如果数据的重要部分超过255(十进制)的值,则它不能包含在一个8位的值中。当然,两个8位值可以保存一个16位的数据值。
以上来自于百度翻译 以下为原文 Is it possible to put 2 liters of soda in a 1 liter bottle without losing any of it? No. If the significant portion of the data exceeds a value of 255 (decimal) then it cannot be contained in a SINGLE 8 bit value. Certainly TWO 8 bit values can hold a 16 bit data value. |
|
|
|
|
|
你说的“8位输出”究竟是什么意思?把16位插入8位是一个很傻的问题,所以这里一定有一些误解。请更详细地解释你的实际需求。
以上来自于百度翻译 以下为原文 What exactly do you mean by "8 bit output" ? Fitting 16 bits into 8 bits is a silly question, so there must be some misunderstanding here. Please explain your actual requirement in more detail. |
|
|
|
|
|
我们在PI控制系统上工作,并以IQ16格式进行计算。我们有一个8位数据的DAC。最后的输出PI是16位,我们要么发送MSB,但在稳定状态下,我们得到振荡,因为我们只发送MSB。你能提出解决这个问题的方法吗????
以上来自于百度翻译 以下为原文 We are working on PI Control System and doing the calculations in IQ16 Format . We have a DAC of 8 bit data . The final output PI is of 16 bits and we are either sending the MSB but at steady state we are getting oscillations as we are sending only MSB. Can you suggest any solution to solve this issue ??? |
|
|
|
|
|
过采样输出添加位-4x过采样可以在正确的数学中增加2位。
以上来自于百度翻译 以下为原文 oversample the output to add bits - 4x oversampling could add 2 bits with the right math |
|
|
|
|
|
我使用的是DSPIC33 EP512MU810处理器,ADC是12位的。如果我们想做乘法或除法,如果我们使用IQ,控制器所花费的时间就更少了。在Microchip中,我只能看到IQ16或IQ15。在IQ15库中,我也找不到乘法函数。所以我用IQ16乘以我的ADC值和16。所以我的最大值是65535。我正在执行IQ16格式的计算,最后我把我的MSB 8位发送到DAC输出。有人能提出有效的计算方法吗?
以上来自于百度翻译 以下为原文 I am using dsPIC33EP512MU810 Processor .The ADC is of 12 bit . If we want to do multiplications or divisions if we use IQ the time taken by the controller is less. In microchip I am able to see only IQ16 or IQ15 . In IQ15 Library I am not able to find the multiplication function also . So I am using IQ16 by multiplying my ADC values with 16. So my maximum values are 65535 . I am performing the calculations in IQ16 Format Finally I am sending the my MSB 8 bits to DAC ouput . Can anyone suggest any effective method to do the calculations? |
|
|
|
|
|
通过从A/D获取12位数据,并最终将计算结果发送到8位DAC,有效地将输入数据除以16。如果你的输入数据的重要部分被除法丢失,那么你需要增加你的DAC的分辨率或者增加你的系统的增益。
以上来自于百度翻译 以下为原文 By taking 12 bit data from your A/D and ultimately sending a calculated result to an 8 bit DAC you are effectively dividing your input data by 16. If the significant portion of your input data is lost by the division then you will need to increase the resolution of your DAC or increase the gain of your system. |
|
|
|
|
|
我看不出这将如何提高输出DAC的分辨率,也许有人可以解释它(在输入上得到的过采样,但这里不是问题)。
以上来自于百度翻译 以下为原文 I fail to see how this is going to increase the resolution of the output DAC, maybe someone can explain it (oversampling on input I get but that is not the question here). |
|
|
|
|
|
最近有一个线程(另一个,我的意思)。输入的噪声有助于获得“略有不同”的样本,这构成了一个或多个分辨率位…
以上来自于百度翻译 以下为原文 There was a recent thread (another one, I mean |
|
|
|
|
|
是的,但是这是用来增加输入样本的表观分辨率,它不会允许12/16位数据被发送到8位DAC而没有分辨率的损失(我相信是原来的问题)。如果DAC使用非线性传递函数,则较高分辨率的数据可以被压缩(转换为这个非线性函数),然后发送到8位DAC,但是这会导致DAC输出的不相等的步长(这仍然是分辨率的损失,但可能是一个常数)。酶在范围内)。
以上来自于百度翻译 以下为原文 Yes however this is used to increase the apparent resolution at the input samples, it will not allow 12/16 bit data to be sent to an 8 bit DAC without a loss in resolution (that I believe was the original question). If the DAC uses a non-linear transfer function the the higher resolution data could be "compressed" (converted to this non-linear function) and then sent to the 8 bit DAC however this results in an un-equal step size at the output of the DAC (which is still a loss of resolution but a possible increase in range). |
|
|
|
|
|
2升苏打水在1升瓶装瓶中不会损失吗?+ 1
以上来自于百度翻译 以下为原文 Is it possible to put 2 liters of soda in a 1 liter bottle without losing any of it? +1 |
|
|
|
|
|
哦,对不起,这是一个DAC而不是ADC丢弃我的回复!在这种情况下,我曾经认为这有助于消除输出中的“噪声”,即在解决DAC时总是会有一些噪声,如果您发送样本@ 192kHz而不是44(可以很快地),那么您就可以去除这些噪音。
以上来自于百度翻译 以下为原文 Oh sorry, this was a DAC not an ADC In this case, I used to think that this helps removing the "noise" from the output - i.e. you will always have some noise when settling the DAC, and you can remove that easier if you send samples @192KHz rather than 44 (to put it quickly) |
|
|
|
|
|
从8位和8位DAC中获得更多的8位的唯一方法是抖动输出并对其进行滤波。一个带有低频信号的高速DAC使这更容易。但是,现在又很容易找到(现在是二十一世纪)的12位DAC。
以上来自于百度翻译 以下为原文 The only way to get more then 8 bits from and 8 bit DAC would be to dither the output and filter it. a High speed DAC with a low frequency signal makes this easier. But then again 12 bit DACs are easy to find now ( it is the 21st Century). |
|
|
|
|
|
我们的测试烤箱PID控制器在这里有很好的温度控制,虽然它的加热器输出是ON或OFF -所以一个比特(它可能会脉冲上下)给予更多的“模拟”控制。当然取决于你的控制,但是8位的控制输出应该足够很多瘦的。GS?这可能是调整PID参数的问题吗?DOM。
以上来自于百度翻译 以下为原文 Our test oven PID controller here has excellent temperature control, although its heater output is either on or off - so one bit (It probably pulses that on and off to give more 'analogue' control). Depends what you're controlling of course but a 8 bit control output ought to be enough for many things? Could it be a matter of tuning your PID parameters? dom. |
|
|
|
|
|
从DAC中获得更高的比特分辨率一直在进行。这就是CD播放机中的“1位”DAC的工作原理。PWM DAC是一个简单的例子-我使用16Pbit PWM在PIC16LF179上作为16位DAC,通过滤波1bit输出的Sun-Outin。同样的用8位DAC来做。如果需要输出89.5,则将采样率加倍,然后交替输出89,然后输出90。现在它是一个9位的DAC。显然,需要去除滤波以去除量化噪声,并且在OP的情况下,采样率需要足够高,使得输出滤波器不会明显地影响PI滤波器响应。所以,为了得到1位的改进,你需要4x的采样率,2bit=& gt;8x或一些东西。但是我同意,仅仅用一个更好的部分替换DAC似乎是最好的,除非硬件不能因为某种原因而改变。
以上来自于百度翻译 以下为原文 Getting higher bit resolution out of DACs is done all the time. That's how "1-bit" dacs in CD players work. A PWM dac is a simple example - I used the 16bit PWM on a PIC16LF1769 as a 16bit DAC by filtering the snot out of the 1bit output. Do the same with an 8 bit DAC. If you need to output 89.5, double the sample rate and output alternately 89 then 90. Now it's a 9 bit DAC. Obviously filtering is needed to remove the quantization noise, and in the OP's case the sample rate needs to be high enough that the output filter doesn't appreciably affect the PI filter response. So maybe to get 1 bit improvement you need 4x the sample rate, 2bit => 8x or something. I would agree, however, that just replacing the DAC with a better part would seem best unless the hardware just can't be changed for some reason. |
|
|
|
|
|
同意MrBuff宁。使用过采样数字滤波器和增加输出采样率,然后在DAC输出上模拟滤波器将增加DAC分辨率。然而,10位或12位DAC可能是更便宜的解决方案。
以上来自于百度翻译 以下为原文 Agree with mbrowning. Using an oversampling digital filter and increasing the output sample rate, followed by an analogue filter on the DAC output will increase the DAC resolution. However a 10 or 12bit DAC would probably be cheaper solution. |
|
|
|
|
|
这完全取决于什么是受控的。加热器是最好的情况和容易的。如果做错了,马达可能会非常不高兴。
以上来自于百度翻译 以下为原文 This all depends on what is being controlled. A Heater is best case and easy. A Motor may be very unhappy if it is done wrong. |
|
|
|
|
|
好吧,对不起,我被过度采样这个术语误导了。我习惯于把它用于输入而不是输出(可能只是我的词汇量)。是的,抖动可以提高/增加DAC的输出分辨率(通过适当的滤波),但是您不会从8位DAC中获得16位分辨率(不在任何实际电路/采样率中),即使在8位DAC上OPS A/D的12位分辨率也难以实现。输出,比特转换的一致性将使结果在该分辨率中主要是噪声(无论如何,我猜想大多数8位DAC)。10位可能是12位,我不这么认为…
以上来自于百度翻译 以下为原文 OK, sorry, I was misdirected by the use of the term oversampling. I am accustomed to using that for inputs not outputs (probably just my vocabulary). Yes, dithering can improve/increase the output resolution of a DAC (with the proper filtering) however you are NOT going to get 16 bit resolution out of an 8 bit DAC (not in any practical circuit/sample rates), even the 12 bit resolution of the OPs A/D will be difficult to achieve at the 8 bit DAC output, the consistency of the bit transitions will render the result mostly noise at that resolution (my guess anyway on most 8 bit DACs). 10 bits maybe 12 bits I don't think so.... |
|
|
|
|
|
此外,在某个方向(后×4),有一个评论,只有使用MSB仍然引起振荡从一个稳定的状态。这意味着所有较小的显著是噪声,因为MSB的最低比特是“噪声”。添加更多的比特不会解决这个问题。苏珊
以上来自于百度翻译 以下为原文 Also, somewhere way back (Post #4) there was a comment that only using the MSB was still causing oscillations from a steady state. That would mean that all of the lesser significant are noise as the lowest bit of the MSB is 'noise'. Adding more bits is not going to solve that. Susan |
|
|
|
|
|
除非不稳定是由于系统无法解决由于大步长。
以上来自于百度翻译 以下为原文 Unless the instability was caused by the systems inability to settle due to the large step size. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1123浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
873浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
475浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 01:51 , Processed in 1.203687 second(s), Total 108, Slave 91 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
5510