Hi,
Am having trouble with Flowcode V4, using CAN via SPI to MCP2515/MCP2551. I have confirmed the hardware is connected properly by using a known working PIC. This old chip was programmed with Flowcode v2 and I have not got the exact fcf file for it. I have written a new fcf program in V4 using very similar code structure.
I have looked at past postings and can confirm the PIC is sticking at the CAN INIT routine because the CS pin is not being driven. I tried to drive a different pin on another port low before and after each CAN routine however this has not worked either.
I understand in CAN properties you can change the CS & INT pin however this does not seem to have any effect.
I am using PIC16F88 IC’s, I am programming from HEX to MATLAB v8.50 to a PICSTART PLUS.
So my conclusion is that the CAN macros have changed between and early flowcodeV2 compared to FlowcodeV4.
Any and all help would be much appreciated
Regards
Rob
SPI & CAN interface
Moderator: Benj
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
- Contact:
Re: SPI & CAN interface
I can confirm that the CAN component has changed since Flowcode V2, but we are not aware of any problems driving the CS pin.
Which build of Flowcode V4 are you using?
Can you post a copy of the .fcf and .c files generated by a non-working program?
Which build of Flowcode V4 are you using?
Can you post a copy of the .fcf and .c files generated by a non-working program?
Re: SPI & CAN interface
Thank you for your prompt reply, I am using
Flowcode
Professional Version
Flowcode v4.5.18.74
I look forward to your reply,
Many thanks
Rob
Flowcode
Professional Version
Flowcode v4.5.18.74
I look forward to your reply,
Many thanks
Rob
-
- Valued Contributor
- Posts: 548
- Joined: Tue Jun 26, 2007 11:23 am
- Has thanked: 6 times
- Been thanked: 44 times
- Contact:
Re: SPI & CAN interface
Hello,
We have recreated a slightly modified version of your program in Flowcode V4 and run it successfully. The program is attached.
Removed
The modified FCD file you were using is not available in V4, so a standard 16F88 target was used and configured appropriately.
To match our test hardware:
The data rate and other CAN settings were returned to their default values.
The CS and INT pin selections were set to match the normal EB018 connections.
You should be able to change these settings to match your hardware without causing any problems.
We have recreated a slightly modified version of your program in Flowcode V4 and run it successfully. The program is attached.
Removed
The modified FCD file you were using is not available in V4, so a standard 16F88 target was used and configured appropriately.
To match our test hardware:
The data rate and other CAN settings were returned to their default values.
The CS and INT pin selections were set to match the normal EB018 connections.
You should be able to change these settings to match your hardware without causing any problems.
Re: SPI & CAN interface
Hello,
And many thanks ,
The CAN is now working correctly, while I do not understand the Mod you made to the program, I don't care, It works and it will stay in.
I just want to say thanks again for such a quick reply,
regards
Rob
And many thanks ,
![Very Happy :D](./images/smilies/icon_biggrin.gif)
I just want to say thanks again for such a quick reply,
regards
Rob