CAN SPI Click / EasyPIC v8 / PIC18F45K22 >> cannot initialize

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
Robin_Masters
Posts: 25
Joined: 09 Jan 2020 11:38

CAN SPI Click / EasyPIC v8 / PIC18F45K22 >> cannot initialize

#1 Post by Robin_Masters » 08 Sep 2022 08:14

Hello to all,


I'm trying for the first time a program that uses a can bus.
The goal will be to send a request to get the value that I have to display on a LED display.

I have a problem : I can't initialize.
My program blocks on line 97 : "CANSPIInitialize(SJW, BRP, PHSEG1, PHSEG2, PROPSEG, Can_Config_Flags); // Initialize external CANSPI module"


Can anyone help me?
(hardcopy of the program in the joined file)
Attachments
debug97.png
debug97.png (499.44 KiB) Viewed 763 times

Robin_Masters
Posts: 25
Joined: 09 Jan 2020 11:38

Re: CAN SPI Click / EasyPIC v8 / PIC18F45K22 >> cannot initialize

#2 Post by Robin_Masters » 08 Sep 2022 14:08

I just find the solution :

I activate the interrupt on RB0 with those lines :
INT0IE_bit := 1; // active interruption INT0 on RB0
INTEDG0_bit := 0; // detect interruption on falling edge ( INT = #RB0 )

Post Reply

Return to “mikroPascal PRO for PIC General”