Table of Contents
Chapter 1: Introduction and Motivation
Instead of an introduction – on buying an NE555
Why PIC? Why assembler?
What do we need?
Installing MPLAB on Windows
Chapter 2: Executing Assembly in Sequence
Getting closer to the PIC
Building a testing rig
An introduction to Assembly
Understanding start-up
Dynamic hardware configuration
What happens in the background?
How outputs are configured
Conclusion
Chapter 3: Program Sequence Control
Jump Operators and Pipelining
Slow down program execution with NOP
Aside: Comments
Declaration of variables
Conditional jump operations
Troubleshooting
Optimizing the program
Using Subroutines
The stack and its pitfalls
What happens next?
Chapter 4: PIC Arithmetic Operations
Understanding binary
The traps of adding things
Comparing numerical values
Two's complement
Logic operations
Shift!
Chapter 5: Interrupts and Sleep Modes
Understanding interrupt logic
Unsharp without interrupts
Improving the reaction time
Let's save power
Monitoring with WDT
Outlook: timers allsorts
Chapter 6: Indirect Addressing
Discrete and continuous
Configure the DAC
On lookup tables
Tables from data memory
On disassembly and constants
Return to table access
Tables from RAM
Troubleshooting with Assembler
Jumping across banks
Bottom line
Chapter 7: Getting Started With C
The C workflow
Install MCC
Start MCC
Flashing _a_ LED with MCC
Analyze code structure
Flashing _a_ LED
Analyzing compiler output
Bottom line
Chapter 8: Interrupts and Timers à la C
Interrupt handling with C
Provision of interrupt logic
Merging changes (against MCC-generated code)
Chapter 9: Hardware Accelerated Buses: I2C, SPI and more
SPI – if speed is needed
Programming SPI
I2C - a bus for many
I2C, reloaded
Evaluate serial data
Bit banging: Wiegand Protocol
Bit banging: state machine
Bit banging: coding
Bottom line
Chapter 10: Storing Data During Power-off
Writing to EEPROM
A matter of speed
Addressing games
HEF, or abuse the program memory
Aside: HEF, reloaded
The bottom lines
Appendix A: Search Ranking
Appendix B: Fast Spectral Components
On waves and parts
Deeper analysis!
What's in it for me?
Index
W
Watchdog timer
WDTE
Wiegand Protocol
working register
WriteBlock
WriteWord
X
XOR
XORLW
XORWF