I now feel a lot more confident and understand mostly on what goes on with PIC.
I am now in an area that I would like to understand a little better and hope that you can give some assistance here.
I am using a dsPIC30F4013 for my testing.
The developmental board I bought is a new EASYdsPIC4 which has a 10Mhz crystal mounted.
I have created the following code to give to help me with what's happening with Oscillators:
Code: Select all
program CLOCK
dim tClock as string[20]
dim tFOSC as string[20]
main:
ADPCFG = $FFFF
LCD_INIT_EASYDSPIC4()
LCD_CMD(LCD_CURSOR_OFF)
LCD_CMD(LCD_CLEAR)
WordToStr(Clock_Mhz(),tClock)
IntToStr(Get_Fosc_kHz(),tFOSC)
LCD_CMD(LCD_FIRST_ROW)
LCD_OUT(1,1,tFOSC)
LCD_CMD(LCD_SECOND_ROW)
LCD_OUT(2,1,tClock)
end.
When ever I change the Clock, say from 40 to 80Mhz, I understand what happens with relation to the 10Mhz crystal but I don't understand the relation to the FOSC.
For example, if I set clock to 40Mhz I see a FOSC value of: -25536 then if I set clock to 80 I see FOSC as 14464
Whats the relationship with FOSC to Clock?
Fritzables.