chanchal.chauhan
Full Member level 4
- Joined
- Apr 23, 2009
- Messages
- 216
- Helped
- 5
- Reputation
- 10
- Reaction score
- 1
- Trophy points
- 1,298
- Location
- Hyderabad, India
- Activity points
- 2,539
I am using PIC16f506 microcontroller. Here microcontroller is drawing 540uA current.
I am using 4Mhz INTosc clk frequency & all peripheral is disable.
In my configuration bits WDT & CP is disable, MCE is RB3/MCLR function as RB3.
Below is the code which i have used.
#include<htc.h>
void main()
{
OSCCAL=0b00000000;
CM1CON0=0b00000000;
CM2CON0=0b00000000;
VRCON=0; // Disable CVref
OPTION=0b11000000; //prescale 1:256
TRISB=0xff;
TRISC=0xff;
ADCON0=0b00111101;
while(1)
{
}
}
Please let me know why its happening? any suggestion is helpful for as.
Regards
Chanchal Chauhan
I am using 4Mhz INTosc clk frequency & all peripheral is disable.
In my configuration bits WDT & CP is disable, MCE is RB3/MCLR function as RB3.
Below is the code which i have used.
#include<htc.h>
void main()
{
OSCCAL=0b00000000;
CM1CON0=0b00000000;
CM2CON0=0b00000000;
VRCON=0; // Disable CVref
OPTION=0b11000000; //prescale 1:256
TRISB=0xff;
TRISC=0xff;
ADCON0=0b00111101;
while(1)
{
}
}
Please let me know why its happening? any suggestion is helpful for as.
Regards
Chanchal Chauhan