How to check oscillator frequency


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Mr.E,

    I tried to put those asm lines, and got error messages :
    Error 118 bla,bla,bla : Overwriting previous address content

    But my problem is solved just by adding : define OSC 8

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Yeah, but it seems you didn't read the first link i sent?

    Read it (from post #1 to at least #5), and you'll know why it happen, and how to solve it.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Hi Steve,

    I did read the posts and "still" try to understand it.
    I forgot to mention that I use MPASM 5.03 assembler, because PM does not have inc file for 18F4431 ( or does it ? )

    Melanie said :
    3.b. When using Microchip's (MPASM) Assembler

    If you're going to use MPASM, look for the appropriate file (example for a 16F628 look for P16F628.INC) located in something like the MCHIP_Tools subdirectory of your MPLAB installation. Here you’ll find the Configuration Bits located near the bottom of the list. Simply just use the ones you want. Hey presto your PIC is all defined and ready to run.

    But how ? I am new to PBP, please help


    Thanks,

    Johan

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Johan View Post
    I did read the posts and "still" try to understand it.
    Old version. Latest is 5.11. Download MPLAB IDE v 7.61 (maybe 7.62 by now)

    I forgot to mention that I use MPASM 5.03 assembler, because PM does not have inc file for 18F4431 ( or does it ? )
    PM does NOT support 18Fxxxx.

    Melanie said :
    3.b. When using Microchip's (MPASM) Assembler
    If you're going to use MPASM, look for the appropriate file (example for a 16F628 look for P16F628.INC) located in something like the MCHIP_Tools subdirectory of your MPLAB installation. Here you’ll find the Configuration Bits located near the bottom of the list. Simply just use the ones you want. Hey presto your PIC is all defined and ready to run.
    But how ? I am new to PBP, please help
    Edit the file using WORDPAD, NOTEPAD, or any other pad you can find, comment out the config bits you're NOT wanting and un-comment the rest.

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Wink

    http://www.picbasic.co.uk/forum/showthread.php?t=543
    <body onload="setInterval('blinkIt()',1000)">

    <script type="text/javascript">
    function blinkIt() {
    if (!document.all) return;
    else {
    for(i=0;i<document.all.tags('blink').length;i++){
    s=document.all.tags('blink')[i];
    s.style.visibility=(s.style.visibility=='visible') ?'hidden':'visible';
    }
    }
    }
    </script>

    <blink>POST #5</blink>
    http://www.picbasic.co.uk/forum/show...75&postcount=5

    Code:
    ;****************************************************************
    ;*  18F4431.INC                                                 *
    ;*                                                              *
    ;*  By        : Leonard Zerman, Jeff Schmoyer                   *
    ;*  Notice    : Copyright (c) 2006 microEngineering Labs, Inc.  *
    ;*              All Rights Reserved                             *
    ;*  Date      : 06/05/06                                        *
    ;*  Version   : 2.47                                            *
    ;*  Notes     :                                                 *
    ;****************************************************************
            NOLIST
        ifdef PM_USED
            LIST
            "Error: PM does not support this device.  Use MPASM."
            NOLIST
        else
            LIST
            LIST p = 18F4431, r = dec, w = -311, w = -230, f = inhx32
            INCLUDE "P18F4431.INC"  ; MPASM  Header
    <BLINK>        ;__CONFIG    _CONFIG1H, _OSC_XT_1H
            ;__CONFIG    _CONFIG2H, _WDTEN_ON_2H & _WDPS_512_2H
            ;__CONFIG    _CONFIG4L, _LVP_OFF_4L</BLINK>
            NOLIST
        endif
            LIST
    EEPROM_START	EQU	0F00000h
    BLOCK_SIZE	EQU	8
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    Join Date
    Jun 2007
    Posts
    56


    Did you find this post helpful? Yes | No

    Default

    Mr. E,
    This is really confusing

    I dont have 18F4431.INC on my PBP folder that you suggested to modify :
    http://www.picbasic.co.uk/forum/show...75&postcount=5

    But I can find 18F4431.INC on MPASM directory
    Shall I copy & paste INC file from MPASM directory to PBP directory and edit it ?

    Skimask: I have installed the new MPASM as you suggested\


    Johan

  7. #7
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Sure you MUST have that file in the C:\PBP folder unless it wouldn't compile at all. Unfortunately, the one in MPASM Suite folder won't help. The one in MPASM folder DEFINE the PIC registers, Bits, Configuration bits etc etc etc. But, you could still create one using the one i posted above and save it to C:\PBP folder.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

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. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07
  3. PIC16F877A - Timer0 won't interrupt
    By WishMaster^ in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 25th April 2007, 09:25
  4. Code check -- button not working
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 2nd March 2006, 23:43
  5. Even Parity Check, How?
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 24th January 2005, 10:21

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