- This topic has 3 replies, 2 voices, and was last updated 9 years, 8 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
|
Microcontroller › AVR › why avr microcontroller takes high input cuurrent about 30 ma………….
#include <avr/io.h>
#include <util/delay.h>
void main()
{
DDRB=0x00;
DDRA=0xff;
PORTB=0x00;
while(1)
{
if(bit_is_clear(PINB,PB0)==0)
{
PORTA=0xff;
}
PORTA=0x00;
}
}
the circuit is wrong.
you can not left the pin floating. it should be connected to ground through 1K – 10K resistance.
this ckt is suggested by you but again same problem is going on ……..it takes large 30 ma current…..incase of analog ics ..its only takes in turmes of micro ampere ……….but this is digital once but why it takes so large current?wysiwyg_imageupload:12968:
where and how u r measuring current?