[Back to Home Page]
PIC Microcontrollers, 50 Projects for Beginners and Experts
- Bert van Dam
- Reviewed 2nd July 2009
About the book
'PIC Microcontrollers 50 Projects for Beginner and Experts' by Bert
van Dam is a book that explains how to use PIC micros to build 50
different projects. First published in 2007 in Dutch it was then translated
into a number of languages including English.
The author contacted me a couple of years back and asked about using my
BTc (Binary time constant PIC sound playback algorithm) in a book he was
writing, which of course was fine by me, and I was delighted recently when
the English translation of the book became available and Bert set me a
Firstly, the mistake!
Bert covers the BTc sound encoding on pages 203-221. However there is fairly
serious mistake in Bert's BTc encoding algorithm on page 206, Section 1.
He scales the original sound waveform at 100%, so that the 8bit sound data
(0-255) is scaled to 0v-5v.
I must accept some blame for this! As my web page in 2006
only covered the encoding algorithm in a fairly sketchy fashion and I
failed to specify the entire encoding process in detail.
At the time I simply assumed that anyone using BTc encoding would just
use my free BTc Encoder Windows software to do the encoding, however
Bert added BTc encoding to his own suite of software that was to be
provided free with the book.
The correct BTc encoding algorithm requires that the original sound
wave is first reduced in amplitude to fit totally within 50% of the full
range. This is an critical step that provides 2 important benefits;
The exponential curve of the encoded wavform is much flatter and
easier to model accurately when it is in the middle 50% of the range.
The BTc encoded waveform will sometimes 'overshoot' the original
waveform, so it is vital to have some spare 'overhead' to contain
the overshoot without distortion.
Two 'workarounds' to fix the mistake
Workaround 1. Simply use my free
BTc Sound encoder software
to do the encoding instead of Bert's encoding software.
Workaround 2. To use Bert's WAVconvert software you can
first reduce the sound amplitude (sound volume) to 50%, using any free
Windows wave editing software like Audacity or CoolWave
etc. These programs allow you
to reduce the 'volume' of the sound to 50% as required, and they also
keep the sound in the centre of the waveform, which is also required.
See the picture; top wave is speech at 100% volume, bottom wave was
converted in Audacity to "-3.0 dB amplification" or to the required
Using either of these two workarounds will enable the BTc sound to
properly model the original sound waveform and will give much better
Now to review the book!
Wow! This book is comprehensive. Although the book title states "for
Beginners and Experts" I expect you will BE an expert by the time you
have completed the projects.
This book is a very nice blend of hobby style "how to build stuff" and
a more professional reference or textbook style. References are clearly
listed at the bottom of each page so you can do further research.
The book itself IS a reference in that it contains schematics, code
examples, IC pinouts, etc. However the friendly hobby style is not
compromised. You can flip the book open anywhere and see simple
easy diagrams and descriptions, ready to start hands-on playing with
Probably the most obvious feature of the book, it covers just about
everything you need to really take control of PIC micros. Even topics
that were proviously in the "expert only" category like; ultrasonic
ranging, DC motor closed loop speed control, recording sound,
using text LCD, external eeprom with i2c, infrared serial comms,
etc are brought firmly into the "you can do it" category with
simple but detailed explanations and clear schematics, diagrams
and code examples. This book really covers it all including
PC comms, tons of sensor types, PIC to PIC comms, clocks, debugging,
motor and lighting PWM, scrolling displays... The list goes on and on.
Ease of use.
Good marks here too. The book starts off with the very basics and
progresses in a logical fashion to more complex projects that each
introduce new hardware and how to connect that hardware to a PIC.
Alongside each project's schematic there is a clear photo showing
that circuit plugged into a hobby style breadboard. This gives
excellent ease of use, and further adaptability as once the reader
has the project assembled and working they can change/add parts
on the plug in breadboard to see what happens.
Every project has a simple easy to understand schematic;
Clear photos show how to connect each project on the breadboard;
But as a first book for beginners?
I don't think this is the best book for absolute PIC beginners.
Despite the author clearly covering PIC basics at the start of the
book, there are many other "PIC beginner" books that are more gentle
and use a lot more pages gradually introducing the concept of
microcontrollers and what other simple electronic parts are etc.
Maybe for an ADULT beginner who can read well and has a
basic knowlege of electronics, this would be a suitable first book.
However I won't criticise Bert for making this decision, for
the same fact that there are so many PIC beginner books it would
have been a waste to "dumb down" this book, when the pages could
(and were) utilised much better to provide a wealth of excellent
projects that are not found in other simpler books. If you were
only ever to buy ONE PIC book, make it this one.
Value for money.
Well since I didn't pay for my copy of the book this may not be a
fair evaluation, but if I evalutate the book on amount of content
it is excellent. Almost 450 pages, crammed full with small print
and tons of diagrams. Not like some books that have 200 pages and big
print and huge white margins to fill up space... Value in terms
of the quality of content is also very high. It doesn't miss
anything that you need, and it doesn't cover silly things that
are obsolete or that nobody wants to know. The things that are
covered have been covered well, I don't think you will need to
go reaching for the internet too often when working through
the projects. There is additonal value for money provided in
the many PC tools also provided to support to the book and allow
you to connect your PIC project to your PC. I have to give it an
excellent mark for value.
Clear diagrams show how to use the many free PC support
software tools provided;
The examples in the book are in a popular PIC language called
JAL (Just Another Language!) a free and well supported PIC language
created by Wouter van Ooijen. It is a simple easy to use language which
is basically a simplified version of the very popular language C.
The code examples are short and easy to understand. Where the
code for a project is a little longer, the author explains it first
in simple "snippets" of code, then connects all the pieces at the end
of the project to complete it. This is very well done. If the
reader is already a C user, the JAL code is very easily converted
to C. Otherwise JAL looks to be a good functional first language
for a beginner to learn, and the reader will find it easy to move
on to C language at a later date (if they choose).
Even someone with no coding experience will find it easy to understand
JAL code snippets like this (which toggles a LED on/off whenever the
switch is pressed);
if switch then
led = ! led
Faults of the book.
Well there are not many. It's one great fault is that it is really too
comprehensive! With so many cool projects using so many peripheral
devices it might be a little overwhelming at first, although that is
generally negated by the logical practical style of the book which
progresses in difficulty as the reader completes each new project.
I think a more descriptive title may have been '50 Projects from
Intermediate to Expert' as the book is a little heavy for an
ABSOLUTE beginner, especially of school age.
The breadboard pictures (showing how to connect parts) are an excellent
concept, but they are a little small and can be difficut to see well.
On many pages there is room to have enlarged the pictures 20% or 30%
which I think would have been well worth it.
The Contents page is well written and in logical sequence, but does not
explain the full scope of the projects. Project names are very simple
and do not do justice to the projects, for example;
5.2 Dark activated switch, 8.4 Tilt sensor.
I think it would have been a good idea to add a one sentence description
under each project title stating what peripherals/sensors etc are
used in that project. This would be well worth the extra 2 or 3 pages
required for a larger contents section.
Well to be honest I WANTED to like this book, because I knew Bert had
included some of my work. But when I received the book one glance made
it very obvious that any personal desires were completely irrelevant.
The book stands squarely on its own two well grounded feet. It is
massive in content, truly a step above most PIC books. Everything is
clearly explained. If you want to "really get you teeth into" PICs this
is the one book you need.
The book can be purchased from the publishers;
And is also available from
- end -
[Back to Home Page]