Short circuit detection on MC9S12XDP512

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Short circuit detection on MC9S12XDP512

2,814 Views
ahmedfathy
Contributor I
Hi;

I'm doing validation for digital input output module on the MC9S12XDP512 microcontroller.

In the microcontroller data sheet; the PTIT, PTIS, PTIM, PTIP, PTIH, and PTIJ registers are used "as written on data sheet" to detect overload or short circuit conditions on output pins.

So, please verify if the next test is an Applicable test:

DDRH = 0xFF;   // Data direction is output
PTH = 0xFF;      // Output Value is HIGH
force eternal LOW signal "Short Circuit" on PortH.
Read PTIH;       // The value read is 0x00

Notes:
The upove test will work correctly and will not harm the microcontroller, or cause any problem.
This test can be done for a long time, as long as it is needed.

If the previous notes is true and the  test is Applicable, please notify me.

Thank you so much.
Labels (1)
0 Kudos
Reply
5 Replies

715 Views
Xbot
Contributor II
yup i think you can do that...
 
- when not forced externally to LOW does PTIH read 1?
- you mean to test entire portH?doesn't your pins on portH have unique names (pin 1 in portH: motor_output)?
 
- usually the one who tests using register names are the developers.
0 Kudos
Reply

715 Views
Nabla69
Contributor V
Hello,
 
If you do a short circuit on an output but do not put any current limiting resistor, you can expect the magic smoke to escape from the MCU.
 
The MCU will not work once this magic smoke is produced.
It is not possible to re-inject magic smoke once escaped.
 
Cheers,
Alban.
0 Kudos
Reply

715 Views
ahmedfathy
Contributor I
Hi Nabla;

I think you answer only one part of my question.

I need to know what is your understanding of these registers usage?

Another thing please read the data sheet "MC9S12XDP512 Data Sheet, Rev. 2.15" page 840; for the PTIT register Field Description.

Thank you so much; and your answer is very wellcomed.
0 Kudos
Reply

715 Views
Nabla69
Contributor V
Hello Ahmed,

The usual GPIO (general purpose digital input output) works as the following, I will take PORTA:
If PORTA is an output, READ on PORTA will return the value of the PORTA register,
If PORTA is an input, READ of PORTA will return the STATUS of the PIN and not what value was written in the register.

With the timing like PORT T, it can be interesting to read the real status of the pin.
If you had a standard GPIO, to read the pin level, you would have to change the Data Direction Register.

That's why I believe these INPUT registers were created.

Cheers,
Alban_nablA.
0 Kudos
Reply

715 Views
ahmedfathy
Contributor I
Dear Nabla;

As i said before; this problem is for the ports listed above.
they have special feature.

we can conclude any thing; but they write a special purpose for it."Over load and Short circuit detection"

I can suggest their usage is for bus communication; as u know to make control over a bus u have to sense the bus first, so all the nodes may have high, but how take the control is the first one to push the bus to a low signal.

but what i need to know; Is there any limitation for the timing or for any thing?
because i already make the previous test and nothing was burned. but i make it for a short time. about 2 sec.

But i need someone knows about this issue specificly to gurantee this test.

any way thank you so much.

If there is any way or suggestion to have this gurantee, i'll be thankfull.
0 Kudos
Reply