Pic16f88


Closed Thread
Results 1 to 9 of 9

Thread: Pic16f88

  1. #1

    Lightbulb Pic16f88

    TRYING TO USE THE INTERNAL OSC ON THIS CHIP

    ANYONE KNOW THE CORECT SYNTAX?
    DEVICE pic16F88, INTRC_OSC_NOCLKOUT

    DOES NOT WORK

    THANKS

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jcleaver View Post
    TRYING TO USE THE INTERNAL OSC ON THIS CHIP

    ANYONE KNOW THE CORECT SYNTAX?
    DEVICE pic16F88, INTRC_OSC_NOCLKOUT

    DOES NOT WORK

    THANKS
    If you can't get it to work internally, then at least try to get it to work with an external clock. Then work towards getting the internal to work. It might be somehow stuck on one of the lower speeds (32khz or whatever) and you're not waiting long enough.
    Write a 'blink the led' code...make it work on the external, then switch...see what happens...

  3. #3
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Default

    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  4. #4
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default PIC16F88 fuse settings syntax

    These are the settings I use everyday:
    Code:
    ' Oscillator
    ' EXTRC_OSC_CLKOUT, EXTRC_OSC_NOCLKOUT, EXTRC_OSC, INTRC_OSC_CLKOUT
    ' INTRC_OSC_NOCLKOUT, INTRC_OSC, EXTCLK_OSC, EC_OSC, HS_OSC, XT_OSC, LP_OSC
    @ DEVICE PIC16F88, INTRC_OSC_NOCLKOUT
    
    ' Program Code Protection
    ' Set to PROTECT_OFF for Development Copy
    ' Set to PROTECT_ON for Release Copy
    @ DEVICE PIC16F88, PROTECT_OFF
    
    ' Watchdog Timer
    @ DEVICE PIC16F88, WDT_ON
    
    ' Power-On Timer
    @ DEVICE PIC16F88, PWRT_ON
    
    ' Master Clear Options (Internal)
    @ DEVICE PIC16F88, MCLR_ON 
    
    ' Brown-Out Detect
    @ DEVICE PIC16F88, BOD_ON
    
    ' Low-Voltage Programming
    ' If set to ON, RB3 is no longer available!!! see d.-s.
    @ DEVICE PIC16F88, LVP_OFF
    
    ' Data Memory Code Protect
    ' Set to CPD_OFF for Development Copy
    ' Set to CPD_ON for Release Copy
    @ DEVICE PIC16F88, CPD_OFF
    
    ' DEBUGGER
    @ DEVICE PIC16F88, DEBUG_OFF
    
    ' CCPM1 choice: 
    ' Set OFF for function on RB0 (default)
    ' Set ON for function on RB3
    @ DEVICE PIC16F88, CCPMX_OFF
    Fuses ending with "ON" or "OFF" can be set vice-versa.
    Roger

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I use this on my 'F88 program and it works without any problem.

    OSCCON = $60 'set int osc to 4mhz
    ANSEL = 0 'ANALOG INPUTS ALL DIGITAL
    ADCON0 = 0 'AD MODULE OFF
    CMCON = 7 'COMPARATORS OFF
    @ DEVICE MCLR_OFF, INTRC_OSC, WDT_ON, LVP_OFF, BOD_OFF, PWRT_ON, PROTECT_ON

  6. #6


    Did you find this post helpful? Yes | No

    Default additional info

    pic works fine with external osc

    still having issues with internal pic manual seem to indicate it has 2 internal osc commands and three osc speed with 8 the defualt but does not list the
    commands

    1. LP Low-Power Crystal
    2. XT Crystal/Resonator
    3. HS High-Speed Crystal/Resonator
    4. RC External Resistor/Capacitor with
    FOSC/4 output on RA6
    5. RCIO External Resistor/Capacitor with
    I/O on RA6
    6. INTIO1 Internal Oscillator with FOSC/4
    output on RA6 and I/O on RA7
    7. INTIO2 Internal Oscillator with I/O on RA6
    and RA7
    8. ECIO External Clock with I/O on RA6

    4.5 Internal Oscillator Block
    The PIC16F87/88 devices include an internal oscillator
    block which generates two different clock signals;
    either can be used as the system’s clock source. This
    can eliminate the need for external oscillator circuits on
    the OSC1 and/or OSC2 pins.
    The main output (INTOSC) is an 8 MHz clock source
    which can be used to directly drive the system clock. It
    also drives the INTOSC postscaler which can provide a
    range of six clock frequencies from 125 kHz to 4 MHz.
    The other clock source is the internal RC oscillator
    (INTRC) which provides a 31.25 kHz (32 µs nominal
    period) output. The INTRC oscillator is enabled by
    selecting the INTRC as the system clock source or
    when any of the following are enabled:
    • Power-up Timer
    • Watchdog Timer
    • Two-Speed Start-up
    • Fail-Safe Clock Monitor

    seems to have somethjing to do with the " fosc : " seting but have never seen this used


    also i want to use the internal ad convertor

    thanks for any help
    Last edited by jcleaver; - 28th March 2007 at 16:16.

  7. #7
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default OSCCON register

    Look at the OSCCON register (it's in your post!).

    You'll be able to select the desired frequency.
    Roger

  8. #8
    Join Date
    Apr 2006
    Location
    New Hampshire USA
    Posts
    298


    Did you find this post helpful? Yes | No

    Wink the OSCCON register

    See if this forum thread helps.
    http://www.picbasic.co.uk/forum/showthread.php?p=15901

    -Adam-
    Ohm it's not just a good idea... it's the LAW !

  9. #9
    Join Date
    Aug 2006
    Location
    SWITZERLAND (french speaking)
    Posts
    938


    Did you find this post helpful? Yes | No

    Default

    TRYING TO USE THE INTERNAL OSC ON THIS CHIP

    ANYONE KNOW THE CORECT SYNTAX?
    DEVICE pic16F88, INTRC_OSC_NOCLKOUT

    DOES NOT WORK

    THANKS
    You're absolutely right, it won't work as you wrote it.

    1) you must state the "@" in front of the word "DEVICE...";

    2) show you code; if you need some help, give some valuable info;

    3) SHOUTING never helps... and isn't motivating others to help you;

    4) here is a complete fuse initialisation - don't edit, just copy/paste it because this works!!!. It is not the shortest example but, at least, you can see every fuse declaration separately.
    Code:
    @ DEVICE PIC16F88,INTRC_OSC_NOCLKOUT
    @ DEVICE PIC16F88,PROTECT_OFF
    @ DEVICE PIC16F88,WDT_OFF
    @ DEVICE PIC16F88,PWRT_ON
    @ DEVICE PIC16F88,MCLR_ON
    @ DEVICE PIC16F88,BOD_OFF
    @ DEVICE PIC16F88,LVP_OFF
    @ DEVICE PIC16F88,CPD_OFF
    @ DEVICE PIC16F88,DEBUG_OFF
    @ DEVICE PIC16F88,CCPMX_OFF
    If you then want your PIC to work at 4MHz, add this:
    Code:
    OSCCON = %01100000  '4MHz
    The advantage of SHOUTING is that some people can take their glasses off to read this post
    Roger

Similar Threads

  1. RX TX modules - intermitent communication
    By ruijc in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 11th June 2009, 00:13
  2. pic16f88 & voltage
    By rdxbam in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th February 2009, 09:14
  3. Ghange code from PIC16F877A to PIC16F88
    By savnik in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 12th March 2008, 16:09
  4. Replies: 8
    Last Post: - 7th December 2006, 15:42
  5. PIC16F88 problem with TOGGLE command?
    By russman613 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 17th September 2006, 23:31

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