1_00d:时间标记
CAN 模块可以编程为每一条接收到的信息生成一个时间标记。当使能时,模块用CCP1产生一个捕捉信号,该信号轮流捕捉定时器TMR1或TMR3的值。该值可以用作信息的时间标记。
要使用时间标记功能,必须将CANCAP(CIOCAN<4>)置1。这样就可以用CAN模块产生的信号取代CCP1捕捉的输入信号。另外,必须将 CCP1CON<3:0> 配置为0011,从而使能CCP特殊事件触发器捕捉CAN事件。
---------------------------------------------------------------------------------------------
The CAN module can be programmed to generate a time-stamp for every message that is received. When enabled, the module generates a capture signal for CCP1, which in turns captures the value of either Timer1 or Timer3. This value can be used as the message time-stamp.
To use the time-stamp capability, the CANCAP bit (CIOCAN<4>) must be set. This replaces the capture input for CCP1 with the signal generated from the CAN module. In addition, CCP1CON<3:0> must be set to‘0011’ to enable the CCP special event trigger for CAN
events.
文章评论(0条评论)
登录后参与讨论