Mostrar Numero s

download Mostrar Numero s

If you can't read please download the document

description

ejemplo asm para pic

Transcript of Mostrar Numero s

;**********************************************************************; Ejercicio 2.- Almacenar los nmeros pares en 15 posiciones contiguas; de la memoria de datos, empezando desde la posicion 20, luego mostrar; cada dato almacenado en el puerto B;**********************************************************************LIST P=16F877AINCLUDE "P16F877A.INC"__CONFIG _XT_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFFCBLOCK 0X40 ;definimos las variables que usaremosCONTA_1CONTA_2CONTA_3ENDCORG 0x20Count RES 15ORG 0X00BSF STATUS,RP0BCF STATUS,RP1movlw 0x00movwf TRISBBCF STATUS,RP0INICIOmovlw 0x02movwf Count ; Valor asignado a Direccion 20H = 0X02movwf PORTBcall Retardo_1s ; Tiempo en que permanecera prendido el ledmovlw0x00movwf PORTBcall Retardo_1s ; Tiempo en que permanecera apagado el ledmovlw 0x04movwf Count +1movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x06movwf Count +2movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x08movwf Count +3movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x0Amovwf Count +4movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x0Cmovwf Count +5movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x0Emovwf Count +6movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x10movwf Count +7movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x12movwf Count +8movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x14movwf Count +9movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x016movwf Count +10movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x18movwf Count +11movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x1Amovwf Count +12movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x1Cmovwf Count +13movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBcall Retardo_1smovlw 0x1Emovwf Count +14movwf PORTBcall Retardo_1smovlw 0x00movwf PORTBgoto INICIORetardo_1smovlw .1goto bucle_1sbucle_1smovlw d'10' ; W