tutorials:microcontroller_programming_tips
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
tutorials:microcontroller_programming_tips [2024/10/24 17:56] – created ibchadmin | tutorials:microcontroller_programming_tips [2024/10/29 20:32] (current) – ibchadmin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Microcontroller Programming Tips ====== | ====== Microcontroller Programming Tips ====== | ||
- | When programming microcontrollers | + | When programming microcontrollers, |
**Registers: | **Registers: | ||
Line 11: | Line 11: | ||
**Digital Pins:** A digital pin or GPIO (general purpose input/ | **Digital Pins:** A digital pin or GPIO (general purpose input/ | ||
- | **ADCs:** The Analog to Digital Controller is a component in the MSP430 (and many other microcontrollers) that allows your program to convert an analog voltage to a digital value. Some sensors provide their output as an analog voltage. Connecting that voltage to a pin in ADC mode will allow your program to measure the voltage. | + | **ADCs:** The Analog to Digital Controller is a component in the [[microcontrollers: |
**DACs:** A Digital to Analog Controller is the opposite of an ADC. You give it a number and it converts that number into an analog voltage. This is useful if you want to generate an analog signal that varies over time. | **DACs:** A Digital to Analog Controller is the opposite of an ADC. You give it a number and it converts that number into an analog voltage. This is useful if you want to generate an analog signal that varies over time. | ||
Line 20: | Line 20: | ||
**UART/ | **UART/ | ||
- | **Memory:** The MSP430s | + | **Memory:** The MSP430s |
Note, that recursion, deep function call graphs, and passing large arrays or structs as parameters are similarly dangerous. You want to keep your stack small, so it doesn’t run over your globals. | Note, that recursion, deep function call graphs, and passing large arrays or structs as parameters are similarly dangerous. You want to keep your stack small, so it doesn’t run over your globals. | ||
- | **FRAM:** RAM may be tight, but you do have FRAM to use. FRAM is like Flash memory (it’s nonvolatile) but faster and less complicated to use. On the MSP430s, your code is stored in FRAM, and the remaining FRAM is available for data that you want to keep around even if your device reboots. | + | **FRAM:** RAM may be tight, but you do have FRAM to use. FRAM is like Flash memory (it’s nonvolatile) but faster and less complicated to use. On the MSP430s, your code is stored in FRAM, and the remaining FRAM is available for data that you want to keep around even if your device reboots. |
tutorials/microcontroller_programming_tips.1729792574.txt.gz · Last modified: 2024/10/24 17:56 by ibchadmin