In this book the author presents all essential aspects of microcontroller programming, without overloading the reader with unnecessary or quasi-relevant bits of information. Having read the book, you should be able to understand as well as program, 8-bit microcontrollers.The introduction to microcontroller programming is worked out using microcontrollers from the PIC series. Not exactly state-of-the-art with just 8 bits, the PIC micro has the advantage of being easy to comprehend. It is offered in a DIP enclosure, widely available and not overly complex. The entire datasheet of the PIC micro is shorter by decades than the description of the architecture outlining the processor section of an advanced microcontroller. Simplicity has its advantages here. Having mastered the fundamental operation of a microcontroller, you can easily enter into the realms of advanced softcores later.Having placed assembly code as the executive programming language in the foreground in the first part of the book, the author reaches a deeper level with ‘C’ in the second part. Cheerfully alongside the official subject matter, the book presents tips & tricks, interesting measurement technology, practical aspects of microcontroller programming, as well as hands-on options for easier working, debugging and faultfinding.
In this book the author presents all essential aspects of microcontroller programming, without overloading the reader with unnecessary or quasi-relevant bits of information. Having read the book, you should be able to understand as well as program, 8-bit microcontrollers.
The introduction to microcontroller programming is worked out using microcontrollers from the PIC series. Not exactly state-of-the-art with just 8 bits, the PIC micro has the advantage of being easy to comprehend. It is offered in a DIP enclosure, widely available and not overly complex. The entire datasheet of the PIC micro is shorter by decades than the description of the architecture outlining the processor section of an advanced microcontroller. Simplicity has its advantages here. Having mastered the fundamental operation of a microcontroller, you can easily enter into the realms of advanced softcores later.
Having placed assembly code as the executive programming language in the foreground in the first part of the book, the author reaches a deeper level with ‘C’ in the second part. Cheerfully alongside the official subject matter, the book presents tips & tricks, interesting measurement technology, practical aspects of microcontroller programming, as well as hands-on options for easier working, debugging and faultfinding.
in 10 captivating lessons
Using the lessons in this book you learn how to program a microcontroller. You’ll be using JAL, a free but extremely powerful programming language for PIC microcontrollers, which enjoys great popularity in the hobby world. Starting out from scratch virtually, you slowly build up the knowledge. No previous knowledge is needed: anyone can get started with this book. Assuming you have absorbed all lessons – meaning you have actually completed all the exercises – you should be confident to write PIC microcontroller programs, as well as read and understand programs written by other people.
JAL commands
You learn the function of JAL commands such as include, pin, delay, forever loop, while loop, case, exit loop, repeat until, if then, as well as the use of functions, procedures and timer- and port interrupts.
JAL programs
You make an LED blink, build a time switch, measure a potentiometer’s wiper position, produce sounds, suppress contact bounce, and control the brightness of an LED. And of course you learn to debug, meaning: how to spot and fix errors in your programs.
Hardware
You learn to recognize various components including the PIC microcontroller, potentiometer and quartz crystal, and how to wire up a PIC microcontroller and effectively link it to your PC. A breadboard is used for the purpose, allowing you to easily modify the component arrangement for further experimenting.
The companion software with this book can be downloaded free of charge, including the JAL programming language. In addition, you may order a kit of parts so you don’t have to go shopping for the required components. Especially for a beginner, this is the easiest way to start with this unique pastime.
Having finished this book does not mean you are through with your pastime. You can get your hands dirty again, and if desired use other books packed with fun projects using the JAL programming language. More information may be found at the end of the lessons in the chapter "Done! What’s next?""
This book contains 50 fun and exciting projects for PIC microcontrollers such as a laser alarm, USB teasing mouse, eggtimer, youth repellent, soundswitch, capacitive liquid level gauge, 'finger in the water' sensor, guarding a room using a camera, mains light dimmer (110-240 volts), talking microcontroller and much more. Several different techniques are discussed such as relay, alternating current control including mains, I²C, SPI, RS232, USB, pulse width modulation, rotary encoder, interrupts, infrared, analog-digital conversion (and the other way around), 7-segment display and even CAN bus.
You can use this book to build the projects for your own use. The clear explanations, schematics and even pictures of each project make this a fun activity. For each project the theory is discussed and why the project has been executed in that particular way. That means you can also use this book as a studybook, or as basis for larger and more complicated projects. All projects use a breadboard so modification and expansion is easy.
Three PIC microcontrollers are used, the 16f877A, 18f4455 and 18f4685. It is also discussed how you can migrate your project from one microcontroller to another – 15 types are supported - including two example projects.
All software that is used in this book can be downloaded for free. That also applies to the open source programming language JAL. This powerful and yet easy to learn language is used by hobbyists as well as professionals.
This book can also be used as a reference guide. It explains all JAL commands, as well as the expansion libraries. Using the index you can easily find example projects that illustrate the use of these commands. Even when you have built all projects in this book you will still want to keep it within arm's reach.
The software simulation of gauges, control-knobs, meters and indicators which behave just like real hardware components on a PC’s screen is known as virtual instrumentation.
In this book, the Delphi program is used to create these mimics and PIC based external sensors are connected via a USB/RS232 converter communication link to a PC.
Detailed case studies in this Book include a virtual compass displayed on the PC’s screen, a virtual digital storage oscilloscope, virtual -50 to +125 degree C thermometer, and FFT sound analyser, a joystick mouse and many examples detailing virtual instrumentation Delphi components. Arizona’s embedded microcontrollers – the PIC's are used in the projects and include PIC16F84A, PIC16C71, DSPIC30F6012A, PIC16F877, PIC12F629 and the PIC16F887. Much use is made of Microchip’s 44 pin development board (a virtual instrument ‘engine)’, equipped with a PIC16F887 with an onboard potentiometer in conjunction with the PIC’s ADC to simulate the generation of a variable voltage from a sensor/transducer, a UART to enable PC RS232 communications and a bank of 8 LED's to monitor received data is also equipped with an ISP connector to which the ‘PICKIT 2’ programmer may easily be connected.
Full source code examples are provided both for several different PIC’s, both in assembler and C, together with the Pascal code for the Delphi programs which use different 3rd party Delphi virtual components.
The newcomer to Microchip’s PIC microcontrollers invariably gets an LED to flash as their first attempt to master this technology. You can use just a simple LED indicator in order to show that your initial attempt is working, which will give you confidence to move forward. This is how the book begins — simple programs to flash LEDs, and eventually by stages to use other display indicators such as the 7-segment display, alphanumeric liquid crystal displays and eventually a colour graphic LCD.
As the reader progresses through the book, bigger and upgraded PIC chips are introduced, with full circuit diagrams and source code, both in assembler and C.
In addition, a small tutorial is included using the MPLAB programming environment, together with the EAGLE schematic and PCB design package to enable readers to create their own designs using the book’s many case studies as working examples to work from.
Note: NodeMCU is the name of both a firmware and a boardNodeMCU is an open source IoT platform, whose firmware runs on Espressif's SoC Wi-Fi ESP8266, based on the ESP8266 nonOS SDK. Its hardware is based on the ESP-12 module. The scripting language is Lua which allows to use many open source projects like lua-cjson and spiffs. Features Wi-Fi Module – ESP-12E module similar to ESP-12 module but with 6 extra GPIOs. USB – micro USB port for power, programming and debugging Headers – 2x 2.54 mm 15-pin header with access to GPIOs, SPI, UART, ADC, and power pins Reset & Flash buttons Power: 5V via micro USB port Dimensions: 49 x 24.5 x 13 mm
Analogue Electronics and Microcontrollers ProjectsHobbyist electronics can be a fun way to learn new skills that can be helpful to your career. Those who understand the basics of electronics can design their own circuits and projects. However, before you run, you need to learn to walk.It all starts with analogue electronics. You should be familiar with the simple components and circuits and understand their basic behaviors and the issues you may encounter. The best way to do this is through real experiments. Theory alone is not enough. This book offers a large number of practical entry-level circuits, with which everyone can gain the basic experience.Through the widespread introduction of microcontrollers, a new chapter in electronics has begun. Microcontrollers are now performing more and more tasks that were originally solved using discrete components and conventional ICs. Starting out has become easier and easier thanks to platforms including Bascom, Arduino, micro:bit. The book introduces numerous manageable microcontroller applications. It’s now a case of less soldering and more programming.
Microcontrollers have become an indispensable part of modern electronics. They make things possible that vastly exceed what could be done previously. Innumerable applications show that almost nothing is impossible.
There’s thus every reason to learn more about them, but that raises the question of where to find a good introduction to this fascinating technology. The answer is easy: this Microcontroller Basics book, combined with the 89S8252 Flash Board project published by Elektor Electronics.
However, this book offers more than just a basic introduction. It clearly explains the technology using various microcontroller circuits and programs written in several different programming languages. Three microcontrollers from the 8051 family are used in the sample applications, ranging from the simple 89C2051 to the AN2131, which is designed to support USB applications. The programming tools include assemblers, Basic-52 and BASCOM-51, and several C compilers. Every reader can thus find the programming environment most suitable to his or her needs.
In the course of the book, the reader gradually develops increased competence in converting his or her ideas into microcontroller circuitry. All of the sample programs can be downloaded from the Elektor Electronics website or the author’s website. That has the added advantage that the latest versions are always available.
SwiftIO offers a full Swift compiler and framework environment that runs on the microcontroller. The SwiftIO board is a compact electronic circuit board that runs Swift on the bare metal, giving you a system that can be used to control all kinds of electronic projects.
Features
NXP i.MX RT1052 Crossover Processor with ARM Cortex-M7 core @ 600 MHz
8 MB SPI Flash, 32 MB SDRAM
On-board DAPLink debugger
On-board USB to UART for serial communication
On-board RGB LED
On-board SD socket
46x GPIO, 12x ADC, 14x PWM, 4x UART, 2x I²C, 2x SPI etc.
Many additional advanced features to meet the needs of advanced users
Zephyr RTOS support
MadMachine IDE is the premier integrated development environment for SwiftIO, which makes it easy to write Swift code and download it to the board.
AVR Architecture and Programming An in-depth look at the 8-bit AVR architecture found in ATtiny and ATmega microcontrollers, mainly from a software and programming point of view. Explore the AVR architecture using C and assembly language in Microchip Studio (formerly Atmel Studio) with ATtiny microcontrollers. Learn the details of how AVR microcontrollers work internally, including the internal registers and memory map of ATtiny devices. Program ATtiny microcontrollers using an Atmel-ICE programmer/debugger, or use a cheap hobby programmer, or even an Arduino Uno as a programmer. Most code examples can be run using the Microchip Studio AVR simulator. Learn to write programs for ATtiny microcontrollers in assembly language. See how assembly language is converted to machine code instructions by the assembler program. Find out how programs written in the C programming language end up as assembly language and finally as machine code instructions. Use the Microchip Studio debugger in combination with a hardware USB programmer/debugger to test assembly and C language programs, or use the Microchip Studio AVR simulator. DIP packaged ATtiny microcontrollers are used in this volume for easy use on electronic breadboards, targeting mainly the ATtiny13(A) and ATtiny25/45/85. Learn about instruction timing and clocks in AVR microcontrollers using ATtiny devices. Be on your way to becoming an AVR expert with advanced debugging and programming skills.
50+ Android Apps with Raspberry Pi, ESP32 and Arduino
This book is about developing apps for Android compatible mobile devices using the MIT App Inventor online development environment. MIT App Inventor projects can be in either standalone mode or use an external processor. In standalone mode, the developed application runs only on the mobile device (e.g. Android). In external processor-based applications, the mobile device communicates with an external microcontroller-based processor, such as Raspberry Pi, Arduino, ESP8266, ESP32, etc.
In this book, many tested and fully working projects are given both in standalone mode and using an external processor. Full design steps, block programs, circuit diagrams, QR codes and full program listings are given for all projects.
The projects developed in this book include:
Using the text-to-speech component
Intonating a received SMS message
Sending SMS messages
Making telephone calls using a contacts list
Using the GPS and Pin-pointing our location on a map
Speech recognition and speech translation to another language
Controlling multiple relays by speech commands
Projects for the Raspberry Pi, ESP32 and Arduino using Bluetooth and Wi-Fi
MIT APP Inventor and Node-RED projects for the Raspberry Pi
The book is unique in that it is currently the only book that teaches how to develop projects using Wi-Fi and Node-RED with MIT App Inventor. The book is aimed at students, hobbyists, and anyone interested in developing apps for mobile devices.
All projects presented in this book have been developed using the MIT App Inventor visual programming language. There is no need to write any text-based programs. All projects are compatible with Android-based mobile devices. Full program listings for all projects as well as detailed program descriptions are given in the book. Users should be able to use the projects as they are presented, modifying them to suit their own needs.