Hi
I'm trying to use the SPI function with my DSpic33EP256MU806.
I am beginner in electronica, I hope you can help me.
1º What the pins for the use of SPI communication (been to see the datasheet but not meeting the four channels SPI)
Best Regards
SPI communication
Moderator: Benj
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: SPI communication
This device uses re-mappable SPI pins (except for channel 2). In the component properties (under the heading "Connections") you can select the pins to you want to use from the available choices. If you do not want to choose, use channel 2, the pins are fixed for that port.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
Re: SPI communication
Thanks for the reply
I have more questions, if you can help me grateful.
For SPI communication have the pin MOSI, MISO, SCK and CS right?
In the component properties not appear CS pin why?
What is the solution?
Origado
I have more questions, if you can help me grateful.
For SPI communication have the pin MOSI, MISO, SCK and CS right?
In the component properties not appear CS pin why?
What is the solution?
Origado
-
- Valued Contributor
- Posts: 2045
- Joined: Wed Aug 27, 2008 10:31 pm
- Location: Netherlands
- Has thanked: 553 times
- Been thanked: 1081 times
Re: SPI communication
You can use any output pin for CS. Use an output icon to control it. At the start of main (or in a macro) set the pin to the 'inactive' level. Then just before starting SPI communications set the pin to 'active' level.
“Integrity is doing the right thing, even when no one is watching.”
― C.S. Lewis
― C.S. Lewis
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
Re: SPI communication
Thank's
I have a Flowcode file to test. If you have a problem I say something.
Now only a curiosity, what's the difference between master and cal_spi spi?
Best Regards
I have a Flowcode file to test. If you have a problem I say something.
Now only a curiosity, what's the difference between master and cal_spi spi?
Best Regards
- 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 communication
Hello,
The CAL_SPI is responsible for all low level SPI functionality.
The SPI Master component has the CAL_SPI component built in but also provides some extra functionality in the form of macros and properties for the SPI E-block EB013 and Console data in the Flowcode simulation.
The CAL_SPI is responsible for all low level SPI functionality.
The SPI Master component has the CAL_SPI component built in but also provides some extra functionality in the form of macros and properties for the SPI E-block EB013 and Console data in the Flowcode simulation.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 63
- Joined: Mon Dec 23, 2013 5:51 pm
- Been thanked: 8 times
Re: SPI communication
HelloBenj wrote:Hello,
The CAL_SPI is responsible for all low level SPI functionality.
The SPI Master component has the CAL_SPI component built in but also provides some extra functionality in the form of macros and properties for the SPI E-block EB013 and Console data in the Flowcode simulation.
Can you tell me what are low level SPI? What kind of equipment?
Sorry for all these questions but I'm starting in the world of electronica.
Thanks
- 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 communication
Hello,
By "low level SP"I I mean it provides macros to configure the SPI, send a byte via SPI and receive a byte via SPI, i.e. the physical layer in an OSI model.
http://en.wikipedia.org/wiki/OSI_model
Therefore any SPI based device should work fine with either the CAL_SPI component or the SPI Master component.
By "low level SP"I I mean it provides macros to configure the SPI, send a byte via SPI and receive a byte via SPI, i.e. the physical layer in an OSI model.
http://en.wikipedia.org/wiki/OSI_model
Therefore any SPI based device should work fine with either the CAL_SPI component or the SPI Master component.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel