代码搜索结果
找到约 10,000 项符合
USART 的代码
usart.h~
//波特率9600/9个数据位/1个停止位/奇校验/收发开启/接收中断
void USARTinit(void)
{
UCSR0B=0x9C;
UCSR0C=0x36;
UBRR0L=0x2F;
PORTD.4=0; //MAX485平时工作在接收状态
DDR
usart.h
#ifndef _SERIAL_H_
#define _SERIAL_H_
#define _16F628A 1
#define BAUD 2400
#define FOSC 4000000L
#define NINE 0 /* Use 9bit communication? FALSE=8bit */
#define DIVIDER ((int)(FOSC/(64UL *
usart.h
#ifndef __USART_H__
#define __USART_H__
#include "MEGA16.h"
#include "INIT.h"
#include "EEPROM.h"
#define UDRE 5
#define R_485 PORTD= PORTD&0XDF
#define W_485 PORTD= PORTD|0
usart.h~
#ifndef __USART_H__
#define __USART_H__
#include "MEGA16.h"
#include "INIT.h"
#include "EEPROM.h"
#define UDRE 5
#define R_485 PORTD= PORTD&0XDF
#define W_485 PORTD= PORTD|0
usart.h~
#ifndef __DISPLA_H__
#define __DISPLA_H__
#include "MEGA16.h"
#include "INIT.h"
void show(void)
{
PORTA=0XFF;
PORTB=0XFE;
}
#endif
usart.asm
;
; Software License Agreement
;
; The software supplied herewith by Microchip Technology Incorporated
; (the 揅ompany
usart._c
#define USART_C
#include "includes.h"
void put_char(unsigned char ch)
{
/* if(ch == '\n')
{
usart_putchar('\r');
} */
while(!(UCSRA&(1
usart.c
//#define USART_C
#include "includes.h"
void put_char(unsigned char ch)
{
/* if(ch == '\n')
{
usart_putchar('\r');
} */
while(!(UCSRA&(1
usart.h
#define RXB8 1
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7
#define FRAMING_ERROR (1