View Full Version : PBP Extensions, What are they?
PJALM
- 12th February 2006, 07:57
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.
Darrel Taylor
- 8th May 2006, 08:04
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>
SteveB
- 16th June 2006, 22:29
Hi Darrel,
Thought I’d pick up where you left off here.
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.”
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.
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
Darrel Taylor
- 18th June 2006, 07:01
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>
SteveB
- 18th June 2006, 07:31
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. :D Thanks!
Cheers,
Steve
F1CHF
- 11th August 2006, 23:19
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
Darrel Taylor
- 12th August 2006, 04:38
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/wfsection/article.php?articleid=18
ANSI Codes for HyperTerminal
http://www.pbpgroup.com/modules/wfsection/article.php?articleid=9
and many more...
<br>
F1CHF
- 12th August 2006, 09:51
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
Darrel Taylor
- 12th August 2006, 22:03
Oh yeah, forgot to mention this thread. A little more info on INCLUDEs.
Making PBP code more modular
http://www.picbasic.co.uk/forum/showthread.php?t=2108&highlight=include+files
I got a few laughs reading back through it again. :)
Well, at least one of them changed their mind.
DT
F1CHF
- 28th September 2021, 12:26
the answer point to this url
http://www.picbasic.co.uk/forum/newreply.php?do=postreply&t=3290
but for me it is blank ?
thanks
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.