Hello all, I have a question about programming pic18f series pics for parallel communication using PSP.
My project involves communication with another pic using a certain protocol we have established. The packets to be exchanged are of this format
[sync][type][data]
[sync] = 0x05 (this tells me that i'm about to receive data) (1 Byte)
[type] = tells me what kinda packet i'm gonna get (ACK, NACK, data etc)
(1 Byte)
[data] = actual data (many Bytes)
I'm am not sure how to go about reading in the data i get after a psp interrupt. should it be like this
during the psp interrupt
if(portd == 0x05)
{
type_buffer = portd;
}
//depending on the type_buffer read the data
//dunno how to read data of more the 1 Byte
*************************
Thank you for any assitance
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Mar 15, 2006 12:32 am
See the CCS example file EX_PSP.C. It has an example of an #int_psp
interrupt service routine. Look in this folder for the file:
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