Exploring Pic16F628a...


Results 1 to 12 of 12

Threaded View

  1. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    OK you have come back. Here is the config, add this to the top of your code: @ device pic16F628A, INTRC_OSC_NOCLKOUT, wdt_on, mclr_on, lvp_off, protect_off 'it is correct, and it most likely will fail to compile, because PBP automaticly adds a default config to your code, which will need to be disabled.<br>
    In your PBP root directory there is a file called 16F628A.inc , open it and add a "<font color=red> ;</font color> " where you see them in the code below which is a copy of that file.
    Code:
    ;****************************************************************
    ;*  16F628A.INC                                                 *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2003 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 11/06/03                                        *
    ;*  Version   : 2.45                                            *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            include 'M16F62xA.INC'  ; PM header
            ;device  pic16F628A, xt_osc, wdt_on, mclr_on, lvp_off, protect_off
            XALL
            NOLIST
        else
            LIST
            LIST p = 16F628A, r = dec, w = -302
            INCLUDE "P16F628A.INC"  ; MPASM  Header
            ;__config _XT_OSC & _WDT_ON & _MCLRE_ON & _LVP_OFF & _CP_OFF
            NOLIST
        endif
            LIST
    After doing this it should compile. All this was necessary because you want to use internal OSC instead of a 4 mhz resonator or crystal, which is what the DEFAULT configs are set up for.
    Last edited by Archangel; - 13th October 2008 at 23:58.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

Similar Threads

  1. Instant Interrupts - Revisited
    By Darrel Taylor in forum Code Examples
    Replies: 772
    Last Post: - 17th February 2016, 22:14
  2. Do I need a pause?
    By tazntex in forum Serial
    Replies: 21
    Last Post: - 29th August 2008, 04:32
  3. Help Pic16f628a
    By gadelhas in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 26th August 2008, 23:22
  4. Changing bits in a byte for multiple output
    By tazntex in forum Serial
    Replies: 3
    Last Post: - 11th August 2008, 19:10
  5. Replies: 8
    Last Post: - 22nd July 2008, 20: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