I had perfectly working ethernet connection and perfectly working CAN connection but not at the same time.
The culprit was clock connection from enc28j60-chip to 18f2685 clock input.
I don't understand why (or how) it does not work but if I use enc28j60 clock out to get clock to 18f2685, CAN does not work.
They both use 25MHz clock. I have not measured what is the clock frequency coming out from enc-chip but I suspect it to be something else than 25MHz that goes in.
Anyway... Now it works! I can send UDP packet from PC to ethernet transceiver where it is translated to CAN packet and forwarded to instrument control board which, in turn, sends back a CAN packet (to transceiver) and transceiver forwards it to PC.
In this picture you see the ethernet-can-transceiver and two instrument control boards talking to each other.

I again started believing I will have a working airspeed indicator this weekend.
I still need to activate the servo control part in instrument control software...
Stay tuned, I will go to sleep now.
1 comment:
Hi! I'm doing a similar project but with a different approach. I have running X-Plane > (IOCP (TCP-Based protocol) -> a homemade controller -> CANBUS -> All instruments and control in my cabin.
Check out the videos in my youtube channel: fsedano:
http://www.youtube.com/profile?user=fsedano
My email: fran@fransedano.net, let's be in touch so we can work together!
Post a Comment