xpress_embedo
Advanced Member level 4
- Joined
- Jul 5, 2011
- Messages
- 1,154
- Helped
- 161
- Reputation
- 396
- Reaction score
- 189
- Trophy points
- 1,353
- Location
- India
- Activity points
- 10,591
I presume that the missing regulator ground is only a drawing error.
B2515LG is specified with mA range leakage current, it's apparently unsuited for the application.
To get 2V at the output of the 7805 implies leakage back through the LM1117 as well. That is quite possible, especially if the PIC has any outputs left high which could be feeding other components on the 3.3V rail. The best solution may be to replace R1 with say 4 diodes in series (or a 3.3V Zener) so the 2V is dropped low enough that it make the INT pin low even when 2V is present but still goes high when 5V is there. You should also add a capacitor at the input to the 7805 for stability and of course check you actually have a ground connected!
Brian.
/*
* Enable External Interrupt-2
* Used to Detect Supply off Condition
*
*/
TRISEbits.TRISE9 = 1;
mINT2SetIntPriority(6);
mINT2SetEdgeMode(0);
mINT2ClearIntFlag
mINT2IntEnable(1);
/**/
void __ISR(_EXTERNAL_2_VECTOR,IPL6SOFT) SleepWakeUp_Interrupt(void)
{
int value;
if(PORTEbits.RE9 == 0)
{
mINT2SetIntPriority(5);
mINT2SetEdgeMode(1); //Rising Edge
mINT2IntEnable(1);
EnableSleepMode=1; //Enable Sleep Mode
}
else
{
EnableSleepMode=0;
Delay_ms(100);
SYSTEMConfigPerformance(SYS_CLOCK);
mOSCSetPBDIV(OSC_PB_DIV_2);
//Configures the System for Multi-Vectored Mode
INTConfigureSystem(INT_SYSTEM_CONFIG_MULT_VECTOR);
value = OSCCON;
while (!(value & 0x00000020))
{
value = OSCCON; // Wait for PLL lock to stabilize
}
Lcd_Init();
Lcd_Write_Text("Waking...");
Delay_ms(1000);
mINT2SetIntPriority(5);
mINT2SetEdgeMode(0); //Falling Edge
mINT2IntEnable(1);
}
mINT2ClearIntFlag();
}
you can use 1n4001 - 7 which has only 5uA leakage current.. 1n4148 is a fast switching diode it also have low leakage current but we don need it here....
exactly what is the operating region for your pic...?
A straightforward solution would be an actively controlled FET switch, but it doesn't fit your PCB without modifications.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?