Hello again guys!
I am quite a new to SPI bus but I'd like to learn more about it and make my TLC5940NT function like I want it but there's just couple of things I'd like to ask from you that I don't know about or am quite sure about.
I know that its required to have same clock speed on master and on the slave to synchronize the data received and sent. In PIC18F13K50 theres this pin for "Synchronous serial clock input/output for SPI mode", so should I use that for TLC5940's SCLK and GSCLK which are for Data shift clock frequency and Grayscale clock frequency? Also I know that my PIC18F13K50 runs on clock speed of 48mhz, unfortunately the max speed of clock TLC5940 can use is 30mhz, what should I do? Or do this have something to do with that, when I initialize the SPI interace on C code it takes the sync mode as parameter, which is some kind of divider for oscillator speed, right? But how do I know what sync mode I should use to make it sync correctly? Or will it know what to do if the clock speed is under 30mhz? So if I used the serial clock input/output to the SCLK and GSCLK and used SPI_FOSC_64 as parameter, would it work? and if not what should i do with those clocks to make it sync correctly?
PIC18F13K50 datasheet
TLC5940NT datasheet
I am quite a new to SPI bus but I'd like to learn more about it and make my TLC5940NT function like I want it but there's just couple of things I'd like to ask from you that I don't know about or am quite sure about.
I know that its required to have same clock speed on master and on the slave to synchronize the data received and sent. In PIC18F13K50 theres this pin for "Synchronous serial clock input/output for SPI mode", so should I use that for TLC5940's SCLK and GSCLK which are for Data shift clock frequency and Grayscale clock frequency? Also I know that my PIC18F13K50 runs on clock speed of 48mhz, unfortunately the max speed of clock TLC5940 can use is 30mhz, what should I do? Or do this have something to do with that, when I initialize the SPI interace on C code it takes the sync mode as parameter, which is some kind of divider for oscillator speed, right? But how do I know what sync mode I should use to make it sync correctly? Or will it know what to do if the clock speed is under 30mhz? So if I used the serial clock input/output to the SCLK and GSCLK and used SPI_FOSC_64 as parameter, would it work? and if not what should i do with those clocks to make it sync correctly?
PIC18F13K50 datasheet
TLC5940NT datasheet