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.

软 件 外 设 函 数 库ReadUARTgetcUART功 能 : 从 软 件 UART 读 取 一 个 字 节 。包 含 头 文 件 : sw_uart.h原 型 : char ReadUART( void );说 明 : 该 函 数 从 软 件 UART 读 取 一 个 数 据 字 节 。返 回 值 : 返 回 从 软 件 UART 的 接 收 数 据 (RXD) 引 脚 读 取 的 数 据 字 节 。文 件 名 :readuart.asm代 码 示 例 : char x;x = ReadUART();WriteUARTputcUART功 能 :写 一 个 字 节 到 软 件 UART。包 含 头 文 件 : sw_uart.h原 型 : void WriteUART( char data );参 数 ׸½¨: data要 写 到 软 件 UART 的 数 据 字 节 。说 明 :该 函 数 将 指 定 的 数 据 字 节 写 到 软 件 UART。文 件 名 :writuart.asm代 码 示 例 :char x = ‘H’;WriteUART( x );3.6.2 使 用 示 例#include #include void main( void ){char data// configure software UARTOpenUART();}while( 1 ){data = ReadUART();WriteUART( data );}//read a byte//bounce it back© 2004 Microchip Technology Inc. DS51297C_CN 第 105 页

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

Saved successfully!

Ooh no, something went wrong!