Long start time


Closed Thread
Results 1 to 11 of 11

Thread: Long start time

Hybrid View

  1. #1
    Join Date
    Mar 2007
    Posts
    17


    Did you find this post helpful? Yes | No

    Default More info

    Thanks for the links and info.

    Okay, I read the threads suggested and I'm more confused than before but I believe I have the bits set. I checked by importing the *.asm file into MPLab ver 7.52 and looked at the 'configuration bit' and they are set as I wanted.

    I got this working by modifing the 18f4431.inc file to this:

    ; __CONFIG _CONFIG1H, _OSC_XT_1H
    ; __CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDPS_128_2H
    __CONFIG _CONFIG1H, _OSC_IRCIO_1H
    __CONFIG _CONFIG2H, _WDTEN_OFF_2H & _WDPS_128_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L

    My question now is what is the current way of setting these bits. These threads as ~ a year old and I'm not sure which way to go with the '__config' being replaced by 'CONFIG' so I comment all the '__CONFIG' lines out and added:

    CONFIG OSC=IRC,WDTEN=ON,WDPS=128,LVP=OFF

    Is there a better way to do this? Can I add it to the *.bas file?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ttease View Post
    Thanks for the links and info.

    Okay, I read the threads suggested and I'm more confused than before but I believe I have the bits set. I checked by importing the *.asm file into MPLab ver 7.52 and looked at the 'configuration bit' and they are set as I wanted.

    I got this working by modifing the 18f4431.inc file to this:

    ; __CONFIG _CONFIG1H, _OSC_XT_1H
    ; __CONFIG _CONFIG2H, _WDTEN_ON_2H & _WDPS_128_2H
    __CONFIG _CONFIG1H, _OSC_IRCIO_1H
    __CONFIG _CONFIG2H, _WDTEN_OFF_2H & _WDPS_128_2H
    __CONFIG _CONFIG4L, _LVP_OFF_4L

    My question now is what is the current way of setting these bits. These threads as ~ a year old and I'm not sure which way to go with the '__config' being replaced by 'CONFIG' so I comment all the '__CONFIG' lines out and added:

    CONFIG OSC=IRC,WDTEN=ON,WDPS=128,LVP=OFF

    Is there a better way to do this? Can I add it to the *.bas file?
    You can make those changes 'permanent' by changing the correct .inc file for whatever specific processor you're using. But you have to watch it. If you want something different for that same processor type on a different project, you'll have to change the .inc file again.
    Maybe you could "include" a seperate file that has all of those settings in it...i.e. include "normal.bas" or include "special.bas" and each of those .bas file would have all of you config settings in it, without all of the extra lines to worry about. Then they'd be 'permanent'.

Similar Threads

  1. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 17:45
  2. Hello, long time no post (ADC sample rate)
    By Jhong2 in forum General
    Replies: 0
    Last Post: - 14th April 2009, 05:13
  3. Pic16f84 and RC5 kode
    By terminator in forum Bluetooth
    Replies: 5
    Last Post: - 18th June 2007, 22:40
  4. Replies: 2
    Last Post: - 27th March 2007, 13:48
  5. Using RTC to generate long time delays
    By schlaray in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd January 2007, 01: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