Hello,
I have the same project for a friend who use SPI devices ..
as far as I understand the 16F88 has a built in SPI option
see datasheet copy
10.2 SPI Mode
This section contains register definitions and
operational characteristics of the SPI module.
SPI mode allows 8 bits of data to be synchronously
transmitted and received simultaneously. To
accomplish communication, typically three pins are
used:
• Serial Data Out (SDO) RB2/SDO/RX/DT
• Serial Data In (SDI) RB1/SDI/SDA
• Serial Clock (SCK) RB4/SCK/SCL
Additionally, a fourth pin may be used when in a Slave
mode of operation:
• Slave Select (SS) RB5/SS/TX/CK
When initializing the SPI, several options need to be
specified. This is done by programming the appropriate
control bits in the SSPCON register (SSPCON<5:0>)
and the SSPSTAT register (SSPSTAT<7:6>). These
control bits allow the following to be specified:
• Master mode (SCK is the clock output)
• Slave mode (SCK is the clock input)
• Clock Polarity (IDLE state of SCK)
• Clock Edge (output data on rising/falling
edge of SCK)
• Clock Rate (Master mode only)
• Slave Select mode (Slave mode only)
Question : I didn't see any Serial command in your example ?
about the speed ? where to set it ?
like all command .. just play with the SSP register bits ?
may I use it like it is to "try something" mostly send commands
to my friend's unit ..
thanks in advance for your help
Francois
Bookmarks