Unused analog inputs - failure mode

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Unused analog inputs - failure mode

1,577件の閲覧回数
celsoken
Contributor V
Hi all,

I am involved in a new QG8 project and these project has different targets with different resource allocation. So far I could manage the software to be a single one.

In one of these targets I don't use an analog input and my design checklist told me to program this pin as output so it wouldn't float.

The problem is that it turns out to be two softwares, even at conditional compilation, but two S19 files.

My question is: if I let this analog input floating, what could be the failure mode? If it is digital, it could lead to both fets conducting and excessive curent consumption, but the analog input could cause any trouble?

Any help will be appreciated,

Cheers,

Celso

ラベル(1)
0 件の賞賛
返信
2 返答(返信)

558件の閲覧回数
bigmac
Specialist III
Hello Celso,
 
You actually have two choices - set the unused pin as an output, or leave as an input and enable the internal pullup for the pin.  If you leave the unused pin floating, the voltage will probably float to a mid level, and the input circuitry within the device will have increased current draw.  The pin will also be more susceptable to static discharge.
 
To retain common software with varing resources, for a single target, there could be a number of approaches, depending on the hardware external to the device, specifically the interface circuitry for the ADC inputs.
  1. Perhaps allow for an external pullup (or pulldown) resistor, present when the ADC input is not used.  If there is already a voltage divider for ADC operation, leave the shunt resistor in place.  If the input is driven by an operational amplifier or analog buffer, the permanent presence of an additional high value pullup resistor (say 100k) may not affect the measurement.
  2. During initialisation, is it possible to sense wnether the external hardware is present or absent?
  3. If you have a spare pin on the device, use a link, jumper or DIP switch to set the required operating mode.
  4. Use a single byte of flash for non-volatile storage the required configuration.  This might be programmed from within the firmware, when it is run for the first time after programming, and a certain switch or pushbutton combination is actuated.

Unless two different targets are closely related to each other, I suspect that you will need a S19 file for each target.

Regards,

Mac

 

0 件の賞賛
返信

558件の閲覧回数
celsoken
Contributor V
Dear Mac,

Your wisdom is unpayable. It is not the first time you help me on these issues, I'd invite you for a beer if but unfortunately I'm located more than 10.000 miles from you.

You said that the voltage would float to a middle level, I think this could be true if it is a digital input and the current issues are known. I observed some analog inputs left opened and they move towards gnd or VCC.

In near future, at the next board review, I'll place a high-value resistor like you suggested, but SSDD, I'm in SOP. If I don't get any conclusive thought, I'll program the unused pin as an output.

Thanks again,

Celso

0 件の賞賛
返信