CAN

CAN

I did a little testing to verify the capture and CAN transmit times on this 40MHz dsPIC. Time for capturing all 8 analog channels is about 58us, and time for transmitting that data over a 1mbit CAN bus is about 130us.

I had no problem setting that capture and transmission rate to 1000hz (1ms), since I am under 20% interrupt time load.

For most uses cases I will be capturing at 1000hz, but using an FIR filter to decimate down to 100hz (or less), and then output over CAN at 100hz. It is pretty easy to make multiple FIR filters for different decimation rates per channel.

When I switch over to the QFP44 version of this controller I will certainly be able to capture all 13 analog inputs and send them over CAN.

Not bad for a microcontroller that is $3.

Comments are closed.