Oct 052018
 

Links:

Using the Switches

http://www.ganssle.com/debouncing.htm

http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_PushButton

Embed with Elliot: Debounce your Noisy Buttons, Part I

 

General purpose input pins

Both switches are directly connected between the micro controller pin and ground (0V). Thus when the switch is pressed it will connect the pin to ground and the state of the pin will be read as 0 by the micro controller. When the switch is released the pin is open, this is problematic as an open pin can in principle be at any voltage. This is know as a floating input. To avoid this problem the MSP430’s come with internal software selectable pull-up or pull-down resistors which are used to pull the input either up to +Vcc or down to ground (0V) when the switch is not pressed (open). Most microcontrollers provide either pull-ups, -downs, or both. A simplified circuit diagram for the switch S2 on the MSP430 launchpad when the pull-up resistor is selected is shown below.

Switch 2 connection with pull-up enabled

Switch 2 connection with pull-up enabled

Because Switch 2 is from the pin to gr

 

 Posted by at 6:23 pm
Oct 032018
 

http://fortytwoandnow.blogspot.com/2012/06/mps430g2-tutorial-microcontrollers.html

 

Friday, June 8, 2012

MSP430G2 Tutorial – Microcontrollers

Hello,
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 :

  1. Flash memory to store the code that will be executed
  2. RAM to store variables needed by your program
  3. 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”
  4. Timers to count delays, activate something periodically etc
  5. Watchdog : a special timer that monitors the status of the code execution and resets the MCU if it appears “stuck”
  6. Serial communication (typically TTL UARTS, SPI, I2C)
  7. GPIO (General Purpose Inpu Ouutput) : allows to write or read digital signals
  8. ADC (Analogic To Digital Converter) : commonly a 10bit ADC to read analogic inputs, usually from sensors (temperature, voltage, current etc..)
  9. PWM (Pulse Width Modulation) : used to dim lights, drive electric motors etc..
  10. ….
Development boards

Tuesday, June 12, 2012

Primary resources availability

I am glad that beer is a renewable resource
 Posted by at 7:01 pm