完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
嗨,我用DSPIC33FJ128GP802做了一些合成器。这个论坛有人告诉我我用的是桶形移位器,一个指令是16位移位。我读过桶形移位器可以处理40位的值,我怎么能访问40位的值?现在我使用一个暂时的无符号长来把最有意义的值换算进去,然后执行两次乘法。也许用40位值可以乘32位值,然后再换回去?提前感谢
以上来自于百度翻译 以下为原文 Hi, i,m using the DSPIC33FJ128GP802 to make some synthesizers. Some one in this forum told me i was using the barrel shifter, 16 bit shift in 1 instruction. I readed the barrel shifter can handle a 40 bits value, how can i access a 40 bit value ? Now i am using a temporary unsigned long to shift the most significant into, and perform the multiply twice. Maybe with a 40 bit value i could multiply a 32 bit value, and shift back again ? Thanks in advance |
|
相关推荐
5个回答
|
|
|
嗨,谢谢你的回复,我可以用一些SORT40位值乘法和换档吗?然后,我找出我到底得到了什么。无符号long已经处于它的极限,我喜欢将500000000乘以32768,所以我需要一个40位的值。
以上来自于百度翻译 以下为原文 Hi, thanks for the reply, can i use some sort 40 bit value for multiplying and shifting ? Then i find out what i gain or not. The unsigned long is already on it limits, i like to multiply number 500000000 by 32768, so i need a 40 bit value. |
|
|
|
|
|
DSPIC有2个40位累加器(内存映射),带有附加子- NEG -移位+/- 1…16位所有指令。参见编程手册DS70157,
以上来自于百度翻译 以下为原文 DSPIC has 2 40 bit accumulators (memory mapped) with ADD - SUB - NEG - SHIFT +/- 1..16 bits all one instruction. See programming manual DS70157, |
|
|
|
|
|
乘以32768等于从右增加一个零字,然后向右移位1。使用普通寄存器要容易得多。累加器不会帮助你。
以上来自于百度翻译 以下为原文 Multiplying by 32768 is the same as adding a zero word from the right, then shifting to the right by 1. It's much easier to do with regular registers. Accumulators won't help you with this. |
|
|
|
|
|
|
|
|
|
|
|
对不起,我的错,我需要更多的40位。我只是尝试优化。
以上来自于百度翻译 以下为原文 Sorry, my fault, i need more then 40 bit i see. Just trying to optimize. |
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
508 浏览 0 评论
5813 浏览 9 评论
2351 浏览 8 评论
2238 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3545 浏览 3 评论
1163浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1122浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
890浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
508浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-15 12:38 , Processed in 0.708997 second(s), Total 53, Slave 44 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
6817