完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嗨,我用的是28引脚SOIC PIC18F27 K40,但我不确定我的问题只是与这个芯片有关。如果我想在MCC或“自由运行周期”模式中使用“定时器翻转脉冲”控制模式的定时器(我认为它们都是相同的),并且我不希望外部重置因为时间RS是软件控制的,使用中断,我可以将TXRST寄存器设置为数据表中的“保留”设置之一,以使问题消失吗?在我的芯片上定时器是2, 4和6。如果TXRST寄存器设置为0x00,那么外部复位源由PPS设置。这不是我想要的。最近的一个解决方案来了我的方式,然后设置引脚的东西不存在于我的芯片上,但存在于最大的版本的家庭,端口D这是一个解决办法,将无法工作在更大版本的家庭44针TQFP!我问这个问题是因为我相信我需要升级到芯片的TQFP版本。我不想在我的计时器2, 4或6(我的ADC)上使用外部重置!!!)我该怎么做?谢谢,史提夫
以上来自于百度翻译 以下为原文 Hi, I'm using a 28-pin SOIC PIC18F27K40 but I'm not sure my question is just related to this chip. If I want to use a timer in 'roll over pulse' control mode on the MCC or 'free running period' mode in the datasheet (I think they are both the same) and I do not want an external reset because the timers are software controlled and use interrupts, can I set the TxRST register to one of those 'reserved' settings in the datasheet to make the issue go away? The timers are 2, 4 and 6 on my chip. If the TxRST register is set to 0x00 then the external reset source is set by PPS. This is not what I want. A recent solution came my way by then setting the pin to something that doesn't exist on my chip but exists on the largest version of the family, a Port D. This is a workaround that won't work on the larger version of the family the 44-pin TQFP !! I am asking the question because I believe I'll need to move up to the TQFP version of the chip. I do not want to use an external reset on my timers 2, 4 or 6 (and my ADC for that matter!!). How do I do this? Thanks, Steve |
|
相关推荐
4个回答
|
|
据我所知,如果TxMODE是0,定时器的行为就像一个“平原”计时器没有任何其他功能。你永远不应该使用“保留”值,除非数据表告诉你,它是允许的。
以上来自于百度翻译 以下为原文 As far as I can tell, if TxMODE is 0, the timer behaves like a "plain" timer without any of the other functionality. And you should never use a "reserved" value unless the data sheet tells you that it's allowed. |
|
|
|
您好,您尝试过:数据表表20-2:TXMODE=0;AKA::TXHLTBITS模式=0;是软件控制,没有硬件控制,既没有门控也没有复位。那么TxRST PIN映射无论如何都不重要。迈西尔
以上来自于百度翻译 以下为原文 Hi, Have you tried: Datasheet Table 20-2: TxMODE = 0; aka.: TxHLTbits.MODE = 0; is software control with no hardware control, neither Gating nor Reset. Then TxRST pin mapping should not matter anyway. Mysil |
|
|
|
@ Mysil。是的,我有TXCLK=0,TXHLT=0,TXRST=0。但是我也有一个T2InppsBist.t2IpPs= 0x1d;在PixMealth.c文件中,我已经从具有T2NPPPSITS的MCC代码中适应了。我的1D是端口D引脚5,它不存在于28引脚设备上。那么,您所说的是“滚过脉冲模式”和“HLT & lt;2:0& gt;0x00”覆盖了PPS设置。我还没有尝试过一个真正的PIN连接在T2PIPPPS设置…我猜我的问题有关那些“保留”设置。如果有一个重载就位,那么我的TQFP就可以了。我不需要计划一个外部PIN在那里。我在数据表中看到的不是很清楚——我想人们的经验是最好的。
以上来自于百度翻译 以下为原文 @Mysil. Yes I have TxCLK = 0, TxHLT = 0 and TxRST = 0. But I also have a T2INPPSbits.T2INPPS = 0x1D; in the pin_manager.c file that I've adapted from the MCC code which had T2INPPSbits.T2INPPS = 0x13; which is RC3 I believe. My 1D is Port D pin 5 which doesn't exist on a 28 pin device. What you're saying then is that the roll over pulse mode and HLT<2:0> of 0x00 'overrides' the PPS settings then ? I haven't tried it with a real pin connected in the T2pinPPS setting... I guess my question related to those 'reserved' settings. If there is an override in place then my move to a TQFP would be OK. I wouldn't need to plan for an external pin to be there. It isn't exactly clear in what I can see in the datasheet - the experiences of people is best I guess. |
|
|
|
只是复习表20-1。这是非常清楚的定时器设置和模式。
以上来自于百度翻译 以下为原文 Just review table 20-1. It's remarkably clear about timer settings and modes. |
|
|
|
只有小组成员才能发言,加入小组>>
5204 浏览 9 评论
2016 浏览 8 评论
1942 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3188 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2244 浏览 5 评论
755浏览 1评论
641浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
550浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
654浏览 0评论
554浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-5 11:56 , Processed in 1.491046 second(s), Total 105, Slave 89 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号