Autor Tema: Aber si me podriais decir si esta bien configurado el conversor del PIC16F876  (Leído 1941 veces)

0 Usuarios y 1 Visitante están viendo este tema.

Desconectado ajkite

  • PIC10
  • *
  • Mensajes: 23
CONFIGURACION_PUERTO
   BANCO1   
   movlw   b"10001111"   
   movwf   ADCON1      
   movlw   b"00001101"   
   movwf   TRISA      
   clrf   TRISB      ;portb como salida
   clrf   TRISC      ;portc como salida

   BANCO0
   clrf   PORTC
   clrf   PORTB
   clrf   PORTA
;***********************************************************************************************
;***********************************************************************************************
COMIENZO   clrf   ADRESL
      BANCO0
      clrf   ADRESH
      movlw   b"01000001"   
      movwf   ADCON0
      call   TEMPO_20us   
      bsf   ADCON0,2
BUCLE4      btfsc   ADCON0,2
      goto   BUCLE4      
      movf   ADRESH,00
      movwf   DATOSH      
      BANCO1
      movf   ADRESL,00
      movwf   DATOSL      
      movf   DATOSL,W
      call   TABLA_DE_VALORES


 

anything