Microsoft PowerPoint - MSP430_Firmware Design_Develop_V11.ppt

Similar documents
2009년2학기 임베디드시스템 응용

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

2009년2학기 임베디드시스템 응용

2009년2학기 임베디드시스템 응용

2009년2학기 임베디드시스템 응용

[8051] 강의자료.PDF

Microsoft PowerPoint - es-arduino-lecture-03

(Asynchronous Mode) ( 1, 5~8, 1~2) & (Parity) 1 ; * S erial Port (BIOS INT 14H) - 1 -

untitled

ATmega128

T100MD+

K&R2 Reference Manual 번역본

<4D F736F F F696E74202D20BBB7BBB7C7D15F FBEDFB0A3B1B3C0B05FC1A638C0CFC2F72E BC8A3C8AF20B8F0B5E55D>

MAX+plus II Getting Started - 무작정따라하기

untitled

LCD Display


슬라이드 1

Microsoft Word - DCMD-1000 사용자 메뉴얼.docx

À̵¿·Îº¿ÀÇ ÀÎÅͳݱâ¹Ý ¿ø°ÝÁ¦¾î½Ã ½Ã°£Áö¿¬¿¡_.hwp

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202839C1D6C2F7207E203135C1D6C2F >

PowerPoint 프레젠테이션

歯FDA6000COP.PDF

<4D F736F F F696E74202D20B8B6C0CCC5A9B7CEC7C1B7CEBCBCBCAD202834C1D6C2F7207E2038C1D6C2F729>

UART.h #ifndef _UART_H_ #define _UART_H_ #define DIR_TXD #define DIR_RXD sbi(portd,4) cbi(portd,4) #define CPU_CLOCK_HZ UL UART PORT1 void UAR

MPLAB C18 C

PowerPoint 프레젠테이션

Motor

PowerPoint 프레젠테이션

MicrocontrollerAcademy_Lab_ST_040709

디지털공학 5판 7-8장

Chapter. 14 DAC 를이용한 LED 밝기제어 HBE-MCU-Multi AVR Jaeheung, Lee

BC6HP Korean.ai

<4D F736F F F696E74202D20C0BDBCBA484D4920C0FBBFEB20C5DAB7B9B8C5C6BDBDBA20B4DCB8BBB1E228B9DFC7A5C0DAB7E129>

hd1300_k_v1r2_Final_.PDF

PowerPoint 프레젠테이션

인켈(국문)pdf.pdf

DDX4038BT DDX4038BTM DDX4038 DDX4038M 2010 Kenwood Corporation All Rights Reserved. LVT A (MN)


,,,,,, (41) ( e f f e c t ), ( c u r r e n t ) ( p o t e n t i a l difference),, ( r e s i s t a n c e ) 2,,,,,,,, (41), (42) (42) ( 41) (Ohm s law),

프로그램을 학교 등지에서 조금이라도 배운 사람들을 위한 프로그래밍 노트 입니다. 저 역시 그 사람들 중 하나 입니다. 중고등학교 시절 학교 도서관, 새로 생긴 시립 도서관 등을 다니며 책을 보 고 정리하며 어느정도 독학으르 공부하긴 했지만, 자주 안하다 보면 금방 잊어

SRC PLUS 제어기 MANUAL

PowerPoint 프레젠테이션

정보보안 개론과 실습:네트워크

Orcad Capture 9.x

<443A5C4C C4B48555C B3E25C32C7D0B1E25CBCB3B0E8C7C1B7CEC1A7C6AE425CBED0C3E0C7C1B7CEB1D7B7A55C D616E2E637070>

