View previous topic :: View next topic |
Author |
Message |
DEV_GUY Guest
|
CAN BUS in Dev kit does not work |
Posted: Sat Oct 07, 2006 12:41 pm |
|
|
Hello-
I am using CCS CAN Bus development kit. I compiled the first CAN example program that writes 0 to 9 in the 7-Seg Dsplay, but it does not work. The microcontroller is a PIC18F4580.
Taking a look at the TXBnCON registers it shows an 0x19. It is working in legacy mode I believe. From this value, it shows that there is an error with the CAN Bus (bit 4 = 1).
Any suggestions? Is the Dev. board broken?
Thank you |
|
|
jamesjl
Joined: 22 Sep 2003 Posts: 52 Location: UK
|
|
Posted: Sun Oct 08, 2006 2:37 pm |
|
|
I bought the CAN dev kit and it was programmed out of the box and worked fine. I have since re-programmed both PICs on the board with CAN-A and and CAN-B code that ships with the compiler and all worked fine. I am even using this board as a sniffer on my own CAN bus now that I have moved on from the Dev Kit.
I haven't got a programmer for the ICs in circuits labelled C and D on the Dev kit so I haven't changed them but CAN-A can send data and the 7-seg updates fine.
Hope that helps,
Jason |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Mon Oct 09, 2006 6:31 am |
|
|
What version of the CCS compiler are you using ? _________________ Regards,
Simon. |
|
|
jamesjl
Joined: 22 Sep 2003 Posts: 52 Location: UK
|
|
Posted: Mon Oct 09, 2006 7:04 am |
|
|
Simon,
used 3.249 and others below it and V4.009 which I am using now.
Jason |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Mon Oct 09, 2006 11:42 am |
|
|
V4.009 ... you are brave !!!
I was actually after knowing what DEV_GUY was using as they don't say. I do know, from experience, 3.237 to 3.249 do have compiler bugs which affect CAN code. I'm still using 3.236 for reliability. _________________ Regards,
Simon. |
|
|
jamesjl
Joined: 22 Sep 2003 Posts: 52 Location: UK
|
|
Posted: Mon Oct 09, 2006 1:40 pm |
|
|
I still have 3.249 in reserve for when things don't seem to go according to plan. |
|
|
Guest
|
|
Posted: Tue Oct 10, 2006 4:39 pm |
|
|
I finally made it owrk. But I notice somtimes it works, and sometimes it doesn't. |
|
|
Dev_Guy Guest
|
|
Posted: Tue Oct 10, 2006 4:41 pm |
|
|
I forgot... I'm using 3.249... but when I used 3.235 it didn't work as well. |
|
|
|