Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[PIC] SPI communication PIC16F628A Master Clock Speed ?

Status
Not open for further replies.

asking

Full Member level 5
Full Member level 5
Joined
Sep 21, 2010
Messages
279
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Activity points
3,377
Hi,

I want to use Soft SPI Communication between NRF24L01+ and PIC16F628A. Is it possible with PIC16F628A ? internal oscillator ? which is 4MHZ. or do i need to use 20 MHZ External Oscillator ?

I have read some where "Minimum ideal SPI bus speed is 2x data rate" what does that mean ?

I want to transfer data @ 2Mbps so what should be my SPI Master Clock (i.e PIC16F628A 4Mhz Intosc) ?

Please do needful.
 

I want to use Soft SPI Communication between NRF24L01+ and PIC16F628A. Is it possible with PIC16F628A ? internal oscillator ? which is 4MHZ. or do i need to use 20 MHZ External Oscillator ?

I have read some where "Minimum ideal SPI bus speed is 2x data rate" what does that mean ?

It is certainly possible with the PIC16F628A, however you will need to use an external 20MHz crystal to even come close to your target SPI bus speed of 4MHz, 2x the data rate.


I want to transfer data @ 2Mbps so what should be my SPI Master Clock (i.e PIC16F628A 4Mhz Intosc) ?

Two times a data rate of 2Mbps, indicates an SPI clock of 4MHz, which will require at least a the 20MHz maximum system clock possible with an external crystal.

Remember, it takes four system clock cycles to generate one instruction clock cycle.

Therefore, with a 20MHz system clock, the instruction clock is equivalent to 5MHz, also considering the overhead in a soft SPI implementation, achieving a 4MHz soft SPI clock will be very difficult.

The PIC16F628A is not the most ideal choice for such a task if the primary goal is a 4MHz SPI clock, you would be better off selecting a PIC with a hardware SPI module and a faster internal oscillator or PLL module.

The PIC16F887 maybe a better inexpensive choice, with an external 16MHz or higher frequency crystal.

Or perhaps one of the newer PIC16F with a 16MHz Internal Oscillator, there are also quite a few inexpensive PIC18Fs which would fulfill the requirements.

BigDog
 

ok what if i lower my data rate on NRF24L01+ to 250Kbps ? then i don't require to buy another pic right ? then external oscillator of 20MHZ will do ?

Thanks.
 

what if i lower my data rate on NRF24L01+ to 250Kbps ?
then i don't require to buy another pic right ? then external oscillator of 20MHZ will do ?

Yes, the PIC16F628A with an external 20MHz should be able to exceed 250Kbps throughput implementing a soft SPI interface.

BigDog
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top