Ok. I have figured out a way to sort of get my little project off the ground. But each time I think that I hit another snag.
24EP512GU810 chip
5.061 compiler.
setup_spi2(SPI_SLAVE | SPI_L_TO_H | SPI_MODE_16B);
fast IO setup on G port..
spi_write2_16(0x8000);
I am clocking the SPI from an external source. Clocking it at 352 KHz. What I am running into is how many clock cycles does it take to start clocking out the SPI? It looks like it is taking about 4? You would think that it would start clocking out immediately.
1. In Frame mode, if there is a possibility that the
master may not be initialized before the slave:
a) If FRMPOL (SPIxCON2<13>) = 1, use a
pull-down resistor on SSx.
b) If FRMPOL = 0, use a pull-up resistor on
SSx.
--------------------------------------------------
Note: This insures that the first frame
transmission after initialization is not shifted or corrupted.
-------------------------------------------------
curt2go
Joined: 21 Nov 2003 Posts: 200
Posted: Mon Jul 10, 2017 9:45 am
I was also thinking it takes a couple cycles to load the buffer as well. I will try to use the spi_prewrite().
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum