PBP Extensions, What are they?


+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2006
    Location
    Toronto
    Posts
    109

    Default PBP Extensions, What are they?

    What is a PBP Extension and how do you create one?

    Is it like a library? If so I have a lot of code I would love to convert to libraries but don't know where to start.

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    I guess this question has been sitting here long enough, I better say something.

    Originally, when mytekcontrols and I asked for this forum, I thought I knew the answer. But I'm not so sure anymore. It seems like just about everything I write anymore qualifies. Perhaps it's just that I'm always writing re-useable code, but it feels like my PBP is not the same as the PBP I bought.

    I have so many more functions available to me now because I write with the intention of not having to do it again. So the next program I write, if I need to do the same thing again, it's already there. Just include it and go.

    But the question now is, have I really extended it, or am I just using the available features that allow re-usable code? Am I really just using PBP the way it was intended from the beginning?

    Let's say I had a way to buffer serial data so that the processor didn't need to twiddle it's thumbs waiting for the USART to send/receive something. Since PBP can't buffer serial data, does this Extend the capabilities of PBP even though you can't use HSERIN anymore? Or, is it just another example of using PBP as intended.

    Now, what if you could tap into the data streams of HSERIN/OUT LCDIN/out etc. and create buffers for them? Would that be an extension, since PBP doesn't allow that to happen normally?

    So I guess it's still a haunting question. PBP Extensions, What are they?
    <br>
    DT

  3. #3
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343

    Default

    Hi Darrel,
    Thought I’d pick up where you left off here.

    Quote Originally Posted by Darrel Taylor
    I have so many more functions available to me now because I write with the intention of not having to do it again. So the next program I write, if I need to do the same thing again, it's already there. Just include it and go.

    But the question now is, have I really extended it, or am I just using the available features that allow re-usable code? Am I really just using PBP the way it was intended from the beginning?
    Nothing has really been added, even though you have portable code usable by PBP. Call them extensions if you want. Or macros. I like “code modules”, since it seems most accurate. Just because someone has portable code snippets in individual files, that can be added to programs using the INCLUDE command, does not mean these are now PBP Extensions. These do not really “ increase the scope, meaning, or application of” PBP. It just means they have efficiently managed their work, and can recycle already produced code easily into new projects. This is “using PBP the way it was intended.”

    Quote Originally Posted by Darrel Taylor
    Let's say I had a way to buffer serial data so that the processor didn't need to twiddle it's thumbs waiting for the USART to send/receive something. Since PBP can't buffer serial data, does this Extend the capabilities of PBP even though you can't use HSERIN anymore? Or, is it just another example of using PBP as intended.
    This, I don't think is really an extension either (in a narrow view of the word), since you are actually using an alternate means to accomplish the task. Could the same code be used apart for PBP? Let's take the case of an assembly interrupt routine to buffer incoming USART. If the guts of this code could be used in any PIC programming software that allowed inline assembly instructions (or just a straight assembly program), and not just PBP, then it has not extended PBP, but actually circumvented it.

    But, in a wink I’d give you this one. These do “ increase the scope, meaning, or application of” PBP. They just do it independent of the original.

    Quote Originally Posted by Darrel Taylor
    Now, what if you could tap into the data streams of HSERIN/OUT LCDIN/out etc. and create buffers for them? Would that be an extension, since PBP doesn't allow that to happen normally?
    This sounds like a true extension of PBP. Without the PBP compiler, the code would mean nothing, since it is based on PBP’s native commands. Also, it takes PBP, and its associated commands, to a higher level of usability with enhanced features and capabilities. This is especially so if the basic commands remain intact, with changes and additions only to accommodate the new features. Also, it should easily integrated into any PBP program.
    This would be really cool!

    JMO FWIW
    Steve

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Thanks for that Steve. It helps to narrow things down a-bit.

    But I'm still not sure about part of it. Take for instance, this program ...

    Run-Time Config
    http://www.picbasic.co.uk/forum/showthread.php?t=4093

    It's completely ASM, can be used with any language. And yet it still extends the capabilities of PicBasic Pro, by allowing it to do things that can't normally be done.

    What do you think? Extension? or no?
    <br>
    DT

  5. #5
    Join Date
    May 2006
    Location
    Del Rio, TX, USA
    Posts
    343

    Default

    Quote Originally Posted by Darrel Taylor
    It's completely ASM, can be used with any language. And yet it still extends the capabilities of PicBasic Pro, by allowing it to do things that can't normally be done.

    What do you think? Extension? or no?
    <br>
    Certianly this gives PBP some extra capabilities. It falls into that hard to define second catagory I mentioned. So let's call it a PBP Extension. It's just not exclusive to PBP. It could easly be an extension for Proton, mikroBasic, and probably any other 2nd level language. Or, to think of it a different way. It is a library of ASM which could also be included in ASM only code.

    Anyway you cut it, it is a nice addition to the resources available to the folks on this forum. Thanks!

    Cheers,
    Steve

  6. #6
    Join Date
    Jan 2005
    Location
    France
    Posts
    93

    Post Include function or not ?

    Hello,
    Are you speaking about the INCLUDE command available in PBP
    (sorry but I am not fluent ...)
    I red the three posts about PBP extension, and I am not sure this is the
    same subject than me !
    question:
    have you a sample code to demontrate the include function ?
    (not using modedefs.bas please !)
    I've tried without succes.
    thanks in advance
    Francois

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Being an INCLUDE file doesn't necessarily make it an Extension. But I feel that any good PBP extension will be in an INCLUDE file.

    If you're looking for examples of using include files, Just about any one of my programs will do.

    Here's a few.

    Instant Interrupts - Revisited
    http://www.picbasic.co.uk/forum/showthread.php?t=3251

    Elapsed Timer Demo
    http://www.picbasic.co.uk/forum/showthread.php?t=190

    LCD BARgraphs
    http://www.picbasic.co.uk/forum/showthread.php?t=2359

    EEPROM Variables (EE_Vars.pbp)
    http://www.picbasic.co.uk/forum/showthread.php?t=2444

    48 level Software Stack
    http://www.picbasic.co.uk/forum/showthread.php?t=151

    Run-Time Config (ASM include)
    http://www.picbasic.co.uk/forum/showthread.php?t=4093

    Here's one from mister_e
    Matrix Keypad routine
    http://www.picbasic.co.uk/forum/showthread.php?t=3250

    Temperature Conversion
    http://www.pbpgroup.com/modules/wfse...p?articleid=18

    ANSI Codes for HyperTerminal
    http://www.pbpgroup.com/modules/wfse...hp?articleid=9

    and many more...
    <br>
    DT

  8. #8
    Join Date
    Jan 2005
    Location
    France
    Posts
    93

    Thumbs up PBP extension and Include story

    Once again I must say
    Many thanks for the outstanding support we have
    Complete, clear and friendly.
    I have made a search forum with INCLUDE argument
    and I got 500 hits .. some of your example are in the result
    May I apologize ... hi ..
    I am in the process of having "basic sub routine" declared
    in Include statement to reduce numbers of lines in my PBP code !
    routine like ADC acquisition, LCD control, setting value on PLL frequency
    Tempo routine, etc ....
    it's an idea, I will try it !

    have a nice week end
    regards,
    Francois

  9. #9
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959

    Default

    Oh yeah, forgot to mention this thread. A little more info on INCLUDEs.

    Making PBP code more modular
    http://www.picbasic.co.uk/forum/show...=include+files

    I got a few laughs reading back through it again.
    Well, at least one of them changed their mind.

    DT

  10. #10

    Default Re: PBP Extensions, What are they?

    gergegegegegeg

  11. #11

    Default Re: PBP Extensions, What are they?


  12. #12
    Join Date
    Jan 2005
    Location
    France
    Posts
    93

    Default Re: PBP Extensions, What are they?

    the answer point to this url
    http://www.picbasic.co.uk/forum/newr...streply&t=3290
    but for me it is blank ?
    thanks

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. PBP Extensions
    By PJALM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th February 2006, 00:42
  5. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts