View previous topic :: View next topic |
Author |
Message |
RNR107
Joined: 19 Dec 2014 Posts: 23
|
CCS bootloader for PIC18F46K42 |
Posted: Wed Jul 21, 2021 3:36 am |
|
|
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: 19540
|
|
Posted: Wed Jul 21, 2021 7:32 am |
|
|
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
|
|
Posted: Thu Jul 22, 2021 4:51 am |
|
|
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
|
Re: CCS bootloader for PIC18F46K42 |
Posted: Thu Oct 21, 2021 2:01 am |
|
|
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
++++++++++++++++++++ |
|
|
|