EDF - OnePIC MCU  Preliminary v0.7.0
8bit_IR/mcp2200_uart.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define MCP2200_BAUD   9600
#define DIVIDER   ((int)(_XTAL_FREQ/(16UL * MCP2200_BAUD) -1))
#define HIGH_SPEED   1
#define MCP2200_RX   UART_RX
#define MCP2200_TX   UART_TX
#define MCP2200_RX_TRIS   UART_TRIS_RX
#define MCP2200_TX_TRIS   UART_TRIS_TX
#define SPEED   0x4

Functions

void putch (uint8_t)
void mcp2200_init (void)
 Configures the UART module for 9600 baud.
void mcp2200_prompt (void)
uint8_t mcp2200_getch (void)
uint8_t mcp2200_getche (void)

Detailed Description

Definition in file mcp2200_uart.h.


Define Documentation

#define DIVIDER   ((int)(_XTAL_FREQ/(16UL * MCP2200_BAUD) -1))
Parameters:
DIVIDERcalculates value for SPRG

Definition at line 14 of file mcp2200_uart.h.

#define HIGH_SPEED   1
Parameters:
HIGH_SPEEDwhether or not to include UART hi-speed

Definition at line 16 of file mcp2200_uart.h.

#define MCP2200_BAUD   9600
Parameters:
MCP2200_BAUDUART hardware speed. Both sides must agree on this to work properly

Definition at line 12 of file mcp2200_uart.h.

#define MCP2200_RX   UART_RX
Parameters:
MCP2200_RXthe RX pin

Definition at line 18 of file mcp2200_uart.h.

#define MCP2200_RX_TRIS   UART_TRIS_RX
Parameters:
MCP2200_RX_TRISthe RX pin

Definition at line 22 of file mcp2200_uart.h.

#define MCP2200_TX   UART_TX
Parameters:
MCP2200_TXthe RX pin

Definition at line 20 of file mcp2200_uart.h.

#define MCP2200_TX_TRIS   UART_TRIS_TX
Parameters:
MCP2200_TX_TRISthe RX pin

Definition at line 24 of file mcp2200_uart.h.

#define SPEED   0x4
Parameters:
SPEEDi don't knows

Definition at line 33 of file mcp2200_uart.h.


Function Documentation

uint8_t mcp2200_getch ( void  )

Receive one character from MCP2200

Returns:
unsigned char RCREG

Definition at line 73 of file mcp2200_uart.c.

Here is the caller graph for this function:

uint8_t mcp2200_getche ( void  )

A simple 'echo back what was sent'

Returns:
unsigned char character sent

Definition at line 85 of file mcp2200_uart.c.

Here is the call graph for this function:

void mcp2200_init ( void  )

Configures the UART module for 9600 baud.

Note:
If this is changed, you must change it in the GUI as well

Definition at line 21 of file mcp2200_uart.c.

Here is the caller graph for this function:

void mcp2200_prompt ( void  )

Outputs a message to prompt the user for a keypress through COM port

Definition at line 39 of file mcp2200_uart.c.

Here is the call graph for this function:

void putch ( uint8_t  byte)

Prints a single character If using PRINTF, this MUST be avaliable!

Parameters:
byteunsigned char

Definition at line 61 of file mcp2200_uart.c.

Here is the caller graph for this function: