• AVR Freaks

Oscillator modes of 18lf4520

Author
vikas.gok
Starting Member
  • Total Posts : 32
  • Reward points : 0
  • Joined: 2012/04/05 01:12:45
  • Location: 0
  • Status: offline
2019/07/15 04:23:38 (permalink)
0

Oscillator modes of 18lf4520

Hello,
I am using PIC18lf4520 controller. Here I am using internal oscillator mode with OSC1 as RA7( IO) and OSC2 as CLK/4 output.
Also using sleep instruction in the code to save power. In data sheet it is  written that in sleep mode the OSC1 pin will be floating and pull up is required. My query is if it is configured as RA7 IO (PORTA ,7) then if I clear TRISA and put RA7 as zero then how it can be floating?
Kindly review.
Thanks in advance
#1

3 Replies Related Threads

    ric
    Super Member
    • Total Posts : 23243
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: Oscillator modes of 18lf4520 2019/07/15 04:44:46 (permalink)
    0
    vikas.gok
    ...
    In data sheet it is  written that in sleep mode the OSC1 pin will be floating and pull up is required.

    Where precisely are you reading this?
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    jack@kksound
    code tags!
    • Total Posts : 3201
    • Reward points : 0
    • Joined: 2014/05/14 10:03:19
    • Location: 0
    • Status: offline
    Re: Oscillator modes of 18lf4520 2019/07/16 10:42:32 (permalink)
    +1 (1)
    Possibly from Table 2-3 on page 31. to the OP: this table does NOT state that you MUST pull up the OSC1 pin, it states what WILL probably be the case due to the external circuitry. The table info is to help you achieve the lowest SLEEP() mode power consumption. When OSC1 pin is used as I/O (not used for an external oscillator)(internal osc selected with NO Fosc/4 output - INTIO2) will act just like any other I/O pin during sleep(). 
    #3
    vikas.gok
    Starting Member
    • Total Posts : 32
    • Reward points : 0
    • Joined: 2012/04/05 01:12:45
    • Location: 0
    • Status: offline
    Re: Oscillator modes of 18lf4520 2019/07/19 00:30:11 (permalink)
    0
    Thanks,
    Yes Jack is right , its on Table 2-3 on page 31 (DS39631A-page 31). So shall I consider it as  once it configured as IO in cofig words then there should not be any extra pull up is required in sleep mode.
    Thanks again
    #4
    Jump to:
    © 2019 APG vNext Commercial Version 4.5