• 0
JimViau

proMX7 low output when USB disconnected

Question

I have my proMX7 board running a very simple code that I adapted from Robogaia.com. I use the code to access an LS7366 Quadrature Counter and Rotary Encoder. The proMX7 is also driving an LKM1638 (8 digits LED driver board). I use the LKM1638 as a display output to read the LS7366 count value. Both peripherals are driven via SPI communication and using DSPI virtual object library. I am using two distinct ports, one for each peripheral. JA is connected to the LKM1638 display and JE is connected to the LS7366 counter via pins 1 2 3 4, SS3 SDO3 SDI3 SCK3. The code is very simple. I send a Read request to the LS7366, get the answer from the chip and send a little calculated value to the LKM1638. The calculated value appear on the display. I manually turn the encoder and I can see the actual value on the display change accordingly. It run smoothly and very accurately... until... Now the strangest thing happen when I want my proMX7 to run independently from the desktop computer I use for programming the board. So I just disconnect my USB wire from the computer and suddenly the LS7366 literally stop sending data through MISO->SDI3 !

I put my scope on both the digital outputs from JA to verify signal on the display and found no problem. I repeated the same test on the JE output pins 1 2 4 and found that the digital signal strength goes from 3.4Vpeak to as low as 2.7Vpeak. Obviously, 2.7V is not enough to drive the LS7366 counter, hence, no more output since it doesn't receive enough signal input.

I have yet to build a circuit to correct the problem electronically ( transistor common base or something like that ).

But, the question remains. Why is the SPI3 port looses signal strength when the USB is disconnected ? I know that internally, somehow, the UART is related to USB J2 on the proMX7. I am not knowledge enough to understand the intricate consequences about this relationship but I would certainly like to understand what is happening here. Is it possible that my proMX7 board is defective (I doubt it. Its been running fine for a while now ) ? Furthermore, why is the signal strength from JA is Not loosing strength when the USB from J2 is suddenly disconnected ? By the way, both LS7366 and LKM1638 are driven with JA and JE power pins 12 set to 5Vdc. I had trouble running the LKM1638 display at 3.3V and the LS7366 would run on 3.3V but my encoder would not, so I had to run the counter on the same Vcc as the encoder. I am actually stunned that the LS7366 is able to accept a 3.4Vpeak digital signal when powered with 5V, but hey! it works. Now, I am Not surprised the slightest bit that it wont work with a 2.7Vpeak signal strength. Besides the spec sheet clearly mention a minimum 3.5V logic high.

So, the question remains: Why is the JE digital output strength looses 0.7V when the USB J2 is disconnected from the computer ?

Is there a solution to this problem ?  ( see documents attached )

Thanks for your help anyone !

 

LS7366MX7.ino

LS7366 Quadrature_Counter LSI.pdf

Share this post


Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hello,

The two main reasons I can think of which would make the voltage drop like that are:

1. Too much current is being drawn from the signal pin.

2. The board's power supply is insufficient. 

Therefore I would like to ask you the following: What is the value of the 3V3 power supply from the ProMX7 when the voltage on the pins is 2.7V? You can measure that on the jumper pins next to the Pmod connector or on the Pmod's Vcc pin after setting the corresponding jumper to 3V3. 

Also, could you please tell us how you are powering the ProMX7 board and where is the jumper placed in the power select block (J3)? Keep in mind that there are 4 USB connectors on the board. Which one are you using / disconnecting ? And are the other modules also powered from the ProMX7 ?

Sergiu

 

 

 

 

Share this post


Link to post
Share on other sites
  • 0

3V3 = 3.27V (metered) and the V5V = 5.16V, Neither voltages are dropping the slightest iota when I disconnect the USB cable. J3 is set to EXT, I am using an external PWM power supply from Fujifilm 5Vdc 1Amp. It's a well manufactured good quality power adapter meant to supply the 5V power to some electronic thing (don't remember). 1 Amp is plenty for my application. I the proMX7 board along with the LS7366 CMOS chip and an LED display.  As for too much current draw on the SS pin, I am feeding the SS input pin of a CMOS LS7366 which, according to spec, will draw so little current that they did not even bother to measure, spec is listing 0 micro amp, so much for too big a load.

One other peripheral is connected to JA pins 1,2,3 and is drawing some current out of the V5V. Current not measured but suspected to be about 100mA. It is a LED display. I use it to display the LS7366 counter value. I tried to take in and out to see if it's presence could make any difference... negative. Same signal drop at USB disconnection.

I am using J2 USB with JP11 shorted. I've been using my board for learning how to program PIC32 so it's always been connected as such. Another thing, since I ported my sketch to address JD DSPI0 object instead of JE DSPI1, the problem has vanished completely. Since then, if I disconnect the USB cable the LS7366 keep responding without any interruption. When USB gets reconnected I do get a program reset, but that is just normal given the fact that JP11 is connected.

This behavior is very weird. I think it's got to do with some internal idiosyncrasy within the μController. Or, perhaps and idiosyncrasy unique to my board. All μController are not necessarily coming out of the factory identical, I read that somewhere.

If you find an explanation, I'd certainly be glad to hear about it. Thanks for your help.

Share this post


Link to post
Share on other sites
  • 0

Hi Jim,

Your first post says you used JE for SPI3, but SPI3 is on JF. If you were in fact using SPI3, it shares pins with the debug usb port coming from your computer. I don't know much about it, but I'm guessing that maybe the peripheral pin select wasn't configured correctly? The debug USB port was probably helping pull the pins to ground in any case.

Share this post


Link to post
Share on other sites
  • 0

My first post actually says, in fact, "JE is connected to the LS7366 counter via pins 1 2 3 4, SS3 SDO3 SDI3 SCK3".

SS3 SD03 SDI3 and SCK3 are the PIC32 signal names, according to proMX7 Reference Manual. They are also called SS1A SDO1A SDI1A and SCK1A. If you look an page 18 and 19 of the Reference Manual, the SS3 SDO3 SDI3 and SCK3 are the names utilized to identify JE which is actually suppose to be referring to DSPI1 object from the DSPI library. The same Reference Manual is also identifying JF DSPI2 pins 1,2,3,4 named SS4 SDO4 SDI4 ans SCK4. But recently some updates on the UECIDE editor, the DSPI library as been modify to refer to DSPI2 as being implemented on JD and JF as been switched to DSPI0. I don't know why the switch but it's been a significant problem for my until I discovered by trial and error that the switch was implemented on the newest version uecide-0.8.8alpha22-windows-full. I hope the next time another version of UECIDE is published we get an advise concerning the switch back to JD DSPI0 JF DSPI2, if it ever comes back to the original disposition.

Hope this clarify a few things.

Regards

Share this post


Link to post
Share on other sites
  • 0

Hi JimViau,

Digilent does not maintain or contribute to UECIDE, so any file definition changes that occur in that enviornment (like the DPSI changes you experienced) are outside of Digilent's control.

Thanks,
JColvin

Edited by JColvin

Share this post


Link to post
Share on other sites
  • 0

Unfortunately there is not an identical correspondence between DSPI numbers and hardware SPI interface numbers. So, for each board, the reference manual makes light in this matter. For example, the ProMX7 reference manual states this:

The DSPI0 object class is used to create an object used to access SPI1, Pmod connector JD. The DSPI1 object class is used to access SPI3, Pmod connector JE, and the DSPI2 object class is used to access SPI4, Pmod connector JF.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now