(specifications) 3 ~ 10 (introduction) 11 (storage bin) 11 (legs) 11 (important operating requirements) 11 (location selection) 12 (storage bin) 12 (i

ARM01

Microsoft PowerPoint - 부호기와 복호기.PPT

untitled

(Table of Contents) 2 (Specifications) 3 ~ 10 (Introduction) 11 (Storage Bins) 11 (Legs) 11 (Important Operating Requirements) 11 (Location Selection)

Microsoft PowerPoint - polling.pptx

IoT FND8 7-SEGMENT api

SW테스트베드 장비 리스트

lecture4(6.범용IO).hwp

Microsoft Word - CL5000,5500_KOR_UM_ _.doc

DE1-SoC Board


HX - Operation Manual MC / TC / CUT / QT HX Series(V2.x) Operation Manual for MC / TC / CUT / QT CSCAM

PowerPoint 프레젠테이션

Formatvorlage für Arbeitsanweisungen

ez-md+_manual01

K7VT2_QIG_v3

Copyright 2007 Hewlett-Packard Development Company, L.P. Windows 는 Microsoft Corporation 의 미국 등록 상표입니다. 본 설명서의 내용은 사전 통지 없이 변경될 수 있습니다. HP 제품 및 서비스에 대

untitled

Microsoft Word - Installation and User Manual_CMD V2.2_.doc

목차 1. 개요 USB 드라이버 설치 (FTDI DRIVER) FTDI DRIVER 실행파일 USB 드라이버 확인방법 DEVICE-PROGRAMMER 설치 DEVICE-PROGRAMMER

Microsoft Word - PEB08_USER_GUIDE.doc

Microsoft PowerPoint - eSlim SV [ ]

Microsoft Word - FS_ZigBee_Manual_V1.3.docx

PD-659_SM(new)

Vertical Probe Card Technology Pin Technology 1) Probe Pin Testable Pitch:03 (Matrix) Minimum Pin Length:2.67 High Speed Test Application:Test Socket

슬라이드 1

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

Remote UI Guide

PLC Robot Starter Quick Guide

MR-3000A-MAN.hwp

C++-¿Ïº®Çؼ³10Àå

Microsoft Word 년 7월 Mid Small-cap_final_.doc

<4D F736F F F696E74202D20454D43BCB3B0E8B4EBC3A5BBE7B7CA2828C1D629B8B6B7E7C0CEC6F75FBDC5C1D6C8A3292E707074>

ez-shv manual

EP-B-P211.eps

DCR-HC15

슬라이드 1

Microsoft Word - logic2005.doc

PowerPoint 프레젠테이션

(6)

歯동작원리.PDF

Microsoft Word doc

PRO1_09E [읽기 전용]

PowerPoint 프레젠테이션

KR

CPX-E-EC_BES_C_ _ k1

2

UML

untitled

핸디로더(PGM-500) 사용자 메뉴얼

untitled

282서비스업관리-마트

Transcription:

TI 16 Bit RISC MSP430 Firmware Design - Develop Flow - 김형태 conan@firmwarebank.com

MSP430 Firmware 기획 선택 LCD Based MSP430 4xx Flash base 1.8V ~ 3.6V, up to 60kB/ Flash/ ROM 8MIPs MSP430 3xx ROM/OTP family MCU offer 2.5V-5.5V operation, up to 32kB, 4MIPS Non-LCD Based MSP430 1xx Flash/ ROM base 1.8V ~ 3.6V operation, up to 60kB, 8MIPs with Basic Clock

MSP 430 구입 - Training Board 구입 / 강의 www.firmwarebank.com - TI Chip 대리점안내 Hu&Power Tech, 02-2109-5433, 이종환과장 AVNET Korea, 031-738-1633, 유계환과장 - Community & 430 Study Group http://

Soft Tools

Hard Tools

View MSP-FET430x110 Graphic

View MSP-PRGS430 Graphic

View MSP-FET430P440 Graphic

9

Compiler 환경

Compiler 환경

Compiler 환경

Compiler 환경

Compiler 환경

Compiler 환경

Quadravox Compiler 환경

Quadravox Compiler 환경

Quadravox Compiler 환경

맛보기 Firmware

LCD 특징 디스플레이값을메모리에기록 자동신호발생 4 Type Static 2Mux ½ Bias 3Mux 1/3 Bias 4Mux 1/3 Bias 44X Device S0~S39

LCD Block

LCD Module

LCD 종류 LCD panel 종류 : TN (Twisted Nematic), HTN (High Twisted Nematic), STN (Super Twisted Nematic), FSTN (Film Super Twisted Nematic) 순서에따라가격높음 View Angle : 6 시 ( 아래에서위로경우 ), 12 시 ( 위에서아래로보는경우 ) Rear Polarizer Type : Reflective( 불투과 : Backlihgt 적용안하는경우 ), Transflective( 반투과 ), Transmissive( 투과 ) Display type : Positive, Negative Operating Temperature : 0~60C(Normal type), - 20~70C ( 고온용 ) Connector Type : Rubber(Zebra), Flexible(Heat seal), Metal Pin 자료출처 : siretech.co.kr 02-868-5002, 이기상차장

LCD SCH

