18f2520 - Option_reg


Closed Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2006
    Location
    Venezuela - Caracas
    Posts
    48

    Default 18f2520 - Option_reg

    how to change OPTION_REG in 18F2550?

    16F648:

    PS0 = OPTION_REG.0 ' Prescaler select bit 0
    PS1 = OPTION_REG.1 ' Prescaler select bit 1
    PS2 = OPTION_REG.2 ' Prescaler select bit 2
    PSA = OPTION_REG.3 ' Prescaler source, 1 = WDT, 0 = xtal/4
    T0SE = OPTION_REG.4 ' Timer 0 edge select
    T0CS = OPTION_REG.5 ' Timer 0 kb_Clock source
    INTEDG = OPTION_REG.6 ' 1 = rising edge of Port B.0
    RBPU = OPTION_REG.7 ' 0 = Port B pullup resistors = ON
    TRM0 = 0 'Reset timer


    18F2520
    PS0 = T0CON.0 ' Prescaler Select bit 0
    PS1 = T0CON.1 ' Prescaler select bit 1
    PS2 = T0CON.2 ' Prescaler select bit 2
    PSA = T0CON.3 ' Prescaler source, 1 = WDT, 0 = xtal/4
    T0SE = T0CON.4 ' Timer 0 edge select
    T0CS = T0CON.5 ' Timer 0 kb_Clock source
    RBPU = INTCON2.7 ' 0 = Port B pullup resistors = ON

    i don't found in pdf

    ?? INTEDG = ?? ' 1 = rising edge of Port B.0
    ?? TRM0 = 0 'Reset timer
    ..: Don't worry, be happy :..

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mpardinho View Post
    i don't found in pdf
    ?? INTEDG = ?? ' 1 = rising edge of Port B.0
    ?? TRM0 = 0 'Reset timer
    I'll bet anything...almost anything...that if you used the word 'edge' or 'rising' as a search parameter in the datasheet, you'll find your answer.

    ?? TRM0 = 0 'Reset timer
    And you'll never find this in the datasheet...but you might find TMR0.

Similar Threads

  1. 18F2520 clock speed ?
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 21st August 2008, 19:01
  2. who knows how to let LCD03 work with 18F2520?
    By Janine in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 23rd May 2008, 14:24
  3. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  4. Writecode With 18f2520
    By TomM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 30th March 2006, 18:48
  5. Help with 18F2520
    By BertMan in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 7th October 2005, 03:30

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