CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

CCS bootloader for PIC18F46K42

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
RNR107



Joined: 19 Dec 2014
Posts: 23

View user's profile Send private message

CCS bootloader for PIC18F46K42
PostPosted: Wed Jul 21, 2021 3:36 am     Reply with quote

Hi,
I am using the latest version of the compiler.

I use the CCS bootloader on most projects I do, and so far it always worked perfectly…
Now, I have a board with a PIC18F46K22 and again the bootloader works fine.
I then replace the PIC on this same board with a PIC18F46K42 and the bootloader now timed out…
(The 46K42 and the 46K22 are pin to pin compatible as far as I can tell and my code runs fine on the new 46K42 without the bootloader)

Does the PIC46K42 has special requirement when it comes to bootloader?

Thank you,
Laurent
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Wed Jul 21, 2021 7:32 am     Reply with quote

One huge critical difference.

The K42, is a PPS chip. It is not 'pin compatible', you have to tell the
compiler where to put the peripherals.
On this later chip, the peripherals can all be mapped to different pins.
So you need to add the fuse NOPPS1WAY (otherwise the main code
won't be able to reconfigure anything), and add the PPS mappings
to setup the UART pins to match the older chip.
Without these the 'UART' will only configure a software UART.

Look at the sticky at the top of the forum on 'pin select', which explains how
to do this.
RNR107



Joined: 19 Dec 2014
Posts: 23

View user's profile Send private message

PostPosted: Thu Jul 22, 2021 4:51 am     Reply with quote

Ttelmah wrote:
One huge critical difference.

The K42, is a PPS chip. It is not 'pin compatible', you have to tell the
compiler where to put the peripherals.
On this later chip, the peripherals can all be mapped to different pins.
So you need to add the fuse NOPPS1WAY (otherwise the main code
won't be able to reconfigure anything), and add the PPS mappings
to setup the UART pins to match the older chip.
Without these the 'UART' will only configure a software UART.

Look at the sticky at the top of the forum on 'pin select', which explains how
to do this.


Thank you Ttelmah!
I knew about the PPS, I did map the pins as per the older chip, But I didn't know about the "NOPPS1WAY" fuse.
I will have a look at the sticky right now.
shakaibsafvi



Joined: 16 Mar 2018
Posts: 1
Location: Islamabad

View user's profile Send private message

Re: CCS bootloader for PIC18F46K42
PostPosted: Thu Oct 21, 2021 2:01 am     Reply with quote

RNR107 wrote:
Hi,
I am using the latest version of the compiler.

I use the CCS bootloader on most projects I do, and so far it always worked perfectly…
Now, I have a board with a PIC18F46K22 and again the bootloader works fine.
I then replace the PIC on this same board with a PIC18F46K42 and the bootloader now timed out…
(The 46K42 and the 46K22 are pin to pin compatible as far as I can tell and my code runs fine on the new 46K42 without the bootloader)

Does the PIC46K42 has special requirement when it comes to bootloader?

Thank you,
Laurent

Hi Laurent,

I'm experimenting with a few bootloaders... is it possible for you to share the bootloader files for the PIC18F46K22 ?

++++++++++++++++++++
See Forum Rule #10

10. Don't post the CCS example code or drivers, or ask for such code and drivers.

Forum Rules:
http://www.ccsinfo.com/forum/viewtopic.php?t=26245

-- Forum Moderator
++++++++++++++++++++
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group