Resources used py PBP?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72

    Default Resources used py PBP?

    Hi all,

    What PIC hardware resources are used by PBP? Do I have all the Timers available to use? Or is one of them already used by the compiler library functions for things like "Pause"?

    Bottom line...can I freely use Timer0, Timer1 and Timer2 without affecting internal operations of the compiler?

    thanks (couldn't find this in the manual, though someone will surely point it out)

    Jim

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    PICBasic uses NO Hardware features of the PIC (besides Stack, RAM and Codespace of course) with a few exceptions...

    ADCIN will use the A/D Converters
    HSERIN and HSEROUT will use the USART
    HPWM will use the CCP Modules and note that TMR2 is usually associated with timing those (but best check the Datasheet for your PIC)
    The USB Commands will use the USB Module

    otherwise all the TIMERS. SPI module, Comparators, OP-Amps are free for your use. Naturally if you don't use those Hardware Commands of PICBasic then those PIC features are free to be driven by you howsoever you please. PAUSE (since you mentioned it) is a software timer.

  3. #3
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    Thanks for the quick response! That's a huge relief. Now I can really get down to debugging my code ;-)

    regards,
    Jim

  4. #4
    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    237


    Did you find this post helpful? Yes | No

    Post

    In the good old days, PBP assigned and needed the TMR0/WDT prescaler to be assigned to WDT and set to the longest timeoutperiod. My guess is that this is still true. You could run into problems if you assign the prescaler to TMR0 (and run the pic at low speeds). No problem to use TMR0 without the prescaler.

  5. #5
    Join Date
    Sep 2005
    Location
    Dayton, Ohio
    Posts
    72


    Did you find this post helpful? Yes | No

    Default

    I usually turn the WDT off anyway in most of my projects. But I DO need to use the prescaler with TMR0 for the current project.

    You'd think these things would be spelled out more clearly in the manual to avoid confusion. But then the manual does leave alot to be desired overall.
    Last edited by milestag; - 20th September 2005 at 12:34.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. Extensions to PBP variables
    By John_Mac in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd October 2009, 05:21
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16

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