CY8C5888LTI-LP097 with lmx2592

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
GARY_WU
Level 1
Level 1
25 sign-ins 10 sign-ins 5 likes given

hello, everyone

I just started to learn CY8C5888LTI-LP097 recently, I want to use this development board to interact with the LMX2592 chip, can someone give me some advice or a template for reference...

 

 

 

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

@GARY_WU 

Attached is a project that safely interfaces a PSoC5LP at 5V VDDD to a LMX2592 at 3.3V VccDIG.

This is a HW starting point in a PSoC project for purposes of electrical compatibility.

Notes about this project: 

  • I have not implemented the SW to interface the LMX2592 to the PSoC using SPI.  I'll leave that up to you.
  • Although the datasheet indicates that the SPI transfer is 24-bit, I've set it up for 8-bit so you will need to use 3 8-bit transfers to accomplish a register write or read to the LMX2592.
  • The LMX2592 schematic in the TopDesign file only applies to connections on this part with regards to the digital side of the interface.   All analog chip requirements will be up to you to design.

You can see by the TopDesign schematic file that using the Port12 pins in SIO mode with a Vref (via the VDAC8) should protect the PSoC5 powered at 5V and the LMX2592 powered at 3.3V from damage.  No external parts were needed.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

18 Replies
BiBi_1928986
Level 7
Level 7
First comment on blog 500 replies posted 250 replies posted

Hello.

I've not used LMX2592, but I had a quick look at its datasheet.

I'm going to assume you are using Cypress KIT-059 for CY8C5888LTI-LP097.  If using a different PSoC board, then you may have to adjust my advice.

LMX2592 is a 3.3V device.  It's pins are not 5V tolerant.  You will destroy LMX2592 if you connect it directly to KIT-059 when connected to PC USB port.  KIT-059 can be powered from external 3.3V source to make it voltage level compatible with LMX2592.  If you wish to keep powering KIT-059 from USB port, then you'll need logic-level voltage translators inserted between KIT-059 signals and LMX2592.  Not a big deal.  Look at logic device families such as 74LCX125, 74LV125, 74LVC125, 74LVT125.  These will all translate from 5V system to 3.3V system.  And it's not limited to the '125 device.  You could just use an AND gate '08 to achieve logic level translation.  It's your design, do as you please.  Just don't burn out the expensive LMX2592.  And, LMX2592 specifies a logic slew rate of 30V/us.  Whichever device is used for translation, check its datasheet to meet this requirement.

Okay, next is the power supply.  LMX2592 draws a hefty 250mA (typical) at 3.3V.  So, plan on 300mA.

The interface to LMX2592 is an SPI slave (the PSoC is used as SPI master in this case).  LMX2592 SDI pin is not bi-directional.  So you'll need to use PSoC SPI interface in 4-wire mode (not 3-wire mode).  The 4-wire mode also allows you to read LMX2592 internal registers (if you flip a certain mux bit in one of LMX2592 registers).

As for programming, see section 9 of datasheet.  TI provides app notes on this.

