Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Strange ATmega328 problem

johnny78

Member level 1
Joined
Jun 28, 2017
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
273
hello guys
im using Atmrga328 on Arduino UNO since a long time But im facing a strange problem for the first time
im using 6 pins as ouput to drive relays via bc337 transistor
pin19(arduino13)is driving the relay correctly But other pins cant drive the relays
when the pin is free it shows 5v on the multimeter But when connected to bc337 via10k resistor it cant drive it & the volt drops to 1v

any idea ?
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
19,284
Helped
4,272
Reputation
8,547
Reaction score
4,236
Trophy points
1,393
Activity points
127,990
Hi,

Are you complaining about pin19? Because it's working like expected?

Or about the other pins, that don't work.
If so, why do you hide all informations about these pins?
No pin number, no code, no fuse setup?

You give a lot of useless informations. This may be more confusing than it can help us to help you.

--> Learn to give focussed informations.
* what exact microcontroller? Farnell lists 37 types of "ATmega328", with different features, different packages, different pin count, with different datasheets.
* focus on the pins that don't work. Pin19 is not a good information, because it has different functions on different packages.
( Pin19 for example may be: ADC6, PortC.0, or PortB.5 ... depending on package)
* Pin functiins depend in setup, thus we need to see your code.
* special pin functions may depend on fuse setting, thus we need to see how you set them.
* showing the schematic is always a good idea, even if hand drawn.

We like to help. But sometimes we are not able..

Klaus
 

johnny78

Member level 1
Joined
Jun 28, 2017
Messages
36
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
273
Sorry guys
i've missed to write IntializeIO();
instead of it i've put InitializIO; without ()
so the pins get lit a little when i tested it on arduino uno again

its the first time i noticew this issue
when i send HIGH to a pin which its not defined as input or ouput it will give some volt on the pin
it gives 5 volts But no current vb so it will drop to 1 volt almost
 
Last edited:

danadakk

Advanced Member level 3
Joined
Mar 26, 2018
Messages
872
Helped
169
Reputation
341
Reaction score
190
Trophy points
43
Activity points
4,122
GPIO state on power up is tristate, so output V is determined by
leakage current (whose sign indeterminate) unless there is a
pulldown or pullup on pin. Basically pin is floating unless connected
to a load that can absorb the leakage. Datasheet discusses this.



Regards, Dana.
 

LaTeX Commands Quick-Menu:

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top