PIC18F26K83 CANBUS

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
mur@t
Posts: 25
Joined: 18 Jul 2014 14:58

PIC18F26K83 CANBUS

#1 Post by mur@t » 14 Dec 2021 19:53

I can send ID and data for 18F26K83 as follows.

Code: Select all

    TXB1SIDH := 0xFF;
    TXB1SIDL := 0xF0;

    // Set the message data registers
    TXB1D0 := 0x00;
    TXB1D1 := 0x01;
    TXB1D2 := 0x02;
    TXB1D3 := 0x03;
    TXB1D4 := 0x04;
    TXB1D5 := 0x05;
    TXB1D6 := 0x06;
    TXB1D7 := 0x07;

    // Set the DLC register
    TXB1DLC := 0x08; 

    TXB1CON.3 := 1;

    while (TXB1CON.3 <> 0) do 

but when I send (or receive) with the CanRead and CanWrite commands in the library
ID is correct, data is wrong.

I am using mPPro version 7.6.

Could there be a problem with the library?
Attachments
Untitled.png
Untitled.png (3.89 KiB) Viewed 1080 times

User avatar
darko.ilijevski
Posts: 581
Joined: 21 Mar 2017 16:57

Re: PIC18F26K83 CANBUS

#2 Post by darko.ilijevski » 16 Dec 2021 23:05

Hello,
I believe you already posted this question in another forum section here.
In any case, I'll confirm your claims, and if it turns out to be a problem with the library, I will report a bug.
Again, thanks for your patience and for pointing this out.
BR,
Darko

Post Reply

Return to “mikroPascal PRO for PIC General”