Help me in MSSP module in PIC16F877A

Status
Not open for further replies.

omar_abdalla

Newbie level 5
Joined
Mar 29, 2008
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Visit site
Activity points
1,319
I am using MSSP in PIC16F877A to communicate with a device
And I use the MASTER mode
BUT i want to get a clock of 5Khz

can i get this clock with 2Mhz crystal????

can i get it using timer2 module???
 

Help in MSSP module

5kHz clock for SPI transmission is too slow although possible.

PIC MSSP module gets it clocking from MSSP sontrol register SSPCON1 bits <3-0> settings. It has choices if you clock at FOSC/4, FOSC/16, FOSC/64 or TMR/2; but I suggest you use the FOSC clocking so that communication will allign to instruction cycles.

So if your system clock is 2MHz, your FOSC = 2MHz.

I suggest also you use maximum clocking at 5MIPS or 20 Mhz clock.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…