As for PSoC SPI master, here's a great place to start:
MCU Tester, a Swiss Army Knife for PSoC (CY8CKIT-0... - Infineon Developer Community
Scroll to the bottom to get the PSoC project.
There are also example projects in Creator for SPI master.  You can look at those as well.

Good luck with your project.

Thank you very much for your reply. Regarding the power supply part, I noticed this when I was selecting the model at the beginning. There are also modules with 5V>3.3V ready, but thank you for your reminder.

But I didn't notice the power supply part, thank you very much for your reminder, I will pay attention to the power supply part when I re-plan the circuit.

Thanks

 

 

0 Likes

Hi.

I've seen the voltage translation modules from Sparkfun (and others).  They are tooooooo slow for your application.  There's nothing wrong with those modules if you want to limit the clock speed to 10kHz or less.  But, I suspect the pull-up resistor rise time (to make a logic 1) is too slow for LMX2592.

There are other chips available that perform logic level translation (a bit over-kill for what you are doing).
TXU0304, TXU0204, TXU0104 families, similar to Si8641.
Beware of some translators, such as TXS0102, has 3.3V on input side and 5V on output side.  You're looking for parts with 5V input side and 3.3V on output side.

hi, bibi

Thanks again for your reply, In the early stage of development, I think the speed of 10kHZ has reached the function I want ,because now I only hope that the two development boards can be successfully enabled first...

For the part of the power chip, I just looked at it, maybe TXU0304 is a good suggestion.

This is my first contact with PSOC, thank you for your advice.

 

0 Likes
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

@GARY_WU 

@BiBi_1928986  is correct that the LMX2592 cannot tolerate voltages above 3.6V.  Therefore this part needs it's own power supply at 3.3V.  The PsoC5LP can also run at 3.3V.

@BiBi_1928986 mentioned that if you want to run the PSoC5LP at 5V, you need to translate all the inputs and outputs connected to the LMX2592 to 3.3V compatible signals.  He mentioned a number of level conversion ICs to place as an interface between the two ICs.

However, the PSoC5LP also special GPIO pins on port 12 that are called SIO pins.  These pins can be programmed to be 3.3V-level inputs and/or outputs to safely communicate to the LMX2592 even if the PSoC is powered at 5V.  This should eliminate the need for the level conversion ICs.

If you'd like an example project that will interface to the LMX2592, let me know.

Len
"Engineering is an Art. The Art of Compromise."

Ok, so it seems that I have to learn about this board first. How to programmatically output my gpio to 3.3v. Thank you very much for your suggestion.

If you are willing to share the project example of lmx2592, I will thank you very much! Thank you also for your willingness to offer.

0 Likes
lock attach
Attachments are accessible only for community members.

@GARY_WU 

Attached is a project that safely interfaces a PSoC5LP at 5V VDDD to a LMX2592 at 3.3V VccDIG.

This is a HW starting point in a PSoC project for purposes of electrical compatibility.

Notes about this project: 

  • I have not implemented the SW to interface the LMX2592 to the PSoC using SPI.  I'll leave that up to you.
  • Although the datasheet indicates that the SPI transfer is 24-bit, I've set it up for 8-bit so you will need to use 3 8-bit transfers to accomplish a register write or read to the LMX2592.
  • The LMX2592 schematic in the TopDesign file only applies to connections on this part with regards to the digital side of the interface.   All analog chip requirements will be up to you to design.

You can see by the TopDesign schematic file that using the Port12 pins in SIO mode with a Vref (via the VDAC8) should protect the PSoC5 powered at 5V and the LMX2592 powered at 3.3V from damage.  No external parts were needed.

Len
"Engineering is an Art. The Art of Compromise."

HI, Len

Thanks again for your reply, At first I was still thinking about why not use 24bit directly until just now I remembered that spi only supports up to 16bit.

The sample project you provided gave me a lot of help, thank you very much.

0 Likes

hi,len

Sorry to bother you again.

If I want to use GPIO  simulation SPI and control the lmx2592, did you have any suggestions for this idea...

GARY.

0 Likes

Gary


Sorry to bother you again.


Not a problem.


If I want to use GPIO  simulation SPI and control the lmx2592, did you have any suggestions for this idea...


"GPIO simulation SPI":  I don't understand what you are asking for.

Are you asking about using GPIO pins to simulate SPI?

 

Len
"Engineering is an Art. The Art of Compromise."

Hi,len

thanks for your reply

Yes, is it possible to use this method? I saw examples on the web where Mcu emulates SPI using GPIO. But I can't find relevant examples on the Internet.

0 Likes

Gary,

If you give me a day or two, I can create an example program using the SIO pins for 3.3V level conversion and simulates a SPI master.

It will be a very simple program that pushes data out the MOSI pin and receives this data in the MISO pin and displays it on a debug terminal.

Note:  I'm not sure why you want to simulate the SPI master with GPIO/SIO pins.   That SPI Master component is very easy to use and is more CPU efficient and can operate at much higher speeds.    It is your better choice than emulating SPI in SW.

Len
"Engineering is an Art. The Art of Compromise."

Hi, Len,

thank you very much for your help. I will also try the way you said to learn these days.

Because I used GPIO to simulate I2C in STM32 before, I want to say that I can also try to use GPIO of PSOC to enable SPI, but recently It doesn't seem to work... Thanks a lot for your advice and help!

0 Likes

Gary,

I'm currently creating an example project to simulate SPI with GPIO/SIO.   However, as I indicated, this is not the optimal means of programming especially since the SPI master component works great and I found to be very reliable.

It is my opinion to abort my attempt to simulate the SPI master.  It would better to find out why your programming using the SPI master is not working.

Do you have access to a 4 channel oscilloscope or a multi-channel logic analyzer?

If you do, you can monitor the SCLK, MOSI, MISO and CS signals and debug why it is not working.

Len
"Engineering is an Art. The Art of Compromise."
lock attach
Attachments are accessible only for community members.

Gary,

Here is a no-frills project that simulates the SPI master and reads back the MOSI data transmitted.

To use this project, wire connect P12.4 to P12.5.  This HW connects the MOSI to MISO.

The debug output to the UART is set to 115.2Kbps 8N1.  It displays the data in hex received.

 

Question:  In your project that is not working, did you perform a VDAC8_3V3_Start().  It is required to start up the voltage reference for the SIO pins to output and input at 3.3V.

I still highly recommend the use of the SPI  Master component.   In the long run, it will be more efficient for your project.

Len
"Engineering is an Art. The Art of Compromise."

hi, len

Thank you very much for your advice and help. I will design according to the way you suggested, but I just want to use GPIO as a learning method. In the end, I will use the way you said to design.

! I already did perform a VDAC8_3V3_Start(), but I don't know why it doesn't work, I will first check if the circuit of the lmx2592 I connected is wrong! Thank you for your reminder

Thank you so much for your help and for providing this example!

0 Likes

Gary,

At some point in your project when communication appears to not work, you need to dust off your debugging skills and the oscilloscope and look at the timing and parameters of the signals in question.

Another debugging trick I sometimes use is that I place a separate comm monitor to just monitor the signals in question.

For example in your project, you can place a separate SPI slave to monitor the SCLK and MOSI signals from the SPI master.   You can then dump the MOSI data you receive to a UART output to display as hex (just like I do in the GPIO sim project I attached in this forum).  This will prove out the SPI Master Tx side.

If the SPI Tx looks correct, you can then switch the SPI slave monitor to the SCLK and the MISO to look at the response from the LMX2592.  This should validate the SPI Rx side.

Len
"Engineering is an Art. The Art of Compromise."

hi,len

would you please give me your e-mail?

Because I feel like I have a ton of questions I want to ask you....

if you'd like to help me...

 

 

0 Likes