Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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

Status
Not open for further replies.

johnny78

Full Member level 4
Joined
Jun 28, 2017
Messages
206
Helped
0
Reputation
0
Reaction score
4
Trophy points
18
Activity points
1,702
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 ?
 

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

    Points: 2
    Helpful Answer Positive Rating
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:

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.
 

    johnny78

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top