Hi ya,
I must have missed something very obvious but...
I need to set the CS pin for the CAN component to work in the MIAC, the MIAC guide p.11 (MI3278) has CS on pin RD7.
But the port options in the components connections menu does not list port D.
What am I missing here?
I'm using FCV5.
Cheers all, J.
CAN component settings ( CS ) and MIAC
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: CAN component settings ( CS ) and MIAC
Hello,
If your target device is set to MIAC in the Flowcode project options window then Flowcode automatically overrides the CS connection from the connections window to pin D7.
If your target device is set to MIAC in the Flowcode project options window then Flowcode automatically overrides the CS connection from the connections window to pin D7.
Code: Select all
//Definitions for CS control lines
#define CAN_2_MX_CAN_CS_PIN 6
#define CAN_2_MX_CAN_CS_PORT portb
#define CAN_2_MX_CAN_CS_TRIS trisb
//hardcode if using the MIAC
#ifdef MX_MIAC
#undef CAN_2_MX_CAN_CS_PIN
#undef CAN_2_MX_CAN_CS_PORT
#undef CAN_2_MX_CAN_CS_TRIS
#define CAN_2_MX_CAN_CS_PIN 7
#define CAN_2_MX_CAN_CS_PORT portd
#define CAN_2_MX_CAN_CS_TRIS trisd
#endif
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel