Programming Arduino Projects with the PIC Microcontroller: A Line-By-Line Code Analysis and Complete Reference Guide for Embedded Programming in C » książka
This chapter will set up the basics and cover the following:
• What is a microcontroller
• What are the main differences between the Arduino and the PIC
• What are the aims and objectives of this book
• How the book will work
Each chapter looks at a different Arduino project creating a practical circuit built of vero board with the full program listing.
Each program will have a full line by line analysis of all new instructions detailing how they work and what they are doing.
Chapter 2: What You Will Need
• What you will need to use the book, such as a minimal approach; where the reader can just try the programming at no cost by simulation within MPLABX. Then use an inexpensive PIC programming option at around £30 to a full prototype board costing from around £70 to £150.
• An introduction to MPLABX as to what it is and how you create a project and simulate a simple program.
Chapter 3: Our First Programs
• We start with the first projects: Flashing a simple LED
• Running a simple seven segment display.
• As we write these programs we will look at creating our first header file for the configuration words.
• As we use new instructions; as this is the first program all the instructions will be new, we explain how the instructions work and how they can be used to achieve what we want.
• We will look at building the circuit on vero board by drawing the circuit diagram , the vero board plan what components and how they work and how to solder them.
Chapter 4: The 7 Segment Display and the 8by8 Matrix Display
• This will look at the next two projects: The 4 seven segment display & 8by8 Matrix Display
• This will mean we will look at the ADC module how it works and how we use it. Also we will look at the LCD with a full explanation of how it works and how we use it. We will also make our second header file for the LCD. We will also look at arrays and how we can use them.
Chapter 5: The Joystick Controller, The Ultrasonic and PIR Sensors
• This will look at two more projects: the Joystick control and the Ultrasonic and PIR Sensors
• The stepper motor linking that with the joystick control.
• The ultrasonic sensor linking it with the buzzer.
Chapter 6: The Servo Motor and The Rotary Encoder
This will look at three more projects
• The servo motor
• The rotary encoder.
• The RGB led
• This will look at PWM as to how we can use it to create a square wave and the compare aspect of the CCP module.
Chapter 7: Interrupts and a RTC and The DS1307 RTC Module
• This will look at a real time clock using interrupts and an external crystal. It will then look at the DS1307 RTC Module.
• This will explain what interrupts are and how they work and how we can use them.
Chapter 8: The DHT11 Humidity and Temperature Sensor and SPI and I2C Communication
• This will look at the DHT11 humidity and temperature sensor. It will also look at the TC72 and TC74 temperature sensors.
• This will look at SPI and I2C comms.
Chapter 9: The USART and Bluetooth Communication With HC-06 Module
• This will look at the USART in the PIC. How they work and how they can be used. This will move onto how we can use the HC-06 bluetooth module to send the temperature readings from the TC72 and TC74 to your mobile phone.
Chapter 10: DC Motors and Using a Keypad
• This will look at the DC motor and fan.
• It will also look at a 3 by 4 keypad and the 4 by 4 membrane keypad.
Chapter 11: Understanding Those Obscure C Instructions and Logic Operators
• This will look at some of the more obscure C program and a full range of logic instructions. This will use the simulation aspect of the MPLABX software to test and prove how the instructions work.
Hubert Ward has been a college lecturer since 1993 and over 24 years experience teaching at the Higher National Certificate and The Higher Diploma in Electrical & Electronic Engineering. Hubert has also spent time as a consultant in embedded programming in assembler language and C and was the UK technical expert in Mechatronics where he trained the UK team for the Skills Olympics in Seoul 2001. Hubert Ward is also happily married to his wife Ann and with whom he has two wonderful children, Claire and Vincent.
Now that you’ve built a few Arduino projects, and reused some pre-written sketches, it’s time to move on to the next step and explore the world of embedded programming. To truly up-skill, you'll need to understand how your code works, and that's where this book comes in.
You'll review and work with several Arduino projects plus two extra ones written for a PIC microcontroller. Each one is accompanied with a basic circuit diagram and photos of the program working. Ideal for the Arduino hobbyist and PIC programmers who want to merge their skills, this comprehensive book will go over every aspect of the 8-bit microcontroller, provide line-by-line analysis of the code, and in the end, show you how to bring your Arduino projects to the PIC microcontroller using C. You'll gain a full understanding of how the C instructions work and can be used with the PIC microcontroller.
Programming Arduino Projects with the PIC Microcontroller is your one-stop reference resource.
You will:
Examine how the code works
Create code to perform any function
Build practical projects on vero boards with full vero plans and circuit diagrams
Understand how programs work by simulation with an ECAD package