Pages: [1]   Go Down
Author Topic: Grounding digital input 1 - dangerous?  (Read 712 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have a design that uses 2 jumpered inputs for mode selection - the idea is that I turn on the internal pull-ups then selectively ground the inputs to give me a 4-way combo.

Laying out a PCB for it, the most convienient inputs would be 0 & 1 - but I was concerned since pin 1 is used as Tx output by the sketch loader, that when the programmed chip was in my PCB this pin will get set to output momentarily at some point, and therefore having it tied low would be bad....

Is that a correct assumption?

Ultimately the chip will be ISP programmed without the bootloader, but for now it's convenient to keep it in...

Cheers
Logged

New York, NY, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 40
Howdy. I don't check PMs often, so email me!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Generally it's a good idea to leave pins 0 and 1 free for the bootloader to do its work.  I haven't tried grounding it in the way you mention, but I imagine it would give you uploading headaches.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just to clarify - this would not be grounded on the Arduino, only on the target run-only PCB (which has no upload capability)

Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34541
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it is only on the target then it is perfectly aright to treat this pin as you would any other.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

But if the bootloader is still in place (during my development/debug), does that not set the pin to output during it's "check if there's anything to upload" initialisation that happens before my code ever runs?  :-/
Logged

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 634
Posts: 34541
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes I was assuming that you were eliminating the boot loader. No problem though in place of a ground just put a 220R pull down resistor. That will look like a logic zero when the pin is an input and will limit the current to a safe value when it is an output.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 106
Where's the Kaboom?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cheers - just wanted confirmation. It's going to be easier to re-route to another input than squeeze in another resistor...
Logged

Pages: [1]   Go Up
Jump to: