I had a question regarding the #int_ssp directive used by the ccs compiler ...
(there was no section in the help section of the ccs software)
I was looking over the data sheet of 16f877A and it indicated that an interrupt happens when the serial buffer copies the data into the the serial T/R buffer ... (in other words, when a byte of data is recieved)
is this interrupt used for only recievign data ?
Thank you very much in advance
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
Posted: Tue Dec 14, 2004 2:31 am
Receiving and transmitting data on the SPI bus happens synchronously, i.e. at the same time you are transmitting data, the same clock pulses are used for clocking in data from the receive line. Even when you only want to receive data, you will be transmitting data as well. That explains why the spi_read() function has a parameter.
Similary #int_ssp is signalling both a byte being transmitted as received.
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