Jump to content

Why does my DIN module see a 4.14V input as "logic low"


Sam_K
 Share

Recommended Posts

I am trying to hook up a keyboard matrix to my Core32 module and I've run into a problem.

I have a DIN and a DOUT module (both PCBs are R5) daisy chained together and hooked up to J8/9 on the STM32_R1 core module. In testing this issue, I have actually removed the keyboard altogether, so I won't describe it's circuit here. I am just trying to hook a DOUT pin directly to a DIN pin and trying to read the DOUT value from the DIN and I can't get even this simple test to work.

The resistors between the shift register and J3 on the DOUT module have been bypassed. When set to "logic high" the output voltage at a DOUT pin is 4.14V. Vcc at the DOUT shift register chip is 4.77V (and is also 4.77V at J2 on the core module).

The core of the problem seems to be this. At any DIN input, a voltage of 4.14V is being registered as a "logic low" value. According to the spec sheet of the SN74HC165N shift register on the DIN module, any value over 3.15V (at Vcc=4.5V) is supposed to be interpreted as "logic high".

If I connect Vd from the DIN module (4.77V) directly to the DIN pin, it is read as "logic high".

Given this set of circumstances, how can my keyboard matrix work at all??? Why is 4.14V being interpreted as logic low contrary to the specs of the shift register?

Really hoping that I've just done something stoopid that someone can easily point out, cos I'm really stumped.

Cheers, and thanks in advance for your help,

Sam

Link to comment
Share on other sites

Hi Sam,

thats indeed strange - it makes sense to do some initial checks to ensure that the DIN register is powered correctly.

E.g., it could be, that due to a missing Vdd connection to the DIN module the SRs are powered indirectly via the pull-up resistors of serial clock inputs, and this would cause such effects.

Compare Vdd at MBHP_CORE_STM32::J2:Vd of the core module and MBHP_DINX4::J1:Vd of the DIN module. If the core voltage is higher (e.g. 5.0V?) then it makes sense to try a direct connection between MBHP_CORE_STM32::J2 and MBHP_DINX4::J1 just to check if this helps. If yes: then the problem is related to a missing (or bad) Vd connection.

Check also that the R31 resistor array (4x220 Ohm) is stuffed and that the J25 jumper selects 5V.

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi TK,

Thanks for your reply! I made these checks and measurements just now.

J23 definitely selects 5V and R31 is stuffed with the resistor array which is fitted in the correct orientation.

Voltage at MBHP_CORE_STM32::J2 is 4.8V

Voltage at DIN::J1 is 4.8V

Voltage at DOUT::J2 is 4.8V (far end of DIN/DOUT daisy chain)

Voltage at Vcc pin of all DIN and DOUT shift registers is 4.8V

*Note: I am powering the core via USB from my laptop, the supplied voltage measured at J2 tends to slowly drift up and down over time by as much as 0.2v, presumably due to the state of charge of the laptop battery.

I also double checked that all the DIN/DOUT DIP sockets are stuffed with the correct chips (SN74HC165N on DIN and SN74HC595N on DOUT) and that they are fitted in the correct orientation.

I have also done the same tests using DIN::J4 in case there was a problem with the shift register connected to DIN::J3 but I still get the same results.

Link to comment
Share on other sites

Voltages are looking good, and it shouldn't be an issue that the voltage at J2 is a bit lower than 5V

In order to understand the problem a bit better, I would like to know why the output voltage of the 74HC595 is ca. 0.6V lower than Vdd

Such as a diode is connected in forward direction to the output?

Did you really try a direct connection between DIN and DOUT pin without any other components connected to these pins?

And are you using pull-up or down resistors on the DIN pins?

Best Regards, Thorsten.

P.S.: to confirm that it should work: Wilba's MBSEQ V4 frontpanel is stuffed with LED/button matrices, also my BLM project is working correctly with a STM32 based core.

Link to comment
Share on other sites

Righty-Ho! Believe it or not, it's a software problem with my app!

Whilst preparing my answers to your last post, I wrote a skeleeton app to just test the most basic case and the problem went away! (DOUTs are at VD when High (4.7v), and DINs register that as logic high.) Re-uploaded the original app, problem is back again.

So, at this point, my assumption is that the DOUTs are flickering rapidly between high and low which is causing the DINs to read a low value and would also explain the lowered voltage reading (I am just using a cheap multimeter, not a CRO).

So now I need to figure out where my custom SRIO code is going wrong. I thought I had all the DOUTs set high, but it seems that is not what is going on.

Link to comment
Share on other sites

Oh God! I'm soooo stoopid! I had re-enabled standard MIOS SRIO scanning to try something and forgotten to turn it off again. So the regular SRIO code, and my custom SRIO code where taking turns setting the DOUT pins.

:wacko:

Thanks agin for your time TK, sorry to waste it on a dumb coding goof.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...