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


Browsing this Thread:   1 Anonymous Users




« 1 (2)


Re: 關於12F675..
#10
資深會員
資深會員


查看用戶資訊
8bit A/D
5V/256=19.53mv /bit

10bit A/D
5V/1024=4.8828125mv /bit
放棄最低2個bit,也就是說最小解析度是4.
4.8828125*4=19.53ms /4bit

所以說解析度會相同的,但10bit要多轉換2個bit,你用的Fosc=4M,所以說1個bit需要8Tosc=2us的轉換時間,那麼2bit就會多出4us的轉換時間.

發表於: 2007/9/4 8:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#9
資深會員
資深會員


查看用戶資訊
所以10 Bit A/D 向左靠齊, 放棄最低兩個Bit...
以5V而言, 解析度還是5mv/ per bit,
只是誤差會有 15mv .... am I right ???

發表於: 2007/9/4 5:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#8
資深會員
資深會員


查看用戶資訊
參照:

shewer 寫到:
p42 7.1.6
7.1.6 CONVERSION OUTPUT
The A/D conversion can be supplied in two formats: left
or right shifted. The ADFM bit (ADCON0<7>) controls
the output format. Figure 7-2 shows the output formats.


or
p12f509 8bit AD


12f509並沒有A/D

發表於: 2007/9/4 0:44
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#7
資深會員
資深會員


查看用戶資訊
bsf STATUS,RP0 ; BANK1
movlw b' 00010001 ; Fosc/8 & ANS0 select.
movwf ANSEL ;
movlw b'00001001' ;GP0,3 =I/P GP1,2,4,5=O/P
movwf TRISIO ;
bcf STATUS,RP0 ;BANK0.

movlw b'00000001' ;Left justified/Channel 00 (AN0)
movwf ADCON0

movlw b'00000111' ;Comparator Off
movwf CMCON

bsf ADCON0,GO ;開始做A/D轉換

;只讀取ADRESH來做判斷,相當於一個8bit A/D.


發表於: 2007/9/4 0:27
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#6
新會員
新會員


查看用戶資訊
p42 7.1.6
7.1.6 CONVERSION OUTPUT
The A/D conversion can be supplied in two formats: left
or right shifted. The ADFM bit (ADCON0<7>) controls
the output format. Figure 7-2 shows the output formats.


or
p12f509 8bit AD

發表於: 2007/9/3 23:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#5
資深會員
資深會員


查看用戶資訊
嗯.... 不方便耶.... 笨鴨要用A/D....
如果10Bit A/D 可以改為 8Bit A/D ??
那問題就解決了...
Happy ....

發表於: 2007/9/3 23:32
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#4
資深會員
資深會員


查看用戶資訊
原來 10Bit A/D 還可以如此用呀? 正合笨鴨使用, 知了...
10Bit A/D對笨鴨而言太奢侈啦 ! 8Bit A/D 很贊啦...
原來BANK是如此配置的, 笨鴨還真是土番鴨耶! 又笨又固執, 哈..哈..
趕緊看看adfm, 是甚麼咚咚呀 ? 3Q !! Eigen...

說到 Tad , 偶是準備選用 Internal 4 Mhz OSC , 方便嘛...
以TABLE 7-1而言( PAGE42) 應該選用 8Tosc, Right ?
那如果選用AN0當輸入, ANSEL 就該如此設定 (PAGE 44)
bsf STATUS,RP0 ; BANK1
movlw b' 00010001 ; Fosc/8 & ANS0 select.
movwf ANSEL ;
movlw b'00001001' ;GP0,3 =I/P GP1,2,4,5=O/P
movwf TRISIO ;
bcf STATUS,RP0 ;BANK0.
不豬到 有沒有對耶.... 3Q lor !
Happy... 又學到一些 ....只是... 好累耶...
有沒有方法直接燒到 笨鴨腦袋...Hahaha...


發表於: 2007/9/3 23:25
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#3
資深會員
資深會員


查看用戶資訊
pic 10bit ad 都長成這樣。

知之為知之,不知為不知,是知也


pic 切 bank 是因為定址空間不足。

每個bank 的 register 定義都是有『義意』的。

ex:status , intcon,pcl ...這些都會在每個bank 出現,表示這些 register 『非常重要』。

只配置在 bank0 的表示『經常被使用』,而配置在 bank1 表示『不常被修改、或不常被使用』,而配置在 bank2 bank3 ,那就已經是天高皇帝遠,初學者很少會用到。

adresl 會出現在 bank1 ,表示,不很重要。
只要將 adfm clear, adresl 就可以當做不存在,adresh 依舊是 adres 。將 10bit ad 當成 8bit 使用 (唯一的差別就是 ad 的時間會多 2個 Tad )


發表於: 2007/9/3 13:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 關於12F675..
#2
資深會員
資深會員


查看用戶資訊
覺得麻煩就先用12F629吧...

發表於: 2007/9/3 12:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


關於12F675..
#1
資深會員
資深會員


查看用戶資訊
轉抬啦!! 看了一天DATASHEET.. 還真是給它' 雪特"..

同樣是8腳蜈蚣, 怎麼這棵那麼囉嗦咩??
8 Bit A/D 還會用, 只要movf ADRES,W 再movwf to...
10Bit A/D 的ADRES 居然放在不同 BANK,
而且還分ADRESH & ADRESL ...
那偶要如何儲存呢??? (DATASHEET 沒有程式可以套用..)
嗯.... 如果只儲存ADRESL, 那只能讀到約1.25V...
那輸入電壓必須限制在1.25V以下lor...
這個方法好像很笨,素不素呀??
笨鴨笨方法, 不豬到 是否可行耶!!haha...
EEPROM 部份比較清楚, 而且還有程式可以套用..可以玩玩..
而且程式好像比外接的EEPROM程式簡單..
版主介紹的那個I2C程式 ,完全末宰羊.. 不會用...偶笨嘛,haha..


發表於: 2007/9/3 11:20
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... ]

教育訓練中心

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