Microchip
直播中

解欣

7年用户 231经验值
私信 关注
[问答]

PIC16F18313 CCP1不能与Timer0一起工作

嗨,我试图在PIC16F18313中使用带有TMR0的CCP1,但是我不能写到CCPTMRS寄存器。我需要TMR0,因为它有更宽的预分频器,所以我不必关心定时器溢出。我可以用PICkit3调试它,但是写到CCPTMRS不会产生寄存器值变化。根据datasheet CCPTMRS的缺省值应该是0x05(CCP1和CP2与TMR1),但它读取为0x00,不能改变。CCP1模块工作,但只与TMR1。有什么想法?有人能测试PIC16F18313上的IFCCPTMRS是否可以改变,如果CCP1用TMR0工作良好?谢谢

以上来自于百度翻译


      以下为原文

    Hi,
i'm trying to use CCP1 with TMR0 in a PIC16F18313, but i can't write to CCPTMRS register.
I need TMR0 since it has much wider prescaler so i don't have to take care about timer overflows.
I can debug it with PICkit3 but writes to CCPTMRS do not produce a register value change.
According to datasheet CCPTMRS default value should be 0x05 (CCP1 and CCP2 with TMR1) but it reads as 0x00 and can't be changed.
CCP1 module works but only with TMR1.
Any ideas? Someone can test if CCPTMRS on PIC16F18313 can be changed and if CCP1 works fine with TMR0?
Thanks

回帖(2)

王焕树

2019-6-14 10:12:33
我怀疑整个CCPTMRS寄存器是来自另一个数据表的复制和粘贴错误。在数据表中的任何地方,似乎都没有提到将TMR0与CCP一起使用的能力,它只是说TMR1。这将是一个相当重要的特性,因为需要对16个信号进行多路复用以在它们之间切换。计时器。我建议用Microchip寄一张支持票来澄清这一点。编辑:我刚才发现这在“28.1捕获模式”的文本中提到了,即使它没有显示在紧接下面的框图中。绝对值得举起一张支持票。

以上来自于百度翻译


      以下为原文

    I suspect that whole CCPTMRS register is a copy & paste error from another datasheet.
The ability to use TMR0 with the CCP doesn't appear to be mentioned anywhere else in the datasheet, it just says TMR1.
This would be a fairly major feature, as 16 signals need to be multiplexed to switch between timers.
 
I would suggest lodging a support ticket with Microchip to clarify this.
 
Edit: I just spotted that this is mentioned in the text under "28.1 Capture Mode", even though it's not show on the block diagram immediately below this.
Definitely worth raising a support ticket.
举报

李林

2019-6-14 10:19:25
嗨,选票,不幸的是,这是一个错误的数据表。CCTPMRS寄存器不应该被列出用于这组设备(18313/18323)。我们正在完成一个更新的数据表,其中包含了这一修正,它应该在下周末之前出来。如果使用TMR0模块对于你的项目来说是必要的,你可以考虑这个设备家族中的其他设备,比如16F18324,它使用TMR0和TMR1。TMR3和TMR5用于比较或捕获功能。我对给您造成的不便表示歉意。克里斯

以上来自于百度翻译


      以下为原文

    Hi Ballot,
 
Unfortunately this is an error in the data sheet. The CCPTMRS register should not be listed for this set of devices (18313/18323). We are finalizing an updated data sheet that will include this correction, and it should be out by the end of next week.
 
If utilizing the TMR0 module is necessary for your project, you may consider other devices within this device family, such as the 16F18324, which makes use of TMR0 as well as TMR1, TMR3, and TMR5 for compare or capture functions.
 
I apologize for any inconvenience this has caused you.
 
Chris
举报

更多回帖

发帖
×
20
完善资料,
赚取积分