16F877A - problem with Port D


Closed Thread
Results 1 to 2 of 2
  1. #1

    Default 16F877A - problem with Port D

    Hello, I am working with 16F877A which Serin some signal and put it's ports high or low. I have 4 LED's on Port B (7,6,5,4) & 4 LED's on Port D(7,6,5,4).

    The one on PortD are being funny. They are not responding to the inputs. Not going high or low. I am using DT_Int in the code as well. My config values are as follows:
    Code:
    DEFINE OSC 4
    Include "modedefs.bas"
    INCLUDE "DT_INTS-14.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ; Include if using PBP interrupts
     
    @ __Config _XT_OSC & _WDT_OFF & _PWRTE_ON & _BODEN_ON & _LVP_OFF & _CP_ALL & _CPD_ON
     
    Pause 50
    wsave VAR BYTE $70 SYSTEM
    
    '-------------------------FUSES SET----------------------------
    PAUSE 50
    ADCON1=7
    CMCON=7
    CCP1CON=0
    OPTION_REG=%10000000
    TRISA=0 : PORTA=0
    TRISE=0 : PORTE=0
    TRISB=0 : PORTB=0
    TRISC=%10000000 : PORTC=0
    TRISD=0 : PORTD=0
    @ ERRORLEVEL -306
    Is something wrong with my fuse settings, rest everything seems fine to me.
    ___________________
    WHY things get boring when they work just fine?

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default Re: 16F877A - problem with Port D

    Nothing wrong or special with PORTD on this one. Config fuses seems fine. Something's wrong somewhere in your whole code.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts