Searching \ for '[PIC:] Networking an 18f258 via CAN' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=18F
Search entire site for: 'Networking an 18f258 via CAN'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Networking an 18f258 via CAN'
2004\02\25@123413 by Robert James Kaes

flavicon
face
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

--
   Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
                http://www.flarenet.com/consulting/
     * Putting the Service Back in Internet Service Provider *

--
http://www.piclist.com hint: To leave the PICList
spam_OUTpiclist-unsubscribe-requestTakeThisOuTspammitvma.mit.edu

2004\02\26@070116 by Ovidio Vazquez Jara

flavicon
face
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 removed}

2004\02\27@210416 by Robert James Kaes

flavicon
face
On Thu, 26 Feb 2004, Ovidio Vazquez Jara wrote:
> 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 !.

Thank you.  It was the ENDRHI bit in the CIOCON than was the problem.
I needed to set it.  Thanks again.
       -- Robert

--
   Robert James Kaes    ---  Flarenet Inc.  ---    (519) 426-3782
                http://www.flarenet.com/consulting/
     * Putting the Service Back in Internet Service Provider *

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...