Helo, all !!

I have a doubt, I'm using a MC9S12DP512 microcontroller to read another microcontroller, that I will name it as A. But I'm having some problems. Here, I will present you a image of a log made with an oscilloscope. The Blue signal, I will name it X, and the Red I will name it Y. So, The X pin( the blue signal) needs to be an output, and the Y pin(The red signal) Needs to be an input. However, both pins are at the same port, Port H, on the MC9S12DP512 microcontroller. And, the driver that I'm using, change the direction of all pins of the Port H at the same time. enter image description here enter image description here

So, I observed that, after the command below, The X (Blue signal) goes to low-logic.

DDRH = 0x00; / DDRH is Port H Data Direction Register */

I observed too that,the Y (Red signal) seems to be very attenuated in some instants and others moments don't.

I did the same test, using the same microcontroller MC9S12DP512 to read anothers similar devices on the other side, all others similar devices has the same internal microcontroller, that I called it as A, and the majority were read without problems, and the pulses did not appear. Only one of them showed problems. I know that the problem is not in this particular device, because it can be read by others equipements that I have and it works fine.

So, I have two doubts.

  1. Why signal X(The Blue one) has the behavior showed on the figure ?
  2. Why this behavior does not happen when I do it using a MC9S12DP512 to read a similar device with the same microcontroller A on the other side?

Thank you very much!

Added Later:

Both microcontroller are 5V. By the read line I expect to read the microcontroller A using the MC9S12DP512. By the blue Line I expect to write to microcontroller A using the MC9S12DP512. But, the reading and writting does no happen at the same time. It is part of a JTAG communication, the red is TDO and Blue is RST

  • 2
    \$\begingroup\$ I'm having trouble getting past your statement, "And, the driver that I'm using, change the direction of all pins of the Port H at the same time" . . . If you need inputs AND outputs on Port H and the driver doesn't let you do it, just how are you planning to succeed? \$\endgroup\$ – mike65535 Jun 29 '18 at 16:55
  • 2
    \$\begingroup\$ That red signal looks like it has contention (i.e. multiple drivers.. both devices driving?).. until, at some point later, it doesn't (or overcomes it).. and then, does again :/ Try to detail the differences, if any, between the two setups. \$\endgroup\$ – CapnJJ Jun 29 '18 at 16:57
  • 1
    \$\begingroup\$ Why can't red line be driven by A?? What are the voltage levels both are operating at \$\endgroup\$ – User323693 Jun 29 '18 at 17:00
  • 1
    \$\begingroup\$ Why is every fourth blue pulse is higher than others? What signal it is? Data, clock or \$\endgroup\$ – User323693 Jun 29 '18 at 17:07
  • 1
    \$\begingroup\$ Can you try isolating red line and measure TDO again? Do you have any series resistor in the trace?? May be also disconnect blue line from A if possible and measure again \$\endgroup\$ – User323693 Jun 29 '18 at 17:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.