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

PIC18F458 CAN config mode

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







PIC18F458 CAN config mode
PostPosted: Sat Sep 09, 2006 1:57 am     Reply with quote

Hello,
I have a 18F458 which receives data over CANBUS almost every second. I want PIC enter to the CONFIG mode by sending message via RS232.It does what I want only two times.Then it is locked.But when I cut the connection to the CANBUS it works very well.Why doesn't it work while data is coming?
Thanks!
iso
Guest







PostPosted: Mon Sep 11, 2006 1:39 pm     Reply with quote

If the bus is transmitting or receiving it wont go into config mode.

Put a loop on your enter config code and only break when it sets.
Guset
Guest







PostPosted: Sat Sep 16, 2006 5:39 am     Reply with quote

Thaks for replying!
I wrote can_abort() to empty the tansmitter buffers before changing the mode,but still it is same. Maybe I need to empty the receiver buffers but there isn't a function for it in the library. However, can the transmitter buffer be full even if the speed of the bus which it is connected is not compatible with the PIC?
There is only problem when I plug the bus cables,which sending data periodically.
sjbaxter



Joined: 26 Jan 2006
Posts: 141
Location: Cheshire, UK

View user's profile Send private message Visit poster's website

PostPosted: Sun Sep 17, 2006 10:26 am     Reply with quote

Have a look at this thread:

Can't get into config mode

It may give you some additional pointers. I seem to remember that not only have the TX registers go to be empty, but the RX pin has to be high before you can get into config mode.
_________________
Regards,
Simon.
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