TODOPIC
Microcontroladores PIC => Todo en microcontroladores PIC => Mensaje iniciado por: jriofrio en 24 de Junio de 2003, 18:37:00
-
Hola a todos en el forum
Quiciera pedir a la gente con experiencia con los PIC una manito en este problema a resolver...
http://www.zws.com/products/picxie2/index.html
En este URL esta el projecto que quiero hacer, el problema que estoy teniendo es el cambio del codigo del asembler del proyecto el cual usa el PIC16F84, el PIC que uso es el PIC16F676.
Si hay alguien que pueda darle un vistazo al codigo (el cual lo envio) del proyecto original y me podria recomendar los cambios que se nesecitaria hacer para poder ser usado con el PIC16F676, les agradeceria un mundo...
Gracias de antemano por su amabilidad.
JuanR
-
La parte con la que tengo mas dificultad es la siguiente:
;--------------------------------------------------------------------------
; SUBROUTINE Show frame for a short interval
;--------------------------------------------------------------------------
DisplayFrame MOVF FrameRate,0 ;get number of frame repeats
MOVWF FrameDelay
DFOuterLoop MOVLW SCREEN_HEIGHT ;Set number of lines to show
MOVWF FrameCount
MOVLW H"01" ;Row 0 (bottom)
MOVWF FrameTemp ;Temporary row select value
MOVLW Screen0 + SCREEN_HEIGHT ;Locate top of screen
MOVWF FSR
DFLoop MOVLW B"00000000" ;set both row/col flipflop clock lines low (inactive)
MOVWF PORTA
DECF FSR,1 ;increment row pointer while we"re waiting
MOVF INDF,0 ;get data for current row
MOVWF PORTB
MOVLW B"00000001" ;set column strobe
MOVWF PORTA
MOVF FrameTemp,0 ;get current selected row
MOVWF PORTB
MOVLW B"00000010" ;set row strobe
MOVWF PORTA
RLF FrameTemp,1 ;select next row while we"re waiting
BCF FrameTemp,0
CALL ShortDelay ;let the frame sit for a while
MOVLW B"11111111" ;blank the column lines to avoid crosstalk
MOVWF PORTB
MOVLW B"00000001" ;set column strobe
MOVWF PORTA
; NB: It isn"t absolutely necessary to blank the row lines, but it does
; prevent slight "ghosting" which will otherwise occur. For example, comment
; out these four lines and look at the LED in the top line, third from the
; right-hand edge, during the V1.0 firmware version screen at powerup. It
; should be completely dark; it will be about 25% on.
MOVLW B"00000000" ;blank the row lines to avoid crosstalk
MOVWF PORTB
MOVLW B"00000010" ;set row strobe
MOVWF PORTA
DECFSZ FrameCount,1 ;loop around until all lines are done
GOTO DFLoop
DECFSZ FrameDelay,1
GOTO DFOuterLoop
RETLW 0
------------------------------------------------------------------------
Donde el PIC16F84 tiene disponible 8 pins en el PORTB, los cuales pueden ser accedidos secuencialmente. En cambio en el PIC16F676 tiene 6 ports en A y 6 en C.
Yo estoy usando todos los pins de C y dos del A.
Los cuales no se pueden accesar en secuencia...
Hay alguien (con mucha experiencia con PIC) podria ayudarme por favor????
Cualquier ayuda es bienvenida...
Gracia.
JuanR