Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to disable ECAN on PIC18F45K80 ?

Status
Not open for further replies.

chrischris

Member
Hi, I am trying UART communication on PIC18F45K80 but the pins are multiplexed with CAN bus, I need to disable CAN but, there is no straightforward ENABLE/DISABLE bit. PIC32s have very easy enable/disable option. Any ideas on how to do that with this PIC ?

I have tried this on Proteus but doesn't work !

CIOCONbits.CANCAP = 0;
CANSTATbits.OPMODE = 0b001;

EDIT:
Also there is CANMX bit which can either be set to PORTB or PORTC, but there is no option to not to use it at all !


Thanks,
Chris
 
Last edited:
C:
CANCONbits.REQOP = 4; // should be that way after reset already, also may try "1"
PMD2bits.ECANMD = 1; // removes power from the CAN module (won't release pins though)
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top