LCD Display 정의 Code unsigned char digit_lcdm1[10] = {0x11,0x10,0x11,0x11,0x10,0x01,0x01,0x11,0x11,0x11}; unsigned char digit_lcdm2[10] = {0x11,0x01,0x10,0x11,0x01,0x11,0x11,0x01,0x11,0x11}; unsigned char digit_lcdm3[10] = {0x11,0x00,0x01,0x00,0x10,0x10,0x11,0x00,0x11,0x10}; unsigned char digit_lcdm4[10] = {0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01};

LCD Code LCDM1 = digit_lcdm1[dig1]; // 0x11 LCDM2 = digit_lcdm2[dig1]; // 0x11 LCDM3 = digit_lcdm3[dig1]; // 0x11 LCDM4 = digit_lcdm4[dig1]; // 0 LCDM5 = digit_lcdm1[dig2]; LCDM6 = digit_lcdm2[dig2]; LCDM7 = digit_lcdm3[dig2]; LCDM8 = digit_lcdm4[dig2]; LCDM9 = digit_lcdm1[dig3]; LCDM10 = digit_lcdm2[dig3]; LCDM11 = digit_lcdm3[dig3]; LCDM12 = digit_lcdm4[dig3]; LCDM13 = digit_lcdm1[dig4]; LCDM14 = digit_lcdm2[dig4]; LCDM15 = digit_lcdm3[dig4]; LCDM16 = digit_lcdm4[dig4];

LCD, Buzzer, 7-Seg Code1 #include <msp430x43x.h> #include "D:\work\App\Header\IAR\MSP430_type.h" void Display(unsigned int value); void delay(unsigned int sleeptime); // Segment LCD 0, 9 unsigned char digit_lcdm1[10] = {0x11,0x10,0x11,0x11,0x10,0x01,0x01,0x11,0x11,0x11}; unsigned char digit_lcdm2[10] = {0x11,0x01,0x10,0x11,0x01,0x11,0x11,0x01,0x11,0x11}; unsigned char digit_lcdm3[10] = {0x11,0x00,0x01,0x00,0x10,0x10,0x11,0x00,0x11,0x10}; unsigned char digit_lcdm4[10] = {0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x01,0x01}; unsigned char seg7[] = {0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; unsigned char wd_time; uchar seg_count; unsigned int time;

