Die Präsentation wird geladen. Bitte warten

Die Präsentation wird geladen. Bitte warten

MSP430 Mixed Signal Processor

Ähnliche Präsentationen


Präsentation zum Thema: "MSP430 Mixed Signal Processor"—  Präsentation transkript:

1 MSP430 Mixed Signal Processor
Texas Instruments Große Prozessorfamilie Variiert in Peripherie-, Speicherausstattung, Bauform Bekannt für sehr geringe Leisungsaufnahme Geeignet für energy harvesting Sehr preiswerte Entwicklungswerkzeuge Launchpad ca. 5€ incl. 2 Prozessoren Developmentstick ca. 30 € /70 € m. Funk Armbanduhr Kostenlose Entwicklungssoftware

2 Programmierbare Uhr (http://karuppuswamy

3 Webserver (http://elmicro.com/de/msp430easyweb.html)

4 Besondere Merkmale 16-bit Prozessor Flexibles System der Takterzeugung
Taktgenerator wird vom Programm eingestellt Geringer Energiebedarf durch niedrige Taktung in sleep modi (bis in nA - Bereich) Einige Geräte arbeiten mit weniger als 1V Gute Peripherieausstattung Vergleichsweise kleiner Speicher (z.T. Nur 128 Byte!) Selbst für kleinste Prozessoren umfasst das Manual fast 700 Seiten

5 Besondere Merkmale (Befehlssatz)
27 Prozessorbefehle (mit versch. Adressierungsmodi) B/W Byte/Word Ad Destination, As Source Sehr gute Einführung zur MSP-Programmierung

6 Die Prozessorfamilie RAM 128 Byte … 18 KB Flash-Rom 1KB … 256 KB
Taktung 12 kHz … 16MHZ/25MHZ (je Modell) Min. Ausstattung 8x10bit ADC, I²C, SPI, 16bit Timer, 8 IO-Lines, WDT, interner Temp. Sensor Umfangr. Ausstattung USB, LCD, 12bit ADC, DMA, Comparator, UART, RealTimeClock Gehäuse Wenige simple Modelle im DIP, meist SMD (

7 Bezeichnungsschlüssel
MSP430G2231 Kennzeichnungssuffix f. Ausstattung Speicherausstattung 3: 2K Flash, 128B Ram Familie, manchmal auch Speicherausst.?? Generation Speichertyp (F: Flash, G:Flash, Value Line) (Bei MSP430G2452 klappt das nicht?) Auswahl über:

8

9 Allgemeine Merkmale (pi4. informatik. uni-mannheim. de/pi4
Allgemeine Merkmale (pi4.informatik.uni-mannheim.de/pi4.data/content/courses/2004-ss/pk_bachelor/pk2-9-1-v2.pdf) R0: Programmcounter R1: Stackpointer R2: Statusregister (Flags) R3: Konstantenregister (0) R4..R16 16-bit Register

10 Launchpad MSPG2231 und MSPG2211 2K/1K Flash /128Byte Ram
16-bit Timer mit 3 Compareregs 8x 10bit ADC 8 I/O-Pins MSPG2452 8K/1K Flash /256Byte Ram 16 I/O-Pins Kommunikation mit PC über USB /dev/serial : Programming/debugging /dev/ttyAMC0: serielle Kommunikation (soft UART)

11 Taktgeneratoren/Taktarten

12 Kopplung zu PC über RS232 Keine Unterstützung durch die einfachen Prozessoren, softwaretechnische Realisierung Taktung erfolgt durch Timer Bits werden am Ausgangspin ein-/ausgeschaltet Zu übertragendes Byte wird mittels shift-Operation „durchgeschoben“ Start-/Stoppbit müssen ergänzt werden Konstanten für Bitmasken werden über die Werte, nicht über die Bitposition, wie Atmel üblicherweise gebildet!

13 void ConfigureTimerUart(void) {
/* This flag tells us that we're using the timer for communcation * rather than pulse width modulation. */ timerMode = TIMER_UART_MODE; /* Set transmission pin high for now (until we later set it low * to start communication). */ CCTL0 = OUT; /* TimerA is using submain clock (at 1mhz), in continuous mode, * with a clock divider of 2^3=8 TACTL = TASSEL_2 + MC_2 + ID_3; /* Set transmit and receive pins latched to the timer, and the * transmit pin is set as an output pin. P1SEL |= TXD + RXD; P1DIR |= TXD; }

14 void Transmit() { /* Function Transmits Character from TXByte. We'll have 10 bits total * to communicate, 8 bits of data plus a start bit (zero) and a * stop bit (one). */ BitCnt = 10; /* Make sure we don't catch the TAR register while it is changing. * As long as the difference is only in the lower bits, we'll call * it close enough. do { CCR0 = TAR; } while( (CCR0^TAR) > 3 ); /* Set time when the transmission will actually begin */ CCR0 += Bitime; /* Add a one bit to act as stop bit (least significant bits in the TXByte get sent first) */ TXByte |= 0x100; /* Shift left to make an initial zero bit to act as start bit */ TXByte = TXByte << 1; /* Timer A0 to start triggering interrupts to do the actual sending */ CCTL0 = CCIS0 + OUTMOD0 + CCIE; /* We'll loop and wait for the transmission to finish */ while ( CCTL0 & CCIE ) ; }

15 // Timer A0 interrupt service routine
void Timer_A(void) __attribute__((interrupt(TIMERA0_VECTOR))); void Timer_A(void) { if (timerMode == TIMER_UART_MODE) { /* schedule when the next bit is communicated */ CCR0 += Bitime; /* If the transmission bit is set */ if (CCTL0 & CCIS0) { /* Are there bits left to be transmitted? */ if ( BitCnt == 0) { /* No, disable the interrupt. We're done. */ CCTL0 &= ~ CCIE; } else { /* If the next bit is a one, set pin high/mark */ if (TXByte & 0x01) { CCTL0 &= ~ OUTMOD2; } else {/* Otherwise set pin low/space */ CCTL0 |= OUTMOD2; } /* Shift right to drop the bit we just sent, and update the count. */ TXByte = TXByte >> 1; BitCnt --; } else {. . . } /* Clear the interrupt flag */ TACCTL0 &= ~CCIFG;

16 links Installationsanleitung Tools: http://paretech.com/?p=161
Tutorial: chPad_%28MSP-EXP430G2%29#Pre- programmed_Demo_Application_- _Internal_Temperature_Measurement

17 Händler: projects.net/index.php?module=artikel&action=gruppe &id=37 Eclipse: _helios_mspgcc4_gdb-proxy Entwicklung (Codesammlung) Demo Temperatur/RS232 (Das Original) al_temperature_sensor

18 Launchpad Getting started
with_the_MSP430_LaunchPad_Workshop


Herunterladen ppt "MSP430 Mixed Signal Processor"

Ähnliche Präsentationen


Google-Anzeigen