Dear flowcoders,
I have developed a circuit that works as a can bus node. Its a copy of a friend of mind and the program I have from works but not
like I want it to. So I bought flowcode and started designing. In the simulation everything works but when I download it to the PIC.
It gets stuck on Can Init. The problem is that flowcode still thinks i'm using the E-board via the MCP2515 and MCP2551. But that isnt
the case i'm only using the MCP2551 because the 18F2580 has a build in can-controller. If i go into the C-file i can also see the program
for the spi connection but as I said, I don't use the MCP2515 so I don't use SPI. Can this be fixed or I there a change that I can get it
right!!
Thanks!!
Georges
(Files in attachement)
Can bus problem with 18F2580
-
- Posts: 2
- Joined: Thu Jun 11, 2009 6:41 pm
Can bus problem with 18F2580
- Attachments
-
- schema canbus.jpg
- Schematics
- (108.52 KiB) Downloaded 2792 times
-
- Canbus flow.fcf
- Program
- (27.73 KiB) Downloaded 436 times
-
- Canbus flow.c
- C-File
- (59.51 KiB) Downloaded 445 times
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Can bus problem with 18F2580
Hello
Unfortunatley Flowcode does not currently support devices with an internal CAN controller. This may be resolved in the near future.
Unfortunatley Flowcode does not currently support devices with an internal CAN controller. This may be resolved in the near future.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 2
- Joined: Thu Jun 11, 2009 6:41 pm
Re: Can bus problem with 18F2580
Thanks for the reply!!
But is it possible to make the programm in flowcode and copy paste the main source code to
an other code with the right configuration? So its compatible with my circuit??
Thanks
But is it possible to make the programm in flowcode and copy paste the main source code to
an other code with the right configuration? So its compatible with my circuit??
Thanks
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Can bus problem with 18F2580
Hello
It should be possible to modify the functions in the CAN component C file using the Code customization in Flowcode v4 or by editing the component C code file by hand in Flowcode V3. Modifying these functions to use the internal rather then the external CAN controller should be possible. Most of the device registers should match up with the ones currently being accessed via the SPI bus.
It should be possible to modify the functions in the CAN component C file using the Code customization in Flowcode v4 or by editing the component C code file by hand in Flowcode V3. Modifying these functions to use the internal rather then the external CAN controller should be possible. Most of the device registers should match up with the ones currently being accessed via the SPI bus.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: Can bus problem with 18F2580
Hello,
I have a different problem along these lines.
I have written a small program for the 18F2580 using the Can2 component.
Whenever I try to compile it however I get the following errors:
Illegal redefinition of symbol: RXM0EID8_VAL
Illegal redefinition of symbol: RXM0EID0_VAL
Illegal redefinition of symbol: RXM1EID8_VAL
Illegal redefinition of symbol: RXM1EID0_VAL
Illegal redefinition of symbol: CANSTAT
Illegal redefinition of symbol: TXREQ
Illegal redefinition of symbol: ABAT
Illegal redefinition of symbol: ERRIE
Illegal redefinition of symbol: WAKIE
Illegal redefinition of symbol: ERRIF
Illegal redefinition of symbol: WAKIF
Illegal redefinition of symbol: SAM
Illegal redefinition of symbol: WAKFIL
When I change the config to another chip it compile fines, but I am quite keen to use the 18F2580 as this is what is fitted to my development board.
Any ideas?
Thanks
MW
I have a different problem along these lines.
I have written a small program for the 18F2580 using the Can2 component.
Whenever I try to compile it however I get the following errors:
Illegal redefinition of symbol: RXM0EID8_VAL
Illegal redefinition of symbol: RXM0EID0_VAL
Illegal redefinition of symbol: RXM1EID8_VAL
Illegal redefinition of symbol: RXM1EID0_VAL
Illegal redefinition of symbol: CANSTAT
Illegal redefinition of symbol: TXREQ
Illegal redefinition of symbol: ABAT
Illegal redefinition of symbol: ERRIE
Illegal redefinition of symbol: WAKIE
Illegal redefinition of symbol: ERRIF
Illegal redefinition of symbol: WAKIF
Illegal redefinition of symbol: SAM
Illegal redefinition of symbol: WAKFIL
When I change the config to another chip it compile fines, but I am quite keen to use the 18F2580 as this is what is fitted to my development board.
Any ideas?
Thanks
MW
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Can bus problem with 18F2580
Hello,
I know the cause of your problem and it is related to the Flowcode CAN defines colliding with the defines for the CAN registers on the 18F2580 device.
What version of Flowcode are you running. Updating to the latest version (4.3) may fix this problem.
I know the cause of your problem and it is related to the Flowcode CAN defines colliding with the defines for the CAN registers on the 18F2580 device.
What version of Flowcode are you running. Updating to the latest version (4.3) may fix this problem.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Can bus problem with 18F2580
Hello,
Right I have done a search and replace on the CAN2 component to rename the defines and this has removed all of the compile errors when using the 18F2580 device.
Simply replace the file in your "Flowcode v4\Components" directory and then start Flowcode and the program should then compile correctly.
Right I have done a search and replace on the CAN2 component to rename the defines and this has removed all of the compile errors when using the 18F2580 device.
Simply replace the file in your "Flowcode v4\Components" directory and then start Flowcode and the program should then compile correctly.
- Attachments
-
- PIC_CAN2.c
- (43.34 KiB) Downloaded 435 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel