Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
高級會員
|
對不起,因為我看圖的時候,覺得 FOSC3:FOSC0 我設定為HS,
應該會走這綠色這條路
發表於: 2008/7/16 19:29
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
版主
|
已經說是 : 指令週期 Tcy = 1/(48MHz/4) = 0.083uS
CPUDIV1:CPUDIV0 是 00 (no postscaler) 指的不是 no postscaler 真正的是 除2 (看一下方塊圖裡的說明,所以說是 96MHZ 進來後除二得到 48MHz 當作 System Clock
發表於: 2008/7/16 18:39
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
高級會員
|
恩 我沒有要使用USB...,只是因為只有這片練習版,目前要做IO Pin 模擬I2C 的訊號,想確定我CPU的指令時間爾已...
所以才想問說 我這樣的設定 是否為指令時間為 1/24 uS 嗎? FOSC3:FOSC0 設定是 110x = HS oscillator (HS) CPUDIV1:CPUDIV0 是 00 (no postscaler)
發表於: 2008/7/16 14:50
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
版主
|
24MHz Crystal 必須選 HS Mode。PLLDIV 需選擇除 6 來捯到 4MHz 後進到 96MHz PLL 電路以產生 FS USB 所需要的 96/2=48MHz 的需求。
發表於: 2008/7/16 9:29
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
高級會員
|
多謝版主,但是我想知道,如果我要使用外部的24MHz, 該如何設定呢?
我的FOSC3:FOSC0 目前設定是 110x = HS oscillator (HS) 這樣設定不是使用外部震盪嗎!?
發表於: 2008/7/15 17:01
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
版主
|
如果是 APP013 的設定,PIC18F4550 在做 FS USB 時需要啟動內部 96MHz PLL 而且輸入到此PLL電路的頻率必須為 4MHz。24MHz/6=4MHz 後進入 PLL 輸出 96MHz
CPUDIV 設為 <0,0> 時內部是除二的,所以 96MHz/2=48MHz 這就是你的 CPU 執行的頻率。 Tosc =48MHz 則指令週期 Tcy = 1/( Fosc/4) = 0.083uS Attach file: (0.00 KB)
發表於: 2008/7/15 15:47
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
高級會員
|
多謝版主, 那可以先幫我確定
目前的設定是 使用HS CPUDIV1:CPUDIV0 是 00 (no postscaler) 我這樣 CPU ㄧ個Clock 執行的時間就是 1/24 uS 嗎?
發表於: 2008/7/15 15:21
|
|||
|
Re: 請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
版主
|
如果你沒有要用 Full Speed USB 的功能或你是初學著,那就不建議使用 PIC18F4550 的元件,原因是太複雜了。
你所提到的只是如何設定 System Clock 的基本而已就可以讓你混亂不已。所以初學著建議先以簡單的 PIC18F452 再進階到 PIC18F4520 學習新ㄧ代的 nanoWatt 省電技術與系統頻率的切換技巧,最後才是 PIC18F4550 地複雜的 System Clock Selection。
發表於: 2008/7/15 14:31
|
|||
|
請問 Configuration Bits 的選擇.
|
||||
---|---|---|---|---|
高級會員
|
我使用的練習版是 APP013 V6.0
上面有個24MHz 的震盪器接到18F4550 的OSC1 想請問的是...什麼是PLL , HS震盪,EC震盪,XT震盪,又是什麼? 如果我要用內部震盪,該如何設定? 不好意思 又要麻煩各位了... 目前的設定是 使用HS CPUDIV1:CPUDIV0 是 00 (no postscaler) 請問那我CPU ㄧ個Clock 執行的時間就是 1/24 uS 囉?
發表於: 2008/7/15 14:21
|
|||
|