Experimenting with PICs and Power - using BSPWA
The PICs and Power training course is centred around the book "Experimenting with PICs and Power using BSPWA". This book assumes you already have a basic understanding of PIC programming. If you are a complete beginner the ideal place to start is with our P928-X or P931 training course.
With the PICs and Power course as you have already passed the beginner's stage it is not necessary to type in all the programme text. BSPWA includes a selectable library which is an intigral part of the assembler. We start our study in chapter 2 by selecting the appropriate library text to create a programme to write a string of text to the LCD. We then expand this programme to use the keypad to write numbers to the LCD. The Brunning Software BSPWA PIC assembler includes a simulated LCD and a simulated keypad so we are able to study the action of each instruction by single stepping the code. Once we have the general idea of the process we write the code into a PIC and test the programme in the P&P circuit.
In chapter 3 we learn the importance of the latest XLP 16F PICs by studying the differences between the XLP PICs (PIC16F1827 and PIC16F1936) and the original PICs (PIC16F84, PIC16F627A, and PIC16F88). In chapter 4 we revise the hardware timers, and in chapter 5 the oscillators.
In chapter 6 we change to using the second generation of 18F PICs. (The series before XLP). We flash the LEDs and write to the LCD so that we understand the similarity between 16F and 18F PICs. We finish the chapter by studying the RAM arrangement of 18F PICs ready to expand the ideas when we use the XLP 18F PICs. In chapters 7, 8 and 9 we study the memory requirement of XLP 18F PICs, the timers, interrupts, and the ADC.
In chapter 10 we learn how to wire high current MOSFETs to any PIC old or new so that a high current load such as a motor can be controlled by the PIC. We study single ended N and P MOSFET circuits, complementary outputs, and bridge circuits. We then type in programme text to put the circuits to use. We start with a speed controller for a 16F XLP PIC. We use the PICs comparator to monitor the open circuit emf of the motor so that we can control the speed while maintaining the ability to connect full supply to the motor if the speed drops. We modify the programme text to run in an 18F XLP PIC then we experiment with a motor reversing circuit using a MOSFET bridge circuit.
In chapter 11 we study the control of stepper motors from first principles. We examine the simple 4 MOSFET open drain circuit needed to control 6 lead stepper motors and compare this to the full bridge circuit used with 4 lead stepper motors. We then study the simple programme text needed to create single step movement. We learn that acceleration and deceleration are needed to ensure accurate movement of the stepper motor. The full stepper motor control experimental programme text runs on for 10 pages so we load this from the CD, wire a stepper motor to the P&P circuit, and experiment with various acceleration parameters. For these experiments we use the keypad to enter the control data.
At the end of chapter 11 we study how to use a PC to control the stepper motor. The programme for the PC (note PC not PIC) is written in Visual C#. This is a small part of the book which can only be attempted if you have some previous knowledge of Visual C#. (Note: The Brunning Software PH28-X training course includes training in Visual C#). The Visual C# section is easy to write but should be skipped over if you have never used Visual C#.
In the final chapter of the book we study microstepping from first principles.
This book is wirobound to open flat, 240mm x 170mm, 190 pages.