dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS [solved]

An area to discuss 16-bit PIC specific problems and examples

Moderator: Benj

User avatar
celebriums
Posts: 105
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 61 times
Been thanked: 28 times
Contact:

Re: dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS problem

Postby celebriums » Fri Apr 06, 2018 4:24 pm

Hi
GetRxIdent 16 bit function is correct working. (Use Mask and Filter)
Problem 1 solved.
Thank you.

Problem 2: If I add a new variable, CANBUS can not read the line. (Example; byte8 = ABC)

Problem 3: If you add a new variable and send only data, it sends wrong value.
(0x12FE1240; buffer:0, DLC: 8,1,1,1,1,1,1,1,1 instead of 0x12FCBF41; Buffer8, DLC:4,1,1,1,1,1,1,1,1) as if it had shifted value.

User avatar
Benj
Matrix Staff
Posts: 14130
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4325 times
Been thanked: 4070 times
Contact:

Re: dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS problem

Postby Benj » Fri Apr 06, 2018 4:41 pm

Hello Sadik,

Problem 2: If I add a new variable, CANBUS can not read the line. (Example; byte8 = ABC)


We're not too sure what you mean by this. Can you provide a simple example so we can better see what you mean.
These users thanked the author Benj for the post:
celebriums (Fri Apr 06, 2018 4:47 pm)
Rating: 5.56%
 

User avatar
celebriums
Posts: 105
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 61 times
Been thanked: 28 times
Contact:

Re: dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS problem

Postby celebriums » Fri Apr 06, 2018 5:00 pm

Hi Benj
I'il explain it now. After the GetRXIdent function works, I added a new variable from the left menu.
Variable>add new> Create a New Variable
Name of New variable: ABC
initial value: 0
Byte(number in the range: 0,255)

In this case, the GetRXIdent function does not work.

User avatar
LeighM
Matrix Staff
Posts: 1843
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 611 times
Contact:

Re: dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS problem

Postby LeighM » Mon Apr 09, 2018 8:21 am

Hi,
Could you post a flowcode project with the variable added?
Thanks

User avatar
LeighM
Matrix Staff
Posts: 1843
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 429 times
Been thanked: 611 times
Contact:

Re: dsPIC33EP128MC506, dsPIC33EP32MC502 and dsPIC33EP256MU806 CANBUS problem

Postby LeighM » Mon Apr 09, 2018 9:08 am

Hi,
Reading back through your posts again, I think I see the issue, could you try the attached file please?
Attachments
PIC16BIT_CAL_CAN.c
(71.12 KiB) Downloaded 46 times
These users thanked the author LeighM for the post:
celebriums (Mon Apr 09, 2018 11:29 am)
Rating: 5.56%
 

User avatar
celebriums
Posts: 105
Joined: Sun Sep 25, 2016 3:50 pm
Has thanked: 61 times
Been thanked: 28 times
Contact:

Re: dsPIC33EP128MC506, MC502 and dsPIC33EP256MU806 CANBUS problem (SOLVED)

Postby celebriums » Mon Apr 09, 2018 11:22 am

Dear LeighM

Problem 2 and Problem 3 te seems to have solved the problem.

The update is working correctly.

Thank you very much for your help and support.

:D
Last edited by celebriums on Mon Apr 09, 2018 11:25 am, edited 1 time in total.
These users thanked the author celebriums for the post (total 2):
LeighM (Mon Apr 09, 2018 12:43 pm) • Benj (Mon Apr 09, 2018 12:50 pm)
Rating: 11.11%