
SH7145 Group
SCI Break Detection
REJ06B0384-0100Z/Rev.1.00 September 2004 Page 15 of 20
6. Program Listing
/***********************************************************************************************/
/* SH7145F Application Note */
/* */
/* Function */
/* :SCI0 */
/* :Asynchronous Receive Mode(break) */
/* */
/* External input clock :12.5MHz */
/* Internal CPU clock :50MHz */
/* Internal peripheral clock :25MHz */
/* */
/* Written :2003/12 Rev.1.0 */
/***********************************************************************************************/
#include "iodefine.h"
#include <machine.h>
/***********************************************************************************************/
/* Symbol Definition */
/***********************************************************************************************/
#define COUNT 3
/***********************************************************************************************/
/* Function Define */
/***********************************************************************************************/
void main(void);
void init_sci(void);
unsigned char rcv_sci(unsigned char);
void err(void);
void cmt_int(void);
void dummy_f(void);
/***********************************************************************************************/
/* RAM Allocation Definition */
/***********************************************************************************************/
unsigned char T_count; /* Timer interrupt count */
unsigned char Rd_Count; /* RxD low level count */
volatile unsigned char Rev_data[COUNT]; /* Receive data */
Comentarios a estos manuales