Problems with SPI

For E-blocks user to discuss using E-blocks and programming for them.

Moderators: Benj, Mods

Post Reply
dmole
Posts: 3
Joined: Mon Apr 28, 2008 12:16 pm

Problems with SPI

Post by dmole »

Hi, I'm David, I'm using E-Blocks with PIC16F877A and I'm developing a program in C for Write/Read in FRAM memory. The FRAM memory is inside SPI Memory and D/A converter board (EB013-00-2). I have done the program but doesn't work and I think is all correct. I have the datasheet for SPI board (EB013-00-2) and here I can see that there is one test program hexfile named SPITEST.hex to test the SPI Interface, but I can't find the file in the Web. Please, Can you tell me where I can find it? Or can you send me one file for test the SPI interface?...

thanks!!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problems with SPI

Post by Benj »

Hello David

Here is the test file.
Attachments
EB013 Factory test routine.zip
(9.7 KiB) Downloaded 406 times

dmole
Posts: 3
Joined: Mon Apr 28, 2008 12:16 pm

Re: Problems with SPI

Post by dmole »

Thank you very much. I have tested the hexfile with the text rutine and he works perfectly. But I think that my code is correct to, may be I forgot to set something or something is not correctly set. I leave here my code, please Can you tell me where is the problem??

Thanks.
Attachments
finalprogram.c
(2.68 KiB) Downloaded 428 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problems with SPI

Post by Benj »

Hello Dmole

Here is a C code generated from Flowcode.

You should be able to follow what the code is doing.
Attachments
FRAM SPI.c
(7.57 KiB) Downloaded 419 times

dmole
Posts: 3
Joined: Mon Apr 28, 2008 12:16 pm

Re: Problems with SPI

Post by dmole »

Thank you other time, I have revised my code other time and is all correct. I was meassuring some signals in the memory board and when I put scope prove (used in the scope) in pin 6 of the memory and ground and run the program, all works perfectly, if I'm working with the memory alone (with scope prove connected) I meassure low voltage level for SCK signal (around 100mV). But if I work with DAC and memory together all works perfectly (with scope prove connected) and the value is 5 volt again. I want... can anybody give me some information?? I want to know wich pin of port C is connected to pin 6 of the FRAM memory in memory board....

thank you!!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Problems with SPI

Post by Benj »

Hello

Datasheets for our E-Block boards, containing connection details and schematics are available from the link below.

http://www.matrixmultimedia.com/eblocks/index.php

Post Reply