How to set 18F2520 for INT OSC?


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    When you said you were not using a crystal I got to thinking resonator.
    You can use HS mode, OSC2 will just be an open pin.

    As for your problem I am at a loss.
    Maybe there is something at the beginning of your code messing things up?
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    This is my entire program, and I get a 25 sec. delay until the LED goes on.

    Code:
    ASM
         ;PORT A 
         CLRF PORTA 
         MOVLW 07h 
         MOVWF ADCON1                           ;A/D'S OFF 
         MOVWF 07h 
         MOVWF CMCON                            ;COMPARATORS OFF  
         MOVLW 00000000b                        ;PIN DIRECTION PORT A  
         MOVWF TRISA 
    ENDASM
    
    DEFINE OSC 20                                
    LOW PORTA.6                                     'TURN LED ON
    STOP

    Thanks anyway, Dave!

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts