I've used 18F458 and 18F258 in a recent project. I remember the CAN module being a bit tricky to use and initialize. Also, the datasheet wasn't very clear to me. I didn't use the AN853 library, but be careful: it may have bugs (AN738 had). Check carefully for initialization registers (TRISC, bit timing regs, etc). I bet you didn't initilize CIOCON !. The RS pin in the MCP2551 should be tied to VSS at high speeds. Do you know if the message is sent over the CAN bus? Here a CAN monitor helps a lot... Ovidio Vazquez Jara ----- Original Message ----- From: "Robert James Kaes" To: Sent: Wednesday, February 25, 2004 6:32 PM Subject: [PIC:] Networking an 18f258 via CAN > Hello, > I am trying to network two 18f258 chips together using the CAN > protocol. I have each 18f258 connected to a MCP2551 CAN transceiver. > The code currently has the master receive a byte via RS232 from a > computer and then transmit the byte down the CAN to the slave. The > slave should then increment the value of the byte and send it back to > the master, where it will then be echoed back the computer through the > RS232. When I test the master code in CAN loop-back mode, it works > perfectly. However, when I configure the master for CAN normal mode, > the slave never receives the packet from the master. I have the two > units connected with a 4 wire cable for CANH, CANL, and 24VDC power. > Each unit is terminated by a 120 ohm resistor. > > Does any one have any experience with network PICs using the CAN > protocol? I'm using the 18fxx8 CAN Driver library (AN853) from > Microchip for the coding. > > If you need me to post code, please let me know. Thank you for any > help you can provide. > -- Robert > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads