Possible PIC16 SPI issue

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Has thanked: 20 times
Been thanked: 52 times
Contact:

Possible PIC16 SPI issue

Postby GTF » Sat Nov 29, 2014 3:39 am

dsPIC33EP512MU810 datasheet note states, "The SMP bit must be set only after setting the MSTEN bit. The SMP bit remains cleared if MSTEN =0" http://ww1.microchip.com/downloads/en/DeviceDoc/70616g.pdf (p.341)
PIC16BIT_CAL_SPI.c assigns the value of SMP prior to setting MSTEN. Hence, it appears that Input data is always sampled at the middle of data output time, even if "END" is selected in the SPI component properties.
These users thanked the author GTF for the post:
LeighM (Mon Dec 01, 2014 3:51 pm)
Rating: 5.26%
 

User avatar
LeighM
Matrix Staff
Posts: 1914
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 460 times
Been thanked: 646 times
Contact:

Re: Possible PIC16 SPI issue

Postby LeighM » Mon Dec 01, 2014 3:50 pm

Thanks for the spot.
I've updated the CAL file (and attached)
Attachments
PIC16BIT_CAL_SPI.c
(15.88 KiB) Downloaded 72 times