完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我正在使用pic32mzef好奇板,我正在试着激活内置的ADC模块。在数据表中它写道:当ADC模块启用位,ON(ADCCON1<15>)被设置为“1”时,该模块处于活动模式……我能够在m下的“外设”中找到它所指的位。emory视图,但我不知道如何将位设置为“1”(当前为0)。一般来说,如何修改我所引用的位?谢谢,亚当
以上来自于百度翻译 以下为原文 Hi, I am using the pic32mzef curiosity board and I am trying to activation the built in adc module. In the datasheet it says: When the ADC module enable bit, ON (ADCCON1<15>), is set to ‘1’, the module is in Active mode... I am able to find the bit it is referring to in 'Peripherals' under memory views, but I do not know how to set the bit to '1' (it is currently on 0). Generally, how do you modify the bits I am referring to? Thanks, Adam |
|
相关推荐
2个回答
|
|
根据需要,它们应该在您的代码中,然后单击生成源代码按钮。
以上来自于百度翻译 以下为原文 They Should Be in your Code Configure as needed then Clink the generate Source code button. |
|
|
|
嗨,控制ADC转换器的位不是配置位。相反,ADC是由SFR(特殊功能寄存器)控制的,ADCCON1就是其中之一,ON位在位15中。所有SFR寄存器和这些寄存器中所有字段的符号名称的定义。在
以上来自于百度翻译 以下为原文 Hi, The bits controlling the ADC converter isn't configuration bits. Instead the ADC is controlled by SFR (Special Function Registers), and ADCCON1 is one of these, with the ON bit in bit 15. In the file there are definitions of symbolic names for all SFR registers and all fields in these registers. Names defined in There is a struct with bit and bitfield names for every SFR register, and also symbols defining MASK and POSITION for every named field in all documented registers. The SFR field structures all have the same form: REGISTERbits.FIELD For the ADC ON bit you may do like this: ADCCON1bits.ON = 1; /* Enable the ADC module. */ When initializing a peripheral module, it is usually a good habit to set other control registers and fields before enabling the module by setting the ON bit. When a Reset is performed, the ON bit for all peripheral modules is cleared. What happens to other registers and fields may vary, it is all documented in the datasheet. In the REGISTER documentation tables, there is a field with codes above every FIELD name. In the table: REGISTER 28-1: ADC CONTROL REGISTER 1 above ON there is code: R/W-0 explaination is in the Legend below the table. Configuration registers is something else. Configuration registers are stored in Flash read-only memory, and can only be changed when the the chip is programmed. They are used during Reset to change default values in some SFR registers. Configuration registers are described in datasheet chapter 34. Regards, Mysil |
|
|
|
只有小组成员才能发言,加入小组>>
5250 浏览 9 评论
2037 浏览 8 评论
1958 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3218 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2266 浏览 5 评论
789浏览 1评论
681浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
610浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
685浏览 0评论
582浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-29 09:32 , Processed in 1.118687 second(s), Total 78, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号