PIC1000: Getting Started with Writing C-Code for PIC16 and PIC18

Thread Starter

nsaspook

Joined Aug 27, 2009
13,272
https://ww1.microchip.com/downloads/en/Appnotes/TB3261-Technical-Brief-DS90003261A.pdf
This technical brief provides the steps recommended to successfully program a PIC16 or PIC18 microcontroller and defines coding guidelines to help write more readable and reusable code. High-level programming languages are a necessity due to imposed short development time and high-quality requirements. These languages make it easier to maintain and reuse code due to better portability and readability than the low-level instructions specific for each microcontroller architecture. Programming language alone does not ensure high readability and reusability, but good coding style does. Therefore, the PIC® peripherals, header files and drivers are designed according to this presumption. Since the most widely used high-level programming language for PIC microcontrollers is C, this document will focus on C programming. To ensure compatibility with most PIC C compilers, the code examples in this document are written using ANSI C coding standard
 

Thread Starter

nsaspook

Joined Aug 27, 2009
13,272
https://ww1.microchip.com/downloads/en/Appnotes/00003398A.pdf
Building Hardware State Machines Using CIPs
A state machine is a combination of logic, a memory element and feedback. The inputs to the state machine are combined with the current state of the state machine, to determine the next state. The next state becomes the current state when the state clock occurs and the outputs of the state machine are determined by the current state.
 
Top