18f27k40 - timer0 changes from K22, K80 series 8bit/16bit mode


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: 18f27k40 - timer0 changes from K22, K80 series 8bit/16bit mode

    it needs to be T0CKPS 1:256
    That'll get you a lot closer... 9.984ms

    If you use the postscaler you can get 10.000ms:

    - set prescaler to 1:32 T0CKPS<3:0> = 0101
    - set postscaler to 1:10 T0OUTPS<3:0> = 1001
    - set period count = 125 (load TMR0H with 125-1=124)
    gets you 32 x 10 x 125 x 250ns = 10.000ms

    For 32MHz, just change the prescaler to 1:64:
    64 x 10 x 125 x 125ns = 10.000ms

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,645


    Did you find this post helpful? Yes | No

    Default Re: 18f27k40 - timer0 changes from K22, K80 series 8bit/16bit mode

    i'm impressed on just how versatile these later generation chips are. there is heaps to learn
    Warning I'm not a teacher

  3. #3
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: 18f27k40 - timer0 changes from K22, K80 series 8bit/16bit mode

    also be aware now of the errata on timer0 k40 series , T0ASYNC bit problem , when FOSC/4 clock source

    Name:  k40 errata ver E - timer 0.JPG
Views: 1283
Size:  79.0 KB

Similar Threads

  1. 18f27k40 - adc settings
    By longpole001 in forum PBP3
    Replies: 5
    Last Post: - 12th July 2018, 11:34
  2. PBP for dsPIC 16bit??
    By photoelectric in forum PBP Wish List
    Replies: 33
    Last Post: - 9th July 2014, 08:13
  3. PIC18f2620 Timer0 in 16-bit mode
    By Bruce in forum General
    Replies: 0
    Last Post: - 18th August 2010, 03:08
  4. AD7705 is 15bit or 16bit ADC
    By ravindrajoga in forum Off Topic
    Replies: 1
    Last Post: - 13th July 2007, 14:09
  5. 8bit var holds 16bit data!??
    By mofarngo in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th August 2005, 20:33

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