SPI DEVICES

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Adrien DG
Posts: 15
Joined: Thu Jun 11, 2009 11:09 am

SPI DEVICES

Post by Adrien DG »

Hello All !

I'd like realize a communication between 2 PIC 16F877A
I want to know how can I set one of them as a Master and the other as Slave ?
It's very important for me to understand this...
I've tried to set the slave's clock in idle_high (polarity) but i always have a conflict between the master and the slave...

Help Please
Image

Regards
Adrien DG
Regards,
Adrien DG

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: SPI DEVICES

Post by Benj »

Hello Adrien

At the moment we only have master versions of the SPI and I2C components.

You should be able to use the RS232 component to communicate between two devices. Alternativly you could customize the code for the SPI component by refering to the device datasheet and setting it up as a slave instead of a master.

Adrien DG
Posts: 15
Joined: Thu Jun 11, 2009 11:09 am

Re: SPI DEVICES

Post by Adrien DG »

Hello Ben, thank you for your response !!
So I've already customized my code to set a PIC in Master, and another in Slave, but i've still a conflict with the clock,

I'll try to do this tomorrow

Regards

Adrien DG
Regards,
Adrien DG

Adrien DG
Posts: 15
Joined: Thu Jun 11, 2009 11:09 am

Re: SPI DEVICES

Post by Adrien DG »

I've just one other question ...

For the SPI I want to send an OPCOD and then to receive an information from the slave
Why when I place a SPI GET CHAR I have a sending information from the master to the slave
This message is 0x90 which means 'Z'
I don't understand !!
Regards,
Adrien DG

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: SPI DEVICES

Post by Benj »

Hello

A decimal 90 or hexadecimal 0x5A represents 'Z'

This should help to explain things.
http://www.asciitable.com/

Adrien DG
Posts: 15
Joined: Thu Jun 11, 2009 11:09 am

Re: SPI DEVICES

Post by Adrien DG »

Hello !!
Yes I know that, but I don't understand why I always see this 'Z' when I put a GET CHAR in my slave program.
Regards,
Adrien DG

Post Reply