Page 1 of 1

v5.00 SPI help can be more consequent.

Posted: 23 Jul 2011 19:36
by Dany
The current help says about SPIx_Init:
Prototype procedure SPIx_Init();
Description Configures and initializes the SPI module with default settings.
Default settings:
Master mode
8-bit data mode
...
Serial output data changes on transition from active clock state to idle clock state <-- this line

The last line is true, but it would be better to say "Data is valid on IDLE-to-ACTIVE transition" as stated a little bit further:
Clock Edge
Description Predefined library const
Data is valid on ACTIVE-to-IDLE transition _SPI_ACTIVE_2_IDLE
Data is valid on IDLE-to-ACTIVE transition _SPI_IDLE_2_ACTIVE
Even better is (in both places):
Output Data is valid on IDLE-to-ACTIVE transition
Thanks in advance!

Re: v5.00 SPI help can be more consequent.

Posted: 23 Jul 2011 20:21
by jpc
would it be possible to limit this type of posting to a single forum ?

Re: v5.00 SPI help can be more consequent.

Posted: 24 Jul 2011 08:23
by Dany
jpc wrote:would it be possible to limit this type of posting to a single forum ?
I am very sorry to be obliged to post in more than one forum, but my experience is that, if a problem has been solved for a certain compiler, it is not necessarely the case for others... :(
Furthermore, the content of the posts are rather different for "PIC" and "dsPIC30/33 and PIC24". :?

Re: v5.00 SPI help can be more consequent.

Posted: 25 Jul 2011 10:05
by filip
Hi,

According to the dsPIC/PIC24 datasheet :
Serial output data changes on transition from active clock state to Idle clock state.
Serial output data changes on transition from Idle clock state to active clock state.
So, you think that we should change descriptions a little bit, in order to be more understandable ?

Regards,
Filip.

Re: v5.00 SPI help can be more consequent.

Posted: 25 Jul 2011 11:40
by Dany
filip wrote:According to the dsPIC/PIC24 datasheet :
Serial output data changes on transition from active clock state to Idle clock state.
Serial output data changes on transition from Idle clock state to active clock state.
Indeed, but the "edge" parameter in "SPIx_Init_advanced" is the "data valid" edge, the opposite of the "data change edge" as used in the datasheet, so be carefull.
filip wrote:So, you think that we should change descriptions a little bit, in order to be more understandable ?
Indeed, please (continue to) use the "data valid" edge definition (as you do already when describing the "edge" parameter values):
Output Data is valid on ACTIVE-to-IDLE transition: _SPI_ACTIVE_2_IDLE
Output Data is valid on IDLE-to-ACTIVE transition: _SPI_IDLE_2_ACTIVE
I did some measurements and "SPIx_Init_advanced" always (for P18 and P24, ??) uses the "data valid" SCK edge (between 2 "data change" edges). This is a much better choice than the one in the datasheet.

Thanks in advance. Keep up the good work! :D :D