1_00b:接收缓冲器
在三个接收缓冲器中,MAB的作用总是接收来自总线的下一条信息。其余两个接收缓冲器称为RXB0和RXB1,可以接收买足协议的完整信息。当一个缓冲器用于信息接收或保持已接收的前一个信息时,MCU可以访问另一个缓冲器。
MAB接收所有的信息。仅当接收过滤器条件满足时,这些信息才传到RXBn缓冲器。
[注]:一旦信息被接收,MAB中的全部内容将被移入接收缓冲器。意思是不管标识符是什么类型(标准或扩展),或者是多少字节的数据被接收,整个接收缓冲器都将被MAB中的内容覆盖。因此,当信息被接收时,缓冲器中所有寄存器的内容已经被修改。
当信息移入其中一个接收缓冲器时,相应的RXBnIF位置1。为了使缓冲器能接收新信息,当缓冲器的信息处理完后,RXBnIF 位必须用软件清0。此位提供完成信息以确保PIC18FXX8系列在装载新的信息进入接收缓冲器之前,MCU已经完成了先前的信息接收。若RXBnIE位置1,则产生一个接收中断。
*********************************************************************
Of the three receive buffers, the MAB is always committed to receiving the next message from the bus. The remaining two receive buffers are called RXB0 and RXB1 and can receive a complete message from the protocol engine. The MCU can access one buffer while the other buffer is available for message reception, or holding a previously received message.
The MAB assembles all messages received. These messages will be transferred to the RXBn buffers, only if the acceptance filter criteria are met.
Note: The entire contents of the MAB are moved into the receive buffer once a message is
accepted. This means that, regardless of the type of identifier (standard or extended)
and the number of data bytes received, the entire receive buffer is overwritten with the
MAB contents. Therefore, the contents of all registers in the buffer must be assumed
to have been modified when any message is received.
When a message is moved into either of the receive buffers, the appropriate RXBnIF bit is set. This bit must be cleared by the MCU when it has completed processing the message in the buffer, in order to allow a new message to be received into the buffer. This bit provides a positive lockout to ensure that the MCU has finished with the message before the PIC18FXX8
attempts to load a new message into the receive buffer. If the RXBnIE bit is set, an interrupt will be generated to indicate that a valid message has been received.
文章评论(0条评论)
登录后参与讨论