Code2 void main(void){ WDTCTL = WDTPW + WDTHOLD; // WDT 비활성화 FLL_CTL0 = XCAP14PF; // Configure load caps LCDCTL = LCDON + LCDSTATIC + LCDP0 + LCDP2; // STK LCD STATIC, S0- S31 BTCTL = BTFRFQ1; // STK LCD freq P1DIR = BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0; // All LED 출력 P3DIR = BIT7; // P3.7 부저출력 P5SEL = 0xFC; // Common and Rxx all selected WDTCTL = WDT_ADLY_250; // WDT 250ms, ACLK, interval timer IE1 = WDTIE; // Enable WDT interrupt _EINT(); // Enable interrupts

Code3 LCDM1 = 0x00; LCDM2 = 0x00; LCDM3 = 0x00; LCDM4 = 0x00; LCDM5 = 0x00; LCDM6 = 0x00; LCDM7 = 0x00; LCDM8 = 0x00; LCDM9 = 0x00; LCDM10 = 0x00; LCDM11 = 0x00; LCDM12 = 0x00; LCDM13 = 0x00; LCDM14 = 0x00; LCDM15 = LCDM16 =0x00; // for initial wd_time = 0; seg_count=0;

Code4 while(1){// repeat forever } } if(wd_time>=4) { wd_time = 0; time++; if(time>=10000) time = 0; } Display(time); P1OUT = seg7[seg_count++]; // 7segment display delay(500); if(seg_count>9) seg_count=0;

Code5 void Display(unsigned int value){ unsigned char dig1, dig2, dig3, dig4; dig1 = (unsigned char)(value/1000); dig2 = (unsigned char)((value-dig1*1000)/100); dig3 = (unsigned char)((value-dig1*1000-dig2*100)/10); dig4 = (unsigned char)(value-dig1*1000-dig2*100-dig3*10); LCDM1 = digit_lcdm1[dig1]; LCDM2 = digit_lcdm2[dig1]; LCDM3 = digit_lcdm3[dig1]; LCDM4 = digit_lcdm4[dig1]; LCDM5 = digit_lcdm1[dig2]; LCDM6 = digit_lcdm2[dig2]; LCDM7 = digit_lcdm3[dig2]; LCDM8 = digit_lcdm4[dig2]; LCDM9 = digit_lcdm1[dig3]; LCDM10 = digit_lcdm2[dig3]; LCDM11 = digit_lcdm3[dig3]; LCDM12 = digit_lcdm4[dig3]; LCDM13 = digit_lcdm1[dig4]; LCDM14 = digit_lcdm2[dig4]; LCDM15 = digit_lcdm3[dig4]; LCDM16 = digit_lcdm4[dig4]; if(dig4==0){ P3OUT ^= BIT7; // P3.7 Buzzer Toggle, beep Sound } else P3OUT = (0xFFFF &!BIT7); }

Code6 #pragma vector=wdt_vector interrupt void uartreceivehandler( void ){ //interrupt[wdt_vector] void WD_TIMER(void) wd_time++; } void delay(unsigned int sleeptime){ unsigned int i1,i2; } for(i2=0;i2<sleeptime;i2++) for(i1=0;i1<=25;i1++) ;

LCD 코드실행동화상 LCD 실행동화상.MOV

Key Board SCH

KEY Board Code1 #include <msp430x43x.h> #include "D:\work\App\Header\IAR\MSP430_type.h" unsigned char Key_processing(void); void main(void){ int index = 0; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 unsigned char Seg_No[]={0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90}; } WDTCTL = WDTPW + WDTHOLD; // WDT 타이머비활성화 P1DIR = 0xff; // P1.0 ~ 7 FND 출력 P3DIR = BIT2 BIT1 BIT0; // P3.0 ~ 2 Key matrix 출력, P3.3 ~ 5 Key matrix 입력 for (;;){ // repeat forever index = Key_processing(); P1OUT = Seg_No[index]; }

KEY Board Code2 unsigned char Key_processing(void){ unsigned char x_scan, y_scan, button_num; unsigned char temp; button_num = 0; temp = 0; for(x_scan=0; x_scan<3; x_scan++){ P3OUT = 0x01 << x_scan;// 신호송출 for(y_scan=0; y_scan<3; y_scan++){ button_num++; if(p3in&(0x08<<y_scan))// 신호수신 / 비교 return temp = button_num; } } return temp; }

DC Motor L298

L298

Motor SCH U2 MSP430_449/448/447 P5.1/SEG0 12 P5.0/SEG1 13 SEG2 14 SEG3 15 SEG4 16 SEG5 17 SEG6 18 SEG7 19 SEG8 20 SEG9 21 SEG10 22 SEG11 23 SEG12 24 SEG13 25 SEG14 26 SEG15 27 SEG16 28 SEG17 29 SEG18 30 SEG19 31 SEG20 32 SEG21 33 SEG22 34 SEG23 35 SEG24 36 SEG25 37 SEG26 38 SEG27 39 SEG28 40 SEG29 41 SEG30 42 SEG31 43 SEG32 44 SEG33 45 P4.7/SEG34 46 P4.6/SEG35 47 P4.5/SEG36 48 P4.4/SEG37 49 P4.3/SEG38 50 P4.2/SEG39 51 COM0 52 P5.2/COM1 53 P5.3/COM2 54 P5.4/COM3 55 P1.0/TA0 87 P1.1/TA0/MCLK 86 P1.2/TA1 85 P1.3/TBOUTH/SVSOUT 84 P1.4/TBCLK/SMCLK 83 P1.5/TACLK/ACLK 82 P1.6/CA0 81 P1.7/CA1 80 P2.0/TA2 79 P2.1/TB0 78 P2.2/TB1 77 P2.3/TB2 76 P2.4/UTXD0 75 P2.5/URXD0 74 P2.6/CAOUT 73 P2.7/ADC12CLK 72 P3.0/STE0 71 P3.1/SIMO0 70 P3.2/SOMI0 69 P3.3/UCLK0 68 P3.4 67 P3.5 66 P3.6 65 P3.7 64 P6.0/A0 95 P6.1/A1 96 P6.2/A2 97 P6.3/A3 2 P6.4/A4 3 P6.5/A5 4 P6.6/A6 5 P6.7/A7/SVSin 6 P4.0/UTXD1 63 P4.1/URXD1 62 RST/NMI 94 TCK 93 TMS 92 TDI 91 TDO/TDI 90 Xin 8 Xout/TCLK 9 VREF+ 7 VEREF+ 10 VREF-/VEREF- 11 XT2in 89 XT2out 88 CVCC1 1 DVCC2 60 AVCC 100 DVSS1 99 DVSS2 61 AVSS 98 P5.7/R33 59 P5.6/R23 58 P5.5/R13 57 R03 56 3_3V AVcc 3_3V R6 0 C14 104 AVcc PWM1 PWM2 MOTEN1 MOTEN2

DC Motor SCH

Motor Code1 #include <msp430x43x.h> #include "D:\work\App\Header\IAR\MSP430_type.h" void Sleep(unsigned int sleeptime); void main(void){ unsigned char pwm1, pwm2; pwm1 = 150; pwm2 = 105; WDTCTL = WDTPW +WDTHOLD; // WDT 비활성화 P1DIR = BIT1 BIT0; // P1.0, P1.1 출력, P1.2 스위치입력 P2DIR = BIT3 BIT2 BIT1 BIT0; // P2.3 ~ 0 출력, Motor Direction and Enable P2OUT &= ~(BIT3 BIT1); // Moter Enable Off P2SEL = BIT2 BIT0; // P2.2 TB1 and P2.0 TA2 P2OUT = 0x0a; // 0000 1010, Motor Reverse ON TACTL = TASSEL_1 + TACLR; // ACLK, Clear TAR TACCR0 = 256-1; // PWM Period/2 TACCTL2 = OUTMOD_6; // CCR2 Toggle/set TACCR2 = pwm1; // CCR2 PWM duty cycle TACTL = MC1 + MC0; // Start Timer_A in up-down mode

Motor Code2 TBCTL = TBSSEL_1 + TBCLR; // ACLK, Clear TBR TBCCR0 = 256-1; // PWM Period/2 TBCCTL1 = OUTMOD_6; // CCR1 reset/set TBCCR1 = pwm2; // CCR1 PWM duty cycle TBCTL = MC1 + MC0; // Start Timer_B in updown mode

Motor Code3 for (;;) { // repeat forever if(p1in&bit2) { // 스위치를누르지않으면.. P1OUT ^= BIT0; // P1.0 포트의 LED 가 Toggle P1OUT = BIT1; // P1.1 포트의 LED 가 off pwm1 = 150; TACCR2 = pwm1; // CCR2 PWM duty cycle } else { P1OUT ^= BIT1; // P1.1 포트의 LED 가 Toggle P1OUT = BIT0; // P1.0 포트의 LED 가 off if(pwm1<255) { pwm1++; TACCR2 = pwm1; // CCR2 PWM duty cycle } } Sleep(1000); // Delay } }

온도검출 SCH U2 MSP430_449/448/447 P5.1/SEG0 12 P5.0/SEG1 13 SEG2 14 SEG3 15 SEG4 16 SEG5 17 SEG6 18 SEG7 19 SEG8 20 SEG9 21 SEG10 22 SEG11 23 SEG12 24 SEG13 25 SEG14 26 SEG15 27 SEG16 28 SEG17 29 SEG18 30 SEG19 31 SEG20 32 SEG21 33 SEG22 34 SEG23 35 SEG24 36 SEG25 37 SEG26 38 SEG27 39 SEG28 40 SEG29 41 SEG30 42 SEG31 43 SEG32 44 SEG33 45 P4.7/SEG34 46 P4.6/SEG35 47 P4.5/SEG36 48 P4.4/SEG37 49 P4.3/SEG38 50 P4.2/SEG39 51 COM0 52 P5.2/COM1 53 P5.3/COM2 54 P5.4/COM3 55 P1.0/TA0 87 P1.1/TA0/MCLK 86 P1.2/TA1 85 P1.3/TBOUTH/SVSOUT 84 P1.4/TBCLK/SMCLK 83 P1.5/TACLK/ACLK 82 P1.6/CA0 81 P1.7/CA1 80 P2.0/TA2 79 P2.1/TB0 78 P2.2/TB1 77 P2.3/TB2 76 P2.4/UTXD0 75 P2.5/URXD0 74 P2.6/CAOUT 73 P2.7/ADC12CLK 72 P3.0/STE0 71 P3.1/SIMO0 70 P3.2/SOMI0 69 P3.3/UCLK0 68 P3.4 67 P3.5 66 P3.6 65 P3.7 64 P6.0/A0 95 P6.1/A1 96 P6.2/A2 97 P6.3/A3 2 P6.4/A4 3 P6.5/A5 4 P6.6/A6 5 P6.7/A7/SVSin 6 P4.0/UTXD1 63 P4.1/URXD1 62 RST/NMI 94 TCK 93 TMS 92 TDI 91 TDO/TDI 90 Xin 8 Xout/TCLK 9 VREF+ 7 VEREF+ 10 VREF-/VEREF- 11 XT2in 89 XT2out 88 CVCC1 1 DVCC2 60 AVCC 100 DVSS1 99 DVSS2 61 AVSS 98 P5.7/R33 59 P5.6/R23 58 P5.5/R13 57 R03 56 3_3V AVcc THERM

Sensor SCH

온도검출 Code1 void mpu_initial(void){ LCDM1 = 0x00; // LCD 초기값설정중략 WDTCTL = WDTPW + WDTHOLD; // WDT 비활성화 FLL_CTL0 = XCAP14PF; // Configure load caps LCDCTL = LCDON + LCDSTATIC + LCDP0 + LCDP2; // STK LCD STATIC, S0-S31 BTCTL = BTFRFQ1; // STK LCD freq P1OUT = BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0;// FND All OFF P1DIR = BIT7 BIT6 BIT5 BIT4 BIT3 BIT2 BIT1 BIT0; // All LED 출력 Setting WDTCTL = WDT_ADLY_250; // WDT 250ms, ACLK, interval timer IE1 = WDTIE; // Enable WDT interrupt P6SEL = BIT3; // Enable A/D channel inputs ADC12CTL0 = ADC12ON+MSC+SHT0_8; // Turn on ADC12, set sampling time ADC12CTL1 = SHP+CONSEQ_3; // Use sampling timer, single sequence ADC12MCTL0 = INCH_0; // ref+=avcc, channel = A0 ADC12MCTL1 = INCH_1; // ref+=avcc, channel = A1 ADC12MCTL2 = INCH_2; // ref+=avcc, channel = A2 ADC12MCTL3 = INCH_3+EOS; // ref+=avcc, channel = A0 ADC12IE = BIT3; // Enable ADC12IFG.3 ADC12CTL0 = ENC; // Enable conversions _EINT(); // Enable interrupts }

온도검출 Code2 void Display(unsigned int value){ dig1 = (unsigned char)(value/1000); dig2 = (unsigned char)((value-dig1*1000)/100); dig3 = (unsigned char)((value-dig1*1000-dig2*100)/10); dig4 = (unsigned char)(value-dig1*1000-dig2*100-dig3*10); LCDM1 = digit_lcdm1[dig1]; LCDM2 = digit_lcdm2[dig1]; LCDM3 = digit_lcdm3[dig1]; LCDM4 = digit_lcdm4[dig1]; LCDM5 = digit_lcdm1[dig2]; LCDM6 = digit_lcdm2[dig2]; LCDM7 = digit_lcdm3[dig2]; LCDM8 = digit_lcdm4[dig2]; LCDM9 = digit_lcdm1[dig3]; LCDM10 = digit_lcdm2[dig3]; LCDM11 = digit_lcdm3[dig3]; LCDM12 = digit_lcdm4[dig3]; LCDM13 = digit_lcdm1[dig4]; LCDM14 = digit_lcdm2[dig4]; LCDM15 = digit_lcdm3[dig4]; LCDM16 = digit_lcdm4[dig4]; } #pragma vector=adc_vector interrupt void ADC12ISR( void ){ } results = ADC12MEM3; // Move results, IFG is cleared #pragma vector=wdt_vector interrupt void uartreceivehandler( void ){ //interrupt[wdt_vector] void WD_TIMER(void) // wd_time++; }

온도검출 Code3 void main(void){ mpu_initial(); for (;;) { dig1 = (unsigned char)(results/1000); dig2 = (unsigned char)((results-dig1*1000)/100); dig3 = (unsigned char)((results-dig1*1000-dig2*100)/10); P1OUT=Seg_No[dig3]; Sleep(10); Display(results); ADC12CTL0 = ADC12SC; // Start conversion Sleep(10); } } void Sleep(unsigned int sleeptime){ unsigned int i1,i2; } for(i2=0;i2<sleeptime;i2++) for(i1=0;i1<=25;i1++) ;

MSP 430 Study Group

추가정보 이번발표자료다운로드 http:// 430 StudyGroup MSP430_040521