| 전자부품 데이터시트 검색엔진 |
|
PIC32MX 데이터시트(PDF) 32 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC32MX 데이터시트(HTML) 32 Page - Microchip Technology |
|
32 / 48 page ![]() PIC32MX Starter Kit User’s Guide DS61144D-page 28 © 2009 Microchip Technology Inc. EXAMPLE 3-1: PROJECT SOURCE CODE #include <plib.h> // Adds support for PIC32 Peripheral library functions and macros void Delay(unsigned int count) { while(--count); } int main(void) { /* LED setup - Turn off leds before configuring the IO pin as output */ mPORTDClearBits(BIT_0 | BIT_1 | BIT_2); // same as LATDCLR = 0x0007 /* Set RD0, RD1 and RD2 as outputs */ mPORTDSetPinsDigitalOut(BIT_0 | BIT_1 | BIT_2 ); // same as TRISDCLR = 0x0007 /* endless loop */ while(1) { Delay(200000); mPORTDToggleBits(BIT_0); // toggle LED0 (same as LATDINV = 0x0001) Delay(200000); mPORTDToggleBits(BIT_1); // toggle LED1 (same as LATDINV = 0x0002) Delay(200000); mPORTDToggleBits(BIT_2); // toggle LED2 (same as LATDINV = 0x0004) }; return 0; } |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |