Hi there,
I have a EB006 programmer with a CAN bus (EB018) connected to port A and a LCD (EB005) connected to port B.
The programmer has a PIC16F877A controller inserted.
I have made a program to check the CAN bus on any messages.
Programming to the PIC does work (no errors) but the program doesn´t start.
The program is included, what have I done wrong?
When I program it with code 0002 (Hello world) the display reacts.
Please let me know what to check.
Rinie
CAN problem in FC5
Moderator: Benj
-
- Flowcode v5 User
- Posts: 68
- Joined: Thu Mar 01, 2007 10:48 am
- Location: Netherlands
- Been thanked: 3 times
- Contact:
CAN problem in FC5
- Attachments
-
- can receiver test 0002.fcf
- Test file
- (6.5 KiB) Downloaded 280 times
-
- can receiver test 0001.fcf
- Original file
- (16.5 KiB) Downloaded 269 times
Greetings, Rinie
Flowcode V7 user
Flowcode V7 user
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: CAN problem in FC5
Hi Rinie
You need to attach the CAN bus e-block to Port C (It uses the SPI)
Set the connection property Chip Select to Port C Pin 6
Also check that the jumpers A and 1 are set on the EB018
Regards,
Leigh
You need to attach the CAN bus e-block to Port C (It uses the SPI)
Set the connection property Chip Select to Port C Pin 6
Also check that the jumpers A and 1 are set on the EB018
Regards,
Leigh
-
- Flowcode v5 User
- Posts: 68
- Joined: Thu Mar 01, 2007 10:48 am
- Location: Netherlands
- Been thanked: 3 times
- Contact:
Re: CAN problem in FC5
Hello Leigh,
Thanks for your answer, this functions well.
The datasheet on the EB018 shows a connection to port A (text below)
@@
The microcontroller that is being used determines which
port and which jumper. For example, if a PIC16F877A is
being used, the CAN board must be connected to port A,
with the jumper settings to A & 1.
@@
Jumper settings were alright.
Rinie
Thanks for your answer, this functions well.
The datasheet on the EB018 shows a connection to port A (text below)
@@
The microcontroller that is being used determines which
port and which jumper. For example, if a PIC16F877A is
being used, the CAN board must be connected to port A,
with the jumper settings to A & 1.
@@
Jumper settings were alright.
Rinie
Greetings, Rinie
Flowcode V7 user
Flowcode V7 user
-
- Flowcode v5 User
- Posts: 68
- Joined: Thu Mar 01, 2007 10:48 am
- Location: Netherlands
- Been thanked: 3 times
- Contact:
Re: CAN problem in FC5
Hello again,
The can system works with 16F877A processors now, the receiver site reacts on pressing the button on the transmitter.
This is the test from the getting started file in the help function.
I have a new question on the transmission speed.
There are some standard values 125, 250, 500 and 1000 kbps.
Is it possible to change this value to 100 kbps, the speed that another can system uses?
Please let me know how to do that.
Rinie
The can system works with 16F877A processors now, the receiver site reacts on pressing the button on the transmitter.
This is the test from the getting started file in the help function.
I have a new question on the transmission speed.
There are some standard values 125, 250, 500 and 1000 kbps.
Is it possible to change this value to 100 kbps, the speed that another can system uses?
Please let me know how to do that.
Rinie
Greetings, Rinie
Flowcode V7 user
Flowcode V7 user
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: CAN problem in FC5
Hi Rinie,
In the Custom Code for the CAN component, select [Defines] then Edit Code.
Scroll down to the following code...
And change the CNF1 value to 9
Regards
Leigh
In the Custom Code for the CAN component, select [Defines] then Edit Code.
Scroll down to the following code...
Code: Select all
//CAN Baud Rate
#define %a_CNF1_VAL %h
#define %a_CNF2_VAL %i
#define %a_CNF3_VAL %j
Code: Select all
//CAN Baud Rate
#define %a_CNF1_VAL 9
#define %a_CNF2_VAL %i
#define %a_CNF3_VAL %j
Leigh
-
- Flowcode v5 User
- Posts: 68
- Joined: Thu Mar 01, 2007 10:48 am
- Location: Netherlands
- Been thanked: 3 times
- Contact:
Re: CAN problem in FC5
Hello Leigh,
I have changed the value from %h to 9.
Seems to work fine, thanks for your help.
Rinie
I have changed the value from %h to 9.
Seems to work fine, thanks for your help.
Rinie
Greetings, Rinie
Flowcode V7 user
Flowcode V7 user