I'd like to help, but, I have absolutely no experience with CANbus.
I've looked over your code, and it seems you are doing the initializations over and over again in the MainLoop. Maybe you need to? I don't know. I feel the mainloop tag should ideally be at this line
; SAVE PORTD DATA: READ INPUTS ON PORT D AND STORE VALUES INTO MYDATABYTE0
Perhaps that could be the issue.
Another point is to calculate the baud rate by hand for your particular setup to be sure you got everything right. Once the hand calculation checks out with the Microchip tool, you could use the tool blindly; but, for now, you need to be sure. No point in guessing if it is right or wrong.
Hope this helps


 
		
		 
						
					 
			 
			 
			 
					
					 
 
		 
						
					

Bookmarks