Quote Originally Posted by schu4647 View Post
I agree with Melanie except for the completeness of the PBP manual. I think there are a lot of holes. A couple examples:

1)I posted a question on here about pulsin. Lets say I want to check the pulse length of a high signal. The book doesn't say if it waits for a leading edge, or if it will just start counting when the instruction starts and the pin is high. I never got an answer. I ended up puting an if then statement to start this command when the pin is low.

2)For LCDout you need to put a $FE for commands. The manual does not explain why this is. Someone in here told me that $FE makes the enable bit high while leaving it out lets the enable bit go low.

These are both things that you would have to either find in the manual or have developed PBP to know. I don't think that anyone but MELABS could write a book that explains this.
There's more to these statements than it appears on the surface (and why I applaud anyone that writes a book, does tech support, etc). I see many posts referring to commands from the PBP manual like #1 here, but if you look in the manual they just don't hold up. This is a good example: "The book doesn't say if it waits for a leading edge,"...
Read the first paragraph from the manual (I broke it out into "steps"):
1.) Measures pulse width on Pin (ok, good, that's what we want).
2.) If State is zero (0), the width of a low pulse is measured (measured width placed in Var)
3.) If State is one (1), the width of a high pulse is measured (measured width stored in Var).
4.) If the pulse edge never happens...Var is set to zero (0).
Skipping ahead...
5.) PULSIN normally waits a maximum of 65535 counts before it determines there is no pulse ( which can be adjusted via a DEFINE).

So, the manual does in fact tell you exactly what it is doing. How much more information needs to be contained in the explanation for it to be clear what's going on? Is there a different manual than the one I have (I've bought PBP for myself many years ago, as well as for three different companies I've done consulting work for and got the same manual). Or, as is so often the case, has someone assumed that they "knew" what the command did?

On the second statement about the LCDOUT command I ask (and this kind of goes to what Melanie said) "How much information is enough"? The first paragraph clearly says "PBP supports LCD modules with a Hitachi 44780 controller or equivalent". To me, this means more than RTFM; it means read ALL the data for ALL the components used in a design. I have a copy of the 44780 data sheet and understand what all the commands are doing and why. This goes to what I refer to the current state of "Lego electronics"; plug stuff together and assume it will work. When it doesn't do what you "thought" blame the module, code "example", compiler - everyone but yourself.

No one book is a panacea. No one reference can tell you everything.

Mike Tripoli