CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

18F258 with 25050

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
victor moreno
Guest







18F258 with 25050
PostPosted: Mon Apr 14, 2003 6:35 am     Reply with quote

Dear PCM programmer,

When I try to send a message from PIC18F258 to MCP25050, so, when I load the transmit buffer (TXBnEIDH, TXBnEIDL, TXBnSIDH, TXBnSIDL, TXBnDLC and TXBnDm) and after I request for sending a message (TXBnCON |= 0x08), TEC counter arrives at 128 and TXBnCON passes to 0x18 (CAN Error Bus), CANSTAT passes to 0x02 (Error interrupt) and PIR3 passes to 0xA0 (Invalid message flag and CAN module error flag).



I tried to load the transmit buffer in both modes (Normal and Config) but nothing



I work with 50Kbps. SJW=1, Prop=1, PhSeg1=3, PhSeg2=3, Wake-up filter disabled, Sample point 1x



My 25050 node is configured in Normal mode (OPTREG1.CMREQ=0), Receive Overflow (OPTREG2.CAEN=0), No Transmit on error, Sleep disable, Mesage type RTR for IRM (OPTREG2.MTYPE=0) –I think this is enough to receive messages in 25050 RXF0 (IRM) or in 25050 RXF1 (IM)-.



I have no problems to receive a message from 25050 to 258, so I think that hardware is ok. My transceiver in both nodes is MCP2551 and I test with and without 120 termination in both ends with the same result.



I’m using PIC 18 CAN routines (AN738) with correct TRISB and CIOCON.





Where it could be my problemm?





Thanks,





Victor Moreno

Lausanne


___________________________
This message was ported from CCS's old forum
Original Post ID: 13654
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: 18F258 with 25050
PostPosted: Mon Apr 14, 2003 12:03 pm     Reply with quote

:=Dear PCM programmer,
:=
:=When I try to send a message from PIC18F258 to MCP25050, so, when I load the transmit buffer (TXBnEIDH, TXBnEIDL, TXBnSIDH, TXBnSIDL, TXBnDLC and TXBnDm)
---------------------------------------------------------
I can't really help you, because I don't use the PCH compiler
or the CAN chip.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13662
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group