saramah
Member level 3
Hi All,
All other pins are working well as expected but RA4 PIN which is open drain type in pic 16f628a not working with the hardware arrangement like Vcc--R(470E)--LED--RA4. ckt is attached.
And the program is here for this operation.
code for this particular pin is shown above.
what am i missing in the code/ hardware for this particular pin for which this ra4 pin not operating while the others pin working correctly with their respective port settings.
thx for your reply in advance.
All other pins are working well as expected but RA4 PIN which is open drain type in pic 16f628a not working with the hardware arrangement like Vcc--R(470E)--LED--RA4. ckt is attached.
And the program is here for this operation.
Code:
#define RELAY3 PORTAbits.RA4
#define TRIS_RELAY3 TRISAbits.TRISA4
void main() // ......
{
CMCON = 0x07;//comparator disable
TRIS_RELAY3 =0; //RA4 pin making it as o/p here
RELAY3 =0; //RA4 PIN>>Open drain
while(1) // wait forever for the data received and ready AND BEING operate with below to approproate load.
{
switch(command) // swich on
{
case 0x22: RELAY3 = !RELAY3; //Toggle relay 3// ITS OPEN DRAIN RA4 PIN/
break;
//others switch command
}
}
}
code for this particular pin is shown above.
what am i missing in the code/ hardware for this particular pin for which this ra4 pin not operating while the others pin working correctly with their respective port settings.
thx for your reply in advance.