Respected Colleagues, I can not establish communication between two Keil MCB167 NET boards trough CAN bus using APNT 167 example code. As I see on my scope screen, everything seams to be OK, CAN bit length is the same when transmitting from both boards, levels are OK, etc. but nothing happens on RS-232. I have tried with and without terminating resistors on both boards but boards can not receive anything trough CAN bus from each other. Do I have to make some changes in CAN ID settings or so? Any hint? Thanks in advance. With best regards, Dragan Kujovic
You need to mirrow the CAN ID's on the different boards, so that they can receive messages. Also the initalization of the CAN controller depends on the CPU used. For example the C167CS requires the following code line:
#ifdef C167CS C1IR = 0; // required by C167CS to enable outputs #endif
Thanks for your kind answer. Yes, that was the problem. I have considered that few days ago. Problem is that in the APNT167 I didn't find a notice that CAN ID must be cross-overed. It is clear to me now, but if you are new in CAN it is little bit confusing. With best regards, Dragan Kujovic