Simple TMR1 application example needed


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Hi Roger,

    It's working..

    But the 16F88 defaults to 31.25khz internal oscillator.
    So it takes a while to complete.

    If you read it back too quick, you don't see anything.

    Adding ...
        OSCCON = %01100010 ; Set Internal OSC to 4mhz.
    it takes a fraction of a second to complete.

    And this line overwrites the Timer results, so you might want to comment it...
    Result[Ctr_A] = Ctr_A ' assign Result's index

    hth,

    Added:
    F88's Flash memory is written in blocks of 4, so you'll need to change the length of the data.
    Last edited by Darrel Taylor; - 4th February 2010 at 09:48. Reason: added
    DT

  2. #2
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    952


    Did you find this post helpful? Yes | No

    Default Xtal issue now

    Thanks Darrel,

    After I posted my message, I added a blinky and noticed the "very slow motion".

    Now I use a 20MHz crystal so I corrected the configuration fuse and added the DEFINE information.

    But new problems come up...

    To get the program starting, I need to approach my finger close to the xtal (?!) - it looks like some capacitance issue. I added a 10Mohms resistor in parallel with the xtal and now, the program starts everytime I power the PIC.

    On the other hand, my PICKit2 programmer won't recognize my PIC when I have a 20MHz xtal intalled on the breadboard. I don't know what this comes from. Maybe one of you does?
    Roger

Similar Threads

  1. TMR1 external LP xtal setup check
    By comwarrior in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 13th October 2009, 19:11
  2. Replies: 2
    Last Post: - 7th October 2009, 01:06
  3. Measuring change of frequency with PIC
    By Aussie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th July 2007, 02:47
  4. Circuit needed to allow a PIC to turn something on or off
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th October 2005, 22:17
  5. PIC18 USB simple example needed
    By harryweb in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 29th September 2005, 23:20

Members who have read this thread : 0

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