A project about communication with SPI protocol, Receive and transfer between 3 Pics.
I don't understand that I must double click, system can operation, one click system can't operation!!
Thanks for attention!!
The program:
http://www.mediafire.com/?1dknjcx8k77woiv
I had a quick look at your 'master.c' program.
First it amazes me the worldwide use of PICs. It must be hard to program when English is not your first language.
Whenever you're using portB for interrupts, you must read the whole port to clear it.
There is an example in the FAQ section of the HELP files ( press F11 with project open) that shows a nice way to read portB and take action.
Also you should use #define to 'name' I/O pins for their use.
something like
...
#define secondPICslaveselect PIN_A1 //SPI slave select for PIC #2
...
will greatly help you and others in deciding what pins are for.
even short names like PIC2_SS. Less typing, easy to understand!
And, there isn't any 'debounce' for the switches. You must delay a bit either in hardware or software (say 10ms delay).
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