Setting 8Mhz clock speed on PIC16F684


Results 1 to 8 of 8

Threaded View

  1. #1
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    531

    Default Setting 8Mhz clock speed on PIC16F684

    Can someone kindly help me please?

    I am trying to make a PIC16F684 run at 8Mhz instead of the default 4Mhz.

    Problem is, test led's just keeping flashing at 10 secs...

    I have MPASM ticked as the Compiler/Assembler and using PBP 2.60

    Simple code below:

    @ __config _INTOSCIO & _WDT_OFF

    DEFINE OSC 8

    OSCCON = %01110000 ' Internal 8MHz osc
    'OSCTUNE = %00000000 ' not in use
    ANSEL = %00000000 'Disable analog select so ports work as digital i/o.
    CMCON0 = %00000111 'Disable analog comparators.
    TRISA = %00000000 'Set PORTA as OUTPUT.
    PORTA = %00000000 'Set PORTA pins all low.


    Start

    main:

    HIGH PORTA.2
    PAUSE 10000
    LOW PORTA.2
    PAUSE 2000
    HIGH PORTA.2
    PAUSE 10000
    LOW PORTA.2
    PAUSE 2000

    goto main
    Last edited by LEDave; - 12th May 2020 at 22:45. Reason: Gramma mistake

Similar Threads

  1. 18F2520 clock speed ?
    By Gixxer in forum mel PIC BASIC Pro
    Replies: 24
    Last Post: - 21st August 2008, 19:01
  2. code size VS speed optimization setting?
    By Kamikaze47 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 28th April 2008, 14:38
  3. Setting up internal clock correctly?
    By JohnM in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th March 2008, 20:29
  4. Clock Speed
    By Del Tapparo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th November 2007, 02:06
  5. clock speed
    By Armando Herjim in forum General
    Replies: 1
    Last Post: - 30th November 2006, 12:25

Posting Permissions

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