基于dsPIC33FJ128MC506的CAN通信(07-100)
——
寫標(biāo)準(zhǔn)報(bào)文函數(shù)
本文引用地址:http://www.ex-cimer.com/article/92042.htmvoid ecan1WriteMessage(unsigned int ID,unsigned int Length,unsigned int *Data)
{
ecan1WriteTxMsgBufId(0,ID,0,0);
ecan1WriteTxMsgBufData(0,Length,*Data,*(Data+1),*(Data+2),*(Data+3));
C1TR01CONbits.TXREQ0=1;
}
CAN通信示例程序
用于檢驗(yàn)ECAN1的發(fā)射接收,其功能是收到CANoe發(fā)送COMMAND_BSI后,開(kāi)始發(fā)送數(shù)據(jù)。
評(píng)論