financecatalyst
- 9th July 2011, 01:00
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:
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.
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:
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.