⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rs232_04.asm

📁 Ejemplo 4 para 16F876 manejo de Puerto serial
💻 ASM
字号:
;************************************ RS232_04.asm ************************************
;
;	===================================================================
;	  Del libro "MICROCONTROLADOR PIC16F84. DESARROLLO DE PROYECTOS"
;	  E. Palacios, F. Remiro y L. L髉ez.
; 	  Editorial Ra-Ma.  www.ra-ma.es
;	===================================================================
;
; En el modulo LCD se visualizan los caracteres que se escriben en el teclado del ordenador.
; Si pulsa la tecla Enter se comienza a escribir en la segunda l韓ea de la pantalla del
; m骴ulo LCD.
;
; ZONA DE DATOS **********************************************************************

	__CONFIG   _CP_OFF &  _WDT_OFF & _PWRTE_ON & _XT_OSC
	LIST	   P=16F84A
	INCLUDE  <P16F84A.INC>

	CBLOCK  0x0C
	GuardaDato
	ENDC

RetornoCarro	EQU	d'13'		; C骴igo la de tecla "Enter".
CambioLinea	EQU	d'10'		; C骴igo para el "Cambio de l韓ea".

; ZONA DE C覦IGOS ********************************************************************

	ORG	0
Inicio
	call	LCD_Inicializa
	call	RS232_Inicializa
Principal
	call	RS232_LeeDato		; Espera recibir un car醕ter.
	movwf	GuardaDato		; Guarda el dato recibido.
	sublw	RetornoCarro		; Comprueba si ha pulsado la tecla Enter.
	btfsc	STATUS,Z
	goto	SaltaLinea2		; S

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -