See in the file spi_master_hw, the last procedure, the initialization
procedure...
"
-- Initialize the SPI registers.
-- Note: check your datasheet -- TRIS settings, any SPI errata?
procedure spi_init(byte in spi_mode, byte in *spi_rate*) is
SSPCON1 = 0
SSPSTAT_SMP = 0
spi_master_hw_set_mode(spi_mode)
*spi_master_hw_set_speed(spi_rate)*
SSPCON1_SSPEN = 1
end procedure
"
ok, the spi library does have a speed setting... if you look at the
spi_common, you will find...
"
-- Use these when calling the spi_init() routine below ( SPI clock
frequency )
const SPI_RATE_FOSC_4 = 0
const SPI_RATE_FOSC_16 = 1
const SPI_RATE_FOSC_64 = 2
const SPI_RATE_TMR = 3
"
So you can set the speed of the SPI expressed in fractions of the clock...
Also you can use a timer to be the clock of the SPI bus... read the
datasheet of your device...
Shure this is very device(TMR)/clock specific, but is a starting point...
Cheers, Pavel.
El 31/08/14 03:34, Rob Hamerling escribió:
Hi guys,
For a specific device I need a specific, pretty high SPI baudrate. I
think this requires hardware SPI. But unlike the serial_hw libaries the
spi_master_hw library is lacking a procedure to select the baudrate. Who
can help me? I'll open an 'enhancement' issue.
Regards, Rob.
--
You received this message because you are subscribed to the Google Groups
"jallib" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/jallib.
For more options, visit https://groups.google.com/d/optout.