Page 1 of 1
Prescale
Posted: Wed Sep 24, 2014 11:02 am
by Emanuel Lourenco
Good Morning
I am amateur in the area and I am not understanding what is the prescale.
For example when adding the SPI component.
Could you possibly can explain me grateful.
Greetings
Emanuel Lourenço
Re: Prescale
Posted: Wed Sep 24, 2014 2:27 pm
by Benj
Hello,
The SPI prescale is a division of the master instruction clock. So say the oscillator is running at 4MHz.
PIC 8-Bit & dsPIC30 = Instruction clock = Osc / 4 = 1MHz
PIC24 / dsPIC33 = Instruction clock = Osc / 2 = 2MHz
AVR = Instruction clock = Osc = 4MHz
So an 8-bit PIC with an Osc speed of 4MHz and a prescaler of 4 the SPI clock would be equal to 250K bits per sec when sending or receiving data.
Re: Prescale
Posted: Wed Sep 24, 2014 4:31 pm
by Emanuel Lourenco
Benj wrote:Hello,
The SPI prescale is a division of the master instruction clock. So say the oscillator is running at 4MHz.
PIC 8-Bit & dsPIC30 = Instruction clock = Osc / 4 = 1MHz
PIC24 / dsPIC33 = Instruction clock = Osc / 2 = 2MHz
AVR = Instruction clock = Osc = 4MHz
So an 8-bit PIC with an Osc speed of 4MHz and a prescaler of 4 the SPI clock would be equal to 250K bits per sec when sending or receiving data.
Thanks for the explanation
I think I understood.
So if I have a dsPIC33 clocked at 4 MHz, and a prescale of osc / 4.
I'll take 500 kbits per second right?
Greetings
Re: Prescale
Posted: Wed Sep 24, 2014 6:40 pm
by Benj
So if I have a dsPIC33 clocked at 4 MHz, and a prescale of osc / 4.
I'll take 500 kbits per second right?
Sounds right to me
4MHz / 2 / 4 = 500KHz.
Re: Prescale
Posted: Wed Sep 24, 2014 7:27 pm
by Emanuel Lourenco
Benj wrote:So if I have a dsPIC33 clocked at 4 MHz, and a prescale of osc / 4.
I'll take 500 kbits per second right?
Sounds right to me
4MHz / 2 / 4 = 500KHz.
Thanks for the explanation

Very good explanation