I am learning to use & program the MSP430G2 microcontroller from Texas Instruments, so I thought I could write down my notes here as I am planning to use them for reference in the future, plus they might prove useful to others.
For this last reason I will add some background information, to make my minutes usable by others willing to learn.Basic ConceptsYou should be familiar with teh concept of what a microcontroller is, if not you should check here : http://en.wikipedia.org/wiki/Microcontroller
To put it plain simple a microcontroller is a microprocessor to which a number of different peripherals were added.
Each model has it’s own mix of peripherals, providing different functionality, however the main “building blocks” you can expect to find are :
- Flash memory to store the code that will be executed
- RAM to store variables needed by your program
- Clock Systems : one or more are provided to service the CPU and it’s peripherals. ome may use external crystals, some others might be “self contained”
- Timers to count delays, activate something periodically etc
- A Watchdog : a special timer that monitors the status of the code execution and resets the MCU if it appears “stuck”
- Serial communication (typically TTL UARTS, SPI, I2C)
- GPIO (General Purpose Inpu Ouutput) : allows to write or read digital signals
- ADC (Analogic To Digital Converter) : commonly a 10bit ADC to read analogic inputs, usually from sensors (temperature, voltage, current etc..)
- PWM (Pulse Width Modulation) : used to dim lights, drive electric motors etc..