Page 1 of 1

MikroC PRO for PIC. PIC18F46K42

Posted: 27 Jun 2022 22:52
by Bill Legge
Comments deleted/post amended by Bill Legge - there was NOT a serious problem with the PIC18F46K42 - apologies to MikroElektronika.

Regards Bill Legge in Australia

Re: MikroC PRO for PIC. PIC18F46K42

Posted: 27 Jun 2022 23:14
by hexreader
EasyPICv8 has PIC18F47K42 when delivered, presumably same workings as 46K42

I have many working projects for EasyPICv8

Only issue that I know of is with strange behaviour of UART library when using both UARTs
There may be other issue of which I am unaware

What troubles are you having? Maybe I can help

Re: MikroC PRO for PIC. PIC18F46K42

Posted: 29 Jun 2022 18:26
by Bill Legge
Hexreader = Thanks for your answer.
My difficulties were with the use of the UARTS but I thought there were other things- Apologies to Mikroelektronika for the negative comments.

A different problem that you may be able to advise on:

1. Board is the EasyPICv7Connectivity.
2. MCU is PIC18F45K22 with a 8MHz Xtal.
3. Plus the Mikro GLCD on the board.
5. 'Edit Project' sets the Fosc at 8MHz- and all runs OK - GLCD works as it should.
6. However, using a faster Xtal and/or using the PLL to get it running nearer its max speed of 64MHz - the GLCD packs up at about 16MHz.
7. The board jumper that sets the MCU Vcc is set to 5V.

Any way to run the MCU faster and still get the GLCD to worrk OK?

Regards Bill Legge in Australia

Re: MikroC PRO for PIC. PIC18F46K42

Posted: 29 Jun 2022 19:54
by hexreader
64 MHz works OK for me. Modified ME example is attached (display only, no touch panel)

Maximum frequency for 2-pin crystal is 20MHz, so PLL will be needed.

16MHz 2-pin crystal is needed for maximum 64MHz Fosc

Cannot see an issue so far.

Re: MikroC PRO for PIC. PIC18F46K42

Posted: 29 Jun 2022 20:34
by hexreader
And here is the same example, but for 64MHz internal oscillator.

No crystal required

Re: MikroC PRO for PIC. PIC18F46K42

Posted: 30 Jun 2022 00:00
by Bill Legge
Hexreader - Thanks - both your code and the Mikro example work fast on my board.
However, my code does not - and to make the problem even more irritating:
1. I save the config setting from the two good programs,
2. And used then to set up my own code - and I'm stuck at 8MHz max!. AGAIN.

Probably too tired to see some obvious fault. Try again later.

Regards Bill Legge at 06.59am!