18F45K20 Using internal clock

Post your requests and ideas on the future development of mikroC PRO for PIC.
Post Reply
Author
Message
nthrower
Posts: 8
Joined: 27 Apr 2018 18:44

18F45K20 Using internal clock

#1 Post by nthrower » 03 Apr 2019 11:12

I've read through the data sheet and understand the following.

To use the internal clock I need to set OSCCON to 1110 0111 This should give me 8 MHz.

So I set compiler to use OSCON = 0xE7;
Complies OK

I also need to set CONFIG1H to 0000 1000b but the compiler does not recognise this register.

CONFGI1H = 0x08;
Undeclared identifier NFIG1??
Anyideas so I can move forward.

Many Thanks

Nigel
Last edited by nthrower on 03 Apr 2019 11:22, edited 1 time in total.

oliverb
Posts: 570
Joined: 24 May 2007 15:09

Re: 18F45K20 Using internal clock

#2 Post by oliverb » 03 Apr 2019 11:19

CONFIG1H should be in Project settings, it is part of the configuration that is written when the PIC is programmed, not a SFR you access at runtime.

nthrower
Posts: 8
Joined: 27 Apr 2018 18:44

Re: 18F45K20 Using internal clock

#3 Post by nthrower » 03 Apr 2019 11:23

Oops - forgot that.

Have been using other chips - so re learning.

Many Thanks

Post Reply

Return to “mikroC PRO for PIC Wish List”