Page 1 of 1

How interesting is the new PIC18 K40 series ?

Posted: Wed Nov 02, 2016 7:19 am
by PicoPuls
How interesting is the new PIC18 K40 series ?
http://www.microchip.com/forums/m951250.aspx

Best regards
Bengt

Re: How interesting is the new PIC18 K40 series ?

Posted: Wed Nov 02, 2016 11:03 pm
by QMESAR
Hi

In my personal opinion these PIC18K40 devices are very interesting as we now see the start of implementation of core independent peripherals as they have been developing on the PIC16F1 series , The core independent peripherals is a very smart feature as it frees up the core for processing power and not driving the peripherals you only need CPU cycles when you write or change values to the peripherals These PIC16F1 devices are smart devices
with that said about the core independent peripherals the next is the feature rich and smart Peripherals they are having now such as the CLC, WWDTa ,Angular timers,math accelerator etc which allows a design engineer to use the mcu for processing and also it can be used to build interface hardware logic and other circuits these new peripherals are complex peripherals which you can do many things with depends on your needs I guess.

just an example the Math accelerator module allows you to use a PID loop in Hardware once setup /configured the cpu does nothing all is calculated in hardware and adjusted automatically imagine a PIC32MZ with this ability at 200MHZ what would its processing power be :shock:

The days of 8 bit mcu's is long not over and they have still many uses and will be there for a long time to come and the beauty here is these peripherals will find their way in to the PIC32 and PIC33's wow these things will be beauties to work with

You have to inform yourself about these new peripherals in order to understand what these new devices are capable of it is not easy to give you all the information in a single post

just my penny :D

Re: How interesting is the new PIC18 K40 series ?

Posted: Sat Nov 05, 2016 3:52 pm
by PicoPuls
When will they be supported by Flowcode ?

Re: How interesting is the new PIC18 K40 series ?

Posted: Wed Nov 09, 2016 6:41 pm
by Benj
I'll get them on the list, they shouldn't be a big job to include but it depends how many new peripheral styles are included.

Re: How interesting is the new PIC18 K40 series ?

Posted: Fri Nov 11, 2016 11:24 am
by Benj
Right I've made a start, I'd like to have another pass as there are bound to be bits I have missed.

There are lots of new and different bits to these chips so expect problems. For example the I2C hardware peripherals now feature re-mappable I/O so this is currently unsupported.

I'm hoping I/O, DAC, ADC, SPI, UARTs and Timer interrupts should work ok.

Latest files included in the update here: http://www.flowcode.co.uk/mmforums/viewt ... 63&t=18209

If anyone has a go then let me know how you get on.

Re: How interesting is the new PIC18 K40 series ?

Posted: Sat Nov 12, 2016 10:35 am
by Kenrix2
Great job Benj. Thank you so much. Works perfect for me using the 27K40. I did expect ANSELA would be cleared in startup on this chip.

Not related to Flowcode but, I had an issue when using a LUT. After reading the errata I added the following right below "BEGIN" and problem solved.

Code: Select all

NVMCON1bits.NVMREG1=1;
Thanks again for all your hard work.

Re: How interesting is the new PIC18 K40 series ?

Posted: Mon Nov 14, 2016 1:42 pm
by Benj
Many thanks for letting me know,

ANSELA and other missing ANSELs have now been added to the init code as has the NVMCON1 command.

Re: How interesting is the new PIC18 K40 series ?

Posted: Thu Nov 24, 2016 1:45 am
by electron67
Hi

To working in Flowcode 6 the PIC18F**K40.zip :?:

Thanks
Enrique

Re: How interesting is the new PIC18 K40 series ?

Posted: Thu Nov 24, 2016 8:59 am
by QMESAR
electron67 wrote: To working in Flowcode 6 the PIC18F**K40.zip :?
The problem is not with MATRIX to include the new devices the problem is that the boostC compiler people does not include new devices very often and for that reason it can take a very long time if ever they will get support in the boostC compiler,
If you really want to use these devices then my advice would be to upgrade to FC7 as it is using the Microchip Compiler devices get added to the compiler automatically as they are released and MATRIX update FC faster :D

Re: How interesting is the new PIC18 K40 series ?

Posted: Tue Nov 29, 2016 11:59 am
by QMESAR
Just one of the great feature of the"K40" series most of the things we normally need to do in hardware and software are all included and Part of the ADC now :D

Re: How interesting is the new PIC18 K40 series ?

Posted: Wed Oct 18, 2017 9:26 am
by LeighM
Just whilst waiting for some devices to test :?
Is anyone currently successfully using (Flowcode V7) UART on the K40?

EDIT:
Just got a PIC18F47K40 and both UARTs work fine :D
Seems that there is a possibility of a silicon error with (early) K40 and the use of strings and arrays.