12.07.2015 Views

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

MPLAB® C18 C 编译器函数库

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MPLAB ® <strong>C18</strong> C 编 译 器 函 数 库2.10.2 使 用 示 例#include #include void main(void){// configure USARTOpenUSART( USART_TX_INT_OFF &USART_RX_INT_OFF &USART_ASYNCH_MODE &USART_EIGHT_BIT &USART_CONT_RX &USART_BRGH_HIGH,25 );while(1){while( ! PORTAbits.RA0 ); //wait for RA0 highWriteUSART( PORTD );//write value of PORTD}if(PORTD == 0x80)// check for terminationbreak; // valueCloseUSART();}DS51297C_CN 第 64 页© 2004 Microchip Technology Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!