Skip to main content

Posts

Showing posts from June, 2012

An Extra UART For Your PIC

  Software UART Library The mikroC PRO for PIC provides routines for implementing Software UART communication. These routines are hardware independent and can be used with any MCU. The Software UART Library provides easy communication with other devices via the RS232 protocol. Important : The Software UART library implements time-based activities, so interrupts need to be disabled when using it. Library Routines Soft_UART_Init Soft_UART_Read Soft_UART_Write Soft_UART_Break Soft_UART_Init Prototype char Soft_UART_Init( char *port, char rx_pin, char tx_pin, unsigned long baud_rate, char inverted); Returns 2 - error, requested baud rate is too low 1 - error, requested baud rate is too high 0 - successful initialization Description Configures and initializes the software UART module. Parameters : port: port to be used. rx_pin: sets rx_pin to be u