Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to test SPI with computer?

Status
Not open for further replies.

eng.hasan.power

Member level 1
Joined
Mar 30, 2006
Messages
39
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,597
test SPI with computer

hi everyone,
i was wondering, if any one here hasa previous experiance with SPI testing,
i have ethernet controller pic18f97j60 and i want to know how can i test my code, of the SPI, by a computert, or by any way eaither than tracking the signal by Oscilloscope, im kinda new on SPI protocol,

thanx
 

Re: test SPI with computer

Hi,

What kind of interfaces do you have on your computer? Probably the easiest way to connect an SPI device would be via the parallel port, if available. There are some programs for read/writing SPI via parallel port out there on the net.

I like RealTerm for serial stuff under Windows. It can also handle SPI and I2C, but you'll need an external RS232/SPI converter.

Regards,
Chris
 

Re: test SPI with computer

Danke,

i have checked it, its nice but u sure it can be done with SPI too, i noticed averything is I2C

also, """external RS232/SPI converter. "" what do you mean by this one,

and i already have serial interface, Max232, connected to the controller,

if i have a converter why should i us a tester, while i already have 232 and hyperterminal, or i did misunderstand you,

thànks again,
hasan
 

Re: test SPI with computer

eng.hasan.power said:
i have checked it, its nice but u sure it can be done with SPI too, i noticed averything is I2C
Hm, I admit I'm not sure. The documentation mentions working with SPI, but I haven't tried it personally.

Maybe **broken link removed** would be a good program for you. You just need to make a cable for your parallel port, and then use can use the computer as an SPI device to send and receive data.

Regards,
Chris
 

Re: test SPI with computer

Thank Alot,,,

but, is it for motorola only,, i have downloaded it ,,,but not working properly,,, are you sure i can use for other controller,,,,,,

usbiocom.dll,,,,,,error,,,,

how can i set up it ,,,and again, is there is no usb dongle needed,,,,,

Regards
Hasan

Added after 7 minutes:

hi Chris,

i set up it again, on XP this time not Vesta, its working fine so far, but i didnt make a parallel cable, for testing, yet,,,,,

if you knew it can work fine with other controller pls feed me back,,,,and i will do the same as soon as i finish the cable,

regards,
hasan
 

Re: test SPI with computer

Hi Hasan,

I haven't tried it, although the description sounds like it is a general SPI program for any devices, not just Motorola.

The USB dongle is optional, for higher speeds I guess. It should work fine with the parallel port. You just need to configure it to say which parallel line corresponds to which SPI line, etc.

Regards,
Chris
 

Re: test SPI with computer

hi Chris,
thanks for ur reply,
i donno looks like its not very famous one, i even tried to find a cable for it, but i cant,,,,,,, i only found a paper, they are using it with CPLD, but there is a block in between called,

Parallel to SPI,

the same mentiond at the freescale website,,,, first how would you make the parallel cable, and even how to make that board,,,,,

regards
hasan
 

Re: test SPI with computer

Hi Hasan,

I guess I have misunderstood this program. Sorry that it's not what you're looking for. Maybe try Google for some other SPI software. It seems like there are some old ones for DOS (since Windows now needs an driver to access the parallel port).

What are you trying to test anyway? Has your SPI interface on the microcontroller stopped working? Maybe you can try connecting MOSI and MISO together to do a simple loopback test if you're not sure things are working correctly.

Regards,
Chris
 

Re: test SPI with computer

its not "not working,",

but im about to build one, and i need an easy way, instead of tracing the signal by the Oscilloscope, i thought there is a program do that,,,, with proper connections,,,

as i have mentioned im not an exper in SPI, how could you make
"""try connecting MOSI and MISO together to do a simple loopback test if you're not sure things are working correctly. """

can u explain in more details,,,

Danke,
hasan
 

Re: test SPI with computer

eng.hasan.power said:
but im about to build one, and i need an easy way, instead of tracing the signal by
the Oscilloscope, i thought there is a program do that,,,, with proper connections,,,
I'm sure there is; you just have to look around.

Why not use the serial port in your PIC? It's simple to write code that transfers data between the SPI and RS232 interfaces. Then you can just connect the serial port to your computer to do any monitoring you need.

You won't have much trouble with SPI. It's easier to debug than I2C and probably even RS232.

Good luck,
Chris
 

sry, for late reply, i was facing problem in the compiler,
now, how can i transfer the uart to spi, in the pic code, what do u meant by this,,,

and, for example, how can i test the Master only, without slave present,
i did it by Mplab Sim., and looks like it works fine, but im not sure, how to test the Master,
 

How about buying a SPI analyzer? It s not that expensive and it is worth buying.
 

hello,


simple y low cost...
You can use a script, or make a PC to use application gives protocols PickitSA
**broken link removed**


regards
 

I have made a program to test SPI communications with a PC running Windows: VB-SPI.exe
**broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top