SW006010 Microchip Technology, SW006010 Datasheet - Page 65

no-image

SW006010

Manufacturer Part Number
SW006010
Description
MPLAB 17C SOFTWARE
Manufacturer
Microchip Technology
Datasheets

Specifications of SW006010

Tool Function
Compiler
Tool Type
Compiler
Processor Series
PIC17C
Lead Free Status / RoHS Status
Not applicable / Not applicable
For Use With/related Products
MPLAB®
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
 2002 Microchip Technology Inc.
getsUSART1
getsUSART2 (Continued)
Remarks:
Return Value:
File Name:
Code Example:
OpenUSART1
OpenUSART2
Device:
Function:
Include:
Prototype:
Arguments:
This function waits for and reads len number of characters out
of the specified USART. There is no timeout when waiting for
characters to arrive. After len characters have been written to
the string, a null character is appended to the end of the string.
None
u1gets.c
u2gets.c
char x[10];
getsUSART2(x,5);
OpenUSART1: PIC17C4X, PIC17C756
OpenUSART2: PIC17C756
Configures the specified USART module.
usart16.h
void OpenUSART1 (static unsigned char config, static
char spbrg);
void OpenUSART2 (static unsigned char config, static
char spbrg);
config
The value of config can be a combination of the following
values (defined in usart16.h):
USART_TX_INT_ON
USART_TX_INT_OFF
USART_RX_INT_ON
USART_RX_INT_OFF
USART_ASYNCH_MODE Asynchronous Mode
USART_SYNCH_MODE
USART_EIGHT_BIT
USART_NINE_BIT
USART_SYNC_SLAVE
USART_SYNC_MASTER
USART_SINGLE_RX
USART_CONT_RX
spbrg
The value of spbrg determines the baud rate of the USART.
The formulas for baud rate are:
asynchronous mode:
synchronous mode:
Hardware Peripheral Library
F
F
OSC
OSC
Transmit interrupt ON
Transmit interrupt OFF
Receive interrupt ON
Receive interrupt OFF
Synchronous Mode
8-bit transmit/receive
8-bit transmit/receive
Synchronous slave mode
Synchronous master mode
Single reception
Continuous reception
/(64 (spbrg + 1))
/(4 (spbrg + 1))
apRNOVS^-page 61

Related parts for SW006010