• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: CAN system's problem with 3 nodes
#6
初級會員
初級會員


查看用戶資訊
Yes,before receiving,I used CANIsRxReady() to check the status,but why node3 is so special that receiving and sending is abnormality.I donnot know.

發表於: 2005/3/18 14:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: CAN system's problem with 3 nodes
#5
版主
版主


查看用戶資訊
if ( CANIsRxReady( ) )
{
CANReceiveMessage (&RX_ID1.Slave_ID1,RX_Data_Buf1,&RX_Data_Len1,&RX_Message_Flag) ;
:
:
}

Please add the CANIsRxReady( ) for checking the CAN receiver message polling.

發表於: 2005/3/18 13:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: CAN system's problem with 3 nodes
#4
初級會員
初級會員


查看用戶資訊
Anymore,neither node1 nor node2 can receive the message with ID 0X220 from node3,and node1 to node3 usually reset much times when start,then they can work for a little long time.why?

發表於: 2005/3/18 13:23
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: CAN system's problem with 3 nodes
#3
初級會員
初級會員


查看用戶資訊
No,node3 does nothing but waits to receive the message,I think busy is unreasonable .

發表於: 2005/3/18 13:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: CAN system's problem with 3 nodes
#2
資深會員
資深會員


查看用戶資訊
我猜你的 node3 太忙碌了,以致於來不及去收 buffer上的資料

發表於: 2005/3/18 11:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


CAN system's problem with 3 nodes
#1
初級會員
初級會員


查看用戶資訊
I developed a CAN system with 3 nodes(node1,node2,node3),using 18F458 and Philips PCA82C250,the Oscillator is 10M,the bus rate is about 80K,the node2 send out message with ID 0x218,I hope both the node1 and node3 can receive the message in time,however only the node1 does this,the node3 can only receive the message from time to time,the delay is so obvious.I set the 3 nodes’ message mask and filter as follows:

Node1:

………
CANSetOperationMode(CAN_OP_MODE_CONFIG) ;

CANSetMask(CAN_MASK_B1, 0x07ff, CAN_CONFIG_STD_MSG ) ; CANSetMask(CAN_MASK_B2, 0x07ff, CAN_CONFIG_STD_MSG ) ;

CANSetFilter(CAN_FILTER_B1_F1, 0x0220 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B1_F2, 0x0218 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F1, 0x0210 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F2, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F3, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F4, 0x0000 , CAN_CONFIG_STD_MSG) ;

CANSetOperationMode(CAN_OP_MODE_NORMAL) ;
………
While(1)
{
CANReceiveMessage(….);
}
……………………….

Node2:

………
CANSetOperationMode(CAN_OP_MODE_CONFIG) ;

CANSetMask(CAN_MASK_B1, 0x07ff, CAN_CONFIG_STD_MSG ) ; CANSetMask(CAN_MASK_B2, 0x07ff, CAN_CONFIG_STD_MSG ) ;

CANSetFilter(CAN_FILTER_B1_F1, 0x0018 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B1_F2, 0x0220 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F1, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F2, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F3, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F4, 0x0000 , CAN_CONFIG_STD_MSG) ;

CANSetOperationMode(CAN_OP_MODE_NORMAL) ;
………
While(1)
{
…………..
CANSendMessage( 0x218,TX_Data_Buf1,TX_Data_Len1,
CAN_TX_PRIORITY_0 &
CAN_TX_STD_FRAME &
CAN_TX_RTR_FRAME ) ;
…………..
}
……………………….

Node3:

………
CANSetOperationMode(CAN_OP_MODE_CONFIG) ;

CANSetMask(CAN_MASK_B1, 0x07ff, CAN_CONFIG_STD_MSG ) ; CANSetMask(CAN_MASK_B2, 0x07ff, CAN_CONFIG_STD_MSG ) ;

CANSetFilter(CAN_FILTER_B1_F1, 0x0218 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B1_F2, 0x0020 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F1, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F2, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F3, 0x0000 , CAN_CONFIG_STD_MSG) ;
CANSetFilter(CAN_FILTER_B2_F4, 0x0000 , CAN_CONFIG_STD_MSG) ;

CANSetOperationMode(CAN_OP_MODE_NORMAL) ;
………
While(1)
{
CANReceiveMessage(….);
}
……………………….


I donnot know where the problem is.

發表於: 2005/3/17 23:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------