• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問 Configuration Bits 的選擇.
#10
版主
版主


查看用戶資訊
真的路講的不ㄧ樣,我ㄧ直以為你走 96MHz PLL , 而你指的卻是走捷徑。
這樣震盪選擇要選 1100 HS oscillator (HS) 模式不啟動 96MHz PLL 電路,所以 CPU 的執行頻率為 24MHz,指令週期為 1/24MHz/4=167nS

bit 3-0 FOSC3:FOSC0: Oscillator Selection bits(1)
111x = HS oscillator, PLL enabled (HSPLL)
110x = HS oscillator (HS)
1011 = Internal oscillator, HS oscillator used by USB (INTHS)
1010 = Internal oscillator, XT used by USB (INTXT)
1001 = Internal oscillator, CLKO function on RA6, EC used by USB (INTCKO)
1000 = Internal oscillator, port function on RA6, EC used by USB (INTIO)
0111 = EC oscillator, PLL enabled, CLKO function on RA6 (ECPLL)
0110 = EC oscillator, PLL enabled, port function on RA6 (ECPIO)
0101 = EC oscillator, CLKO function on RA6 (EC)
0100 = EC oscillator, port function on RA6 (ECIO)
001x = XT oscillator, PLL enabled (XTPLL)
000x = XT oscillator (XT)

發表於: 2008/7/17 9:00
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#9
高級會員
高級會員


查看用戶資訊
對不起,因為我看圖的時候,覺得 FOSC3:FOSC0 我設定為HS,
應該會走這綠色這條路
縮圖

發表於: 2008/7/16 19:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#8
版主
版主


查看用戶資訊
已經說是 : 指令週期 Tcy = 1/(48MHz/4) = 0.083uS

CPUDIV1:CPUDIV0 是 00 (no postscaler) 指的不是 no postscaler 真正的是 除2 (看一下方塊圖裡的說明,所以說是 96MHZ 進來後除二得到 48MHz 當作 System Clock

發表於: 2008/7/16 18:39
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#7
高級會員
高級會員


查看用戶資訊
恩 我沒有要使用USB...,只是因為只有這片練習版,目前要做IO Pin 模擬I2C 的訊號,想確定我CPU的指令時間爾已...
所以才想問說 我這樣的設定 是否為指令時間為 1/24 uS 嗎?

FOSC3:FOSC0 設定是 110x = HS oscillator (HS)
CPUDIV1:CPUDIV0 是 00 (no postscaler)

發表於: 2008/7/16 14:50
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#6
版主
版主


查看用戶資訊
24MHz Crystal 必須選 HS Mode。PLLDIV 需選擇除 6 來捯到 4MHz 後進到 96MHz PLL 電路以產生 FS USB 所需要的 96/2=48MHz 的需求。

發表於: 2008/7/16 9:29
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#5
高級會員
高級會員


查看用戶資訊
多謝版主,但是我想知道,如果我要使用外部的24MHz, 該如何設定呢?
我的FOSC3:FOSC0 目前設定是 110x = HS oscillator (HS)
這樣設定不是使用外部震盪嗎!?

發表於: 2008/7/15 17:01
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#4
版主
版主


查看用戶資訊
如果是 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:



jpg  (0.00 KB)


發表於: 2008/7/15 15:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#3
高級會員
高級會員


查看用戶資訊
多謝版主, 那可以先幫我確定

目前的設定是 使用HS
CPUDIV1:CPUDIV0 是 00 (no postscaler)

我這樣 CPU ㄧ個Clock 執行的時間就是 1/24 uS 嗎?

發表於: 2008/7/15 15:21
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問 Configuration Bits 的選擇.
#2
版主
版主


查看用戶資訊
如果你沒有要用 Full Speed USB 的功能或你是初學著,那就不建議使用 PIC18F4550 的元件,原因是太複雜了。
你所提到的只是如何設定 System Clock 的基本而已就可以讓你混亂不已。所以初學著建議先以簡單的 PIC18F452 再進階到 PIC18F4520 學習新ㄧ代的 nanoWatt 省電技術與系統頻率的切換技巧,最後才是 PIC18F4550 地複雜的 System Clock Selection。

發表於: 2008/7/15 14:31
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問 Configuration Bits 的選擇.
#1
高級會員
高級會員


查看用戶資訊
我使用的練習版是 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
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------