![Angelito Angelito]()


hola pic.amigos
con esta carta los saludo y me disculpo por el otro herroe que cometi espero que con este proyecto que si funciona los pueda recompensar a todos
cualquie inquietud me escriben al
jucemoar102@yahoo.es para compartir experiencias...... señores TODOPIC. me gustaria que me ayudaran por que yo lleno el pic. con 900 lineas de 1000 tiene y solo me muestra 450 lineas que sera lo que pasa o en que me equiboque? aqui esta el asm para todos espero lo hagan lo modifiqueny lo compartan como lo hize yo. chao a todos julio c.
;PRAC33B.ASM
;Este programa muestra un mensaje en un display matricial de 8 filas
;x 55 columnas.
;Circuito No. 22.
processor 16f84a
include <p16f84a.inc>
__config _XT_OSC & _WDT_OFF & _PWRTE_ON & _CP_OFF
cblock 10h
reg1, reg2, reg3
linea1, linea2, linea3, linea4, linea5, linea6, linea7, linea8,
linea9
linea10, linea11, linea12, linea13, linea14, linea15, linea16,
linea17
linea18, linea19, linea20, linea21, linea22, linea23, linea24,
linea25
linea26, linea27, linea28, linea29, linea30, linea31, linea32,
linea33
linea34, linea35, linea36, linea37, linea38, linea39, linea40,
linea41
linea42, linea43, linea44, linea45, linea46, linea47, linea48,
linea49
linea50, linea51, linea52, linea53, linea54, linea55
endc
org 00
goto inicio
;La tabla1 contiene los valores hexadecimales para cada columna de LEDs
tabla1 addwf 02h,1 ;Suma W al PC
retlw 00h
retlw b"01111111" ;B
retlw b"01001001"
retlw b"01001001"
retlw b"01001001"
retlw b"00110110"
retlw 00h
retlw b"01111111" ;I
retlw 00h
retlw b"01111111" ;E
retlw b"01001001"
retlw b"01001001"
retlw b"01001001"
retlw b"01000001"
retlw 00h
retlw b"01111111" ;N
retlw b"00001000"
retlw b"00010000"
retlw b"00100000"
retlw b"01111111"
retlw 00h
retlw b"00011111" ;V
retlw b"00100000"
retlw b"01000000"
retlw b"00100000"
retlw b"00011111"
retlw 00h
retlw b"01111111" ;E
retlw b"01001001"
retlw b"01001001"
retlw b"01001001"
retlw b"01000001"
retlw 00h
retlw b"01111111" ;N
retlw b"00001000"
retlw b"00010000"
retlw b"00100000"
retlw b"01111111"
retlw 00h
retlw b"01111111" ;I
retlw 00h
retlw b"01111111" ;D
retlw b"01000001"
retlw b"01000001"
retlw b"01000001"
retlw b"00111110"
retlw 00h
retlw b"00111110" ;O
retlw b"01000001"
retlw b"01000001"
retlw b"01000001"
retlw b"00111110"
retlw 00h
retlw b"00100110" ;S
retlw b"01001001"
retlw b"01001001"
retlw b"01001001"
retlw b"00110010"
retlw 00h
retlw 00
retlw 00
retlw b"01111110" ;A
retlw b"00001001"
retlw b"00001001"
retlw b"00001001"
retlw b"01111110"
retlw 00h
retlw 00
retlw 00
retlw b"01111111" ;L
retlw b"01000000"
retlw b"01000000"
retlw b"01000000"
retlw b"01100000"
retlw 00h
retlw b"01111110" ;A
retlw b"00001001"
retlw b"00001001"
retlw b"00001001"
retlw b"01111110"
retlw 00h
retlw b"00000001" ;T
retlw b"00000001"
retlw b"01111111"
retlw b"00000001"
retlw b"00000001"
retlw 00h
retlw b"01111111" ;I
retlw 00h
retlw b"01111111" ;N
retlw b"00001000"
retlw b"00010000"
retlw b"00100000"
retlw b"01111111"
retlw 00h
retlw b"00111110" ;O
retlw b"01000001"
retlw b"01000001"
retlw b"01000001"
retlw b"00111110"
retlw 00h
retlw b"00100110" ;S
retlw b"01001001"
retlw b"01001001"
retlw b"01001001"
retlw b"00110010"
retlw 00h
retlw 00h
retlw 00h
retlw b"01111111" ;P
retlw b"00001001"
retlw b"00001001"
retlw b"00001001"
retlw b"00000110"
retlw 00h
retlw b"01111111" ;I
retlw 00h
retlw b"01100001" ;Z
retlw b"01010001"
retlw b"01001001"
retlw b"01000101"
retlw b"01000011"
retlw 00h
retlw b"01100001" ;Z
retlw b"01010001"
retlw b"01001001"
retlw b"01000101"
retlw b"01000011"
retlw 00h
retlw b"01111110" ;A
retlw b"00001001"
retlw b"00001001"
retlw b"00001001"
retlw b"01111110"
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 00h
retlw 0ffh
inicio bsf STATUS,5 ;
movlw 00h
movwf PORTA ;Puerto A como salida
movwf PORTB ;Puerto B como salida
bcf STATUS,5
bsf PORTA,1 ;CLEAR = 1
Run1 clrf linea1
clrf linea2
clrf linea3
clrf linea4
clrf linea5
clrf linea6
clrf linea7
clrf linea8
clrf linea9
clrf linea10
clrf linea11
clrf linea12
clrf linea13
clrf linea14
clrf linea15
clrf linea16
clrf linea17
clrf linea18
clrf linea19
clrf linea20
clrf linea21
clrf linea22
clrf linea23
clrf linea24
clrf linea25
clrf linea26
clrf linea27
clrf linea28
clrf linea29
clrf linea30
clrf linea31
clrf linea32
clrf linea33
clrf linea34
clrf linea35
clrf linea36
clrf linea37
clrf linea38
clrf linea39
clrf linea40
clrf linea41
clrf linea42
clrf linea43
clrf linea44
clrf linea45
clrf linea46
clrf linea47
clrf linea48
clrf linea49
clrf linea50
clrf linea51
clrf linea52
clrf linea53
clrf linea54
clrf linea55
movlw 00
movwf reg2 ;contador de columnas = 0
Run2 movlw .20 ;carga contador de barridos y controlador
movwf reg3 ;de velocidad de desplazamiento
call Shift ;
incf reg2,1 ;incrementa contador de columnas
movf reg2,0 ;
call tabla1
movwf linea55 ;guarda dato traido de la tabla
xorlw 0ffh ;
btfsc STATUS,2 ;dato de la tabla = ff?
goto Run1 ;si: reinicia mensaje
Run3 decfsz reg3,1 ;no: decrementa cotador de barridos
goto Run4
goto Run2
Run4 call Scan
goto Run3
Scan bsf PORTA,0 ;DATA = 1
call pulso
bcf PORTA,0 ;DATA = 0
movf linea1,0
movwf PORTB
call pulso
movf linea2,0
movwf PORTB
call pulso
movf linea3,0
movwf PORTB
call pulso
movf linea4,0
movwf PORTB
call pulso
movf linea5,0
movwf PORTB
call pulso
movf linea6,0
movwf PORTB
call pulso
movf linea7,0
movwf PORTB
call pulso
movf linea8,0
movwf PORTB
call pulso
movf linea9,0
movwf PORTB
call pulso
movf linea10,0
movwf PORTB
call pulso
movf linea11,0
movwf PORTB
call pulso
movf linea12,0
movwf PORTB
call pulso
movf linea13,0
movwf PORTB
call pulso
movf linea14,0
movwf PORTB
call pulso
movf linea15,0
movwf PORTB
call pulso
movf linea16,0
movwf PORTB
call pulso
movf linea17,0
movwf PORTB
call pulso
movf linea18,0
movwf PORTB
call pulso
movf linea19,0
movwf PORTB
call pulso
movf linea20,0
movwf PORTB
call pulso
movf linea21,0
movwf PORTB
call pulso
movf linea22,0
movwf PORTB
call pulso
movf linea23,0
movwf PORTB
call pulso
movf linea24,0
movwf PORTB
call pulso
movf linea25,0
movwf PORTB
call pulso
movf linea26,0
movwf PORTB
call pulso
movf linea27,0
movwf PORTB
call pulso
movf linea28,0
movwf PORTB
call pulso
movf linea29,0
movwf PORTB
call pulso
movf linea30,0
movwf PORTB
call pulso
movf linea31,0
movwf PORTB
call pulso
movf linea32,0
movwf PORTB
call pulso
movf linea33,0
movwf PORTB
call pulso
movf linea34,0
movwf PORTB
call pulso
movf linea35,0
movwf PORTB
call pulso
movf linea36,0
movwf PORTB
call pulso
movf linea37,0
movwf PORTB
call pulso
movf linea38,0
movwf PORTB
call pulso
movf linea39,0
movwf PORTB
call pulso
movf linea40,0
movwf PORTB
call pulso
movf linea41,0
movwf PORTB
call pulso
movf linea42,0
movwf PORTB
call pulso
movf linea43,0
movwf PORTB
call pulso
movf linea44,0
movwf PORTB
call pulso
movf linea45,0
movwf PORTB
call pulso
movf linea46,0
movwf PORTB
call pulso
movf linea47,0
movwf PORTB
call pulso
movf linea48,0
movwf PORTB
call pulso
movf linea49,0
movwf PORTB
call pulso
movf linea50,0
movwf PORTB
call pulso
movf linea51,0
movwf PORTB
call pulso
movf linea52,0
movwf PORTB
call pulso
movf linea53,0
movwf PORTB
call pulso
movf linea54,0
movwf PORTB
call pulso
movf linea55,0
movwf PORTB
call pulso
return
;La rutina SHIFT mueve el dato de una columna a la columna de la
izquierda
;para dar "movimiento" al mensaje.
Shift movf linea2,0 ;
movwf linea1 ;
movf linea3,0 ;
movwf linea2 ;
movf linea4,0 ;
movwf linea3 ;
movf linea5,0 ;
movwf linea4 ;
movf linea6,0
movwf linea5
movf linea7,0
movwf linea6
movf linea8,0
movwf linea7
movf linea9,0
movwf linea8
movf linea10,0
movwf linea9
movf linea11,0
movwf linea10
movf linea12,0
movwf linea11
movf linea13,0
movwf linea12
movf linea14,0
movwf linea13
movf linea15,0
movwf linea14
movf linea16,0
movwf linea15
movf linea17,0
movwf linea16
movf linea18,0
movwf linea17
movf linea19,0
movwf linea18
movf linea20,0
movwf linea19
movf linea21,0
movwf linea20
movf linea22,0
movwf linea21
movf linea23,0
movwf linea22
movf linea24,0
movwf linea23
movf linea25,0
movwf linea24
movf linea26,0
movwf linea25
movf linea27,0
movwf linea26
movf linea28,0
movwf linea27
movf linea29,0
movwf linea28
movf linea30,0
movwf linea29
movf linea31,0
movwf linea30
movf linea32,0
movwf linea31
movf linea33,0
movwf linea32
movf linea34,0
movwf linea33
movf linea35,0
movwf linea34
movf linea36,0
movwf linea35
movf linea37,0
movwf linea36
movf linea38,0
movwf linea37
movf linea39,0
movwf linea38
movf linea40,0
movwf linea39
movf linea41,0
movwf linea39
movf linea42,0
movwf linea41
movf linea43,0
movwf linea42
movf linea44,0
movwf linea43
movf linea45,0
movwf linea44
movf linea46,0
movwf linea45
movf linea47,0
movwf linea46
movf linea48,0
movwf linea47
movf linea49,0
movwf linea48
movf linea50,0
movwf linea49
movf linea51,0
movwf linea50
movf linea52,0
movwf linea51
movf linea53,0
movwf linea52
movf linea54,0
movwf linea53
movf linea55,0
movwf linea54
return
delay movlw .20 ;Velocidad de desplazamiento
movwf reg1
del decfsz reg1,1
goto del
return
pulso call delay
bcf PORTA,1 ;CLK = 0
call delay
bsf PORTA,1 ;CLK = 1, activa salida
return
end