Files
mspov
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||
MSP430 POV Display ==================  - - - - - - This code toggles the output pins of P1.0-P1.7 to display a message in rapid succession. This effect is called "Persistence of Vision". This project shows how to make use of the timer interrupts on the MSP430 series microcontrollers to display that message. For the sake of making it compile over a wide number of devices, the ta0compat.h file is provided in order to map the Timer0 A0 functionality from the devices that have more than one timer to the defines present in single-timer devices. The code in `main()` is responsible for setting up the timers and enable global interrupts so that the ISR occur when they hit the target value. Requirements ------------ To compile this project you need a MSP430-based device and programmer. It is designed to be used with the Launchpad, but the binaries should be universal and can be programmed onto any compatible device with any programmer. * [mspdebug][1] is needed to identify the device as well as program it * [msp430-gcc][2] is needed to compile the project * [lib430][3] is included if you checked out the code from SVN. Please refer to the lib430 documentation for information on how to build it and use it with mspov. [1]: http://mspdebug.sourceforge.net "MSPDebug" [2]: http://mspgcc.sourceforge.net "msp430-gcc" [3]: http://svn.noccy.com/mspdev/lib430/README "lib430" Bill Of Materials ----------------- * *8x* Red LED * *1x* Green LED * *2x* Pushbutton * *2x* Optoresistor * *1x* msp430g2553 (for display) * *1x* msp430f2013 (for UI) * *1x* 7-segment LCD display Implementation -------------- * `P1.[0..7]` - Red LEDs * `P2.1` - Green LED * `P2.[2..3]` - Programmer light detector circuit * `P2.4` - Menu button * `P2.5` - Select button Instructions / Using -------------------- Using MSPov is simple. Hold the menu button. The green light will light up and one of the red led:s will start flashing. When you go full circle the green LED will start flashing. This means "exit menu". If you select a slot with the select button and the menu button, the light for that slot will stay on and the green led will start fashing. Put the sensors toward your screen running the "povprog" binary. When the MSPov detects a sync signal, the green LED will come on and it will remain on until the full message have been received and programmed. At this time all lights will be off. Tapping the menu button once will start the message. Tapping the select button will change to the next pattern. ### What the buttons do * When in *display mode*, pressing `menu` will set the device in programming mode. * When in *display mode*, pressing `select` will activate the next message slot. * When in *menu mode*, pressing and holding `menu` will initiate programming of the selected slot. * When in *menu mode*, pressing `select` will activate the next message slot. * When in *programming mode*, pressing and holding `menu` will blank the slot and disable programming mode. * When in *programming mode*, pressing and holding `select` will cancel the programming mode. ### What does the LED mean/do? * In normal operation mode, the _green_ led should be off. The _red_ leds will in this mode display the message with the appropriate timing. * When *menu mode* is selected, the _green_ led will be lit up. * When *programming mode* is selected, the _green_ led will be lit up and one of the _red_ leds will be flashing to indicate the slot to re-program. * When the device is *reprogramming* the _red_ light for the slot will be flashing, and the _green_ light will also remain flashing until the programming is done at which time all the leds will go dark for a second. ### When using with the UI module * The UI module adds a 7-segment LCD display to give visual indications on what slot is being active/programmed. The Makefile ------------ The makefile is based on the mspdev skeleton makefile and thus prvides the following actions: * `all` - Build all the source files, link the binary and then call on mspdebug to program the device. This is the default action, and thus just calling make will instantly deploy the project on the microcontroller, just like with the picdev makefile. * `bin` - Build all the source files and link the binary in elf and hex format. No programming is done here. * `prog` - Program the device with the binary. * `clean` - Clean the build environment and remove all temporary files. * `listing` - Generate assembly source listings from the .c files. * `identify` - Identify the attached microcontroller using mspdebug. Dependencies ------------ You need to build lib430 for your microcontroller before attempting to build mspov. The original reference design calls for two different microcontrollers to be in charge of the leds and the user interface respectively.