PBCLK

Beta Testing discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
jpc
Posts: 1986
Joined: 22 Apr 2005 17:40
Location: France 87

PBCLK

#1 Post by jpc » 26 Jan 2012 23:12

according to the datasheet, the default peripheral bus clock divisor would be 8, this should be visible in bit's 19 and 20 of the OSCCON register, however when i check this with debugger this seems not to be the case. These bits seem to indicate that the compiler has reset these bits to both zero making the Peripheral clock equal to the System-clock.
I think this needs some extra attention and may ask for some additional functions that will allow us to set and read this PBCLK and take it into account when calculating baudrates for example.
The current approach is perhaps tempting as there is only the system-clock to take in account but we may need a slower PBCLK which currently is a messy operation.
Au royaume des aveugles, les borgnes sont rois.

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: PBCLK

#2 Post by janko.kaljevic » 27 Jan 2012 16:18

Hello,

Thanks for suggesting, we will inspect this matter thoroughly.

As you noticed, PBDIV bits are set to their default values. And these values can be set in config bits (from Edit Project window).
Peripheral clock that is configured this way will affect appropriate peripherals.

Currently these values does not affect baud rate calculations and we will inspect it.

Best regards.

piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

Re: PBCLK

#3 Post by piort » 28 Jan 2012 06:19

hi JPC,
you are the best beta tester for the MP for P32 on this forum ;-)
Since MCHP have low count pin, i want to move all my existing and future project to P32 and " grace à toi " the next version of compiler will be better and safer ;-)
thx very much for your effort !!!!

Post Reply

Return to “mikroPascal PRO for PIC32 Beta Testing”