• 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: 如何儲存 1 Byte data..
#10
版主
版主


查看用戶資訊
Yes, you are right.

Recommend to use the directive instrunction "pagesel ANSEL" instead of "bsf STATUS,RP0"

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


Re: 如何儲存 1 Byte data..
#9
資深會員
資深會員


查看用戶資訊
嗯..... 有點糊塗啦 ??????

movlw 07h ;Set GP<2:0> to
movwf CMCON ;digital IO
這個指令是關閉比較器,,,,了解.

那下面的指令在 PIC12F629 就不必設定囉????
bsf STATUS,RP0 ;Bank 1
clrf ANSEL ;Digital I/O.

Am I right ??




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


Re: 如何儲存 1 Byte data..
#8
版主
版主


查看用戶資訊
鴉先生,

你還是沒有將 Data Sheet 看的很清楚,在 PIC12F629/675 的 Data Sheet 中 FIGURE 2-2 Data Memory Map 裏在最後的注解裡有說 ANSEL 等 ADC 的暫存器只存在於 PIC12F675,PIC12F629 則沒有這些佔存器,INC 檔應該找不到這些 Register 的定義。

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


Re: 如何儲存 1 Byte data..
#7
資深會員
資深會員


查看用戶資訊
3Q lar! 原來如此...
雖然12F629沒有A/D , 但是 也要設定ANSEL一下...

嗯 ... 真不知道是12F629笨 , 還是笨鴨偶IQ低耶?? 呵..呵..

發表於: 2007/4/17 1:56
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何儲存 1 Byte data..
#6
版主
版主


查看用戶資訊
鴉先生,

PIC12F629 的GP0 & GP1內建有電壓比較器的輸入,請參考 Data Sheet 6.2 Comparator Configuration Setting 就知道了。
hellowanz 已經告訴你答案了 ,設定一下 CMCON register

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


Re: 如何儲存 1 Byte data..
#5
資深會員
資深會員


查看用戶資訊
試試看以下設定
bcf STATUS,RP0 ;Bank 0
clrf GPIO ;Init GPIO
movlw 07h ;Set GP<2:0> to
movwf CMCON ;digital IO
bsf STATUS,RP0 ;Bank 1
clrf ANSEL ;Digital I/O
movlw 08h ;Set GP<3> as inputs
movwf TRISIO ;and set GP<5:4,1:0>as outputs
bcf STATUS,RP0 ;Bank 0

發表於: 2007/4/14 23:28
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 如何儲存 1 Byte data..
#4
資深會員
資深會員


查看用戶資訊
Dear All ,
大略看了一下 12F629 DATASHEET ;
看起來12F508程式不必大改應該可以用在12F629,
但是有個問題12F629,好像不能執行下列指令..
如果我想設定 GPIO0,1,2 為 ’H’ output .
bsf GPIO,0
bsf GPIO,1
bsf GPIO,2
結果好像只有 第三個指令GPIO,2會執行也?
( GPIO0,1,2已設定為output. )
12F508就沒有這個問題 奇不奇怪呀?

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


Re: 如何儲存 1 Byte data..
#3
資深會員
資深會員


查看用戶資訊
笨鴨看了一下 12F629...
呦... 還真的比12F508 ,強很多耶!!!
以往只會玩玩10F20X, 12F508系列;;;
看來該改用12F629 囉...

謝謝, 阿里阿多 ,3Q lar!

嗯... 又有好多資料需要 K K ...

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


Re: 如何儲存 1 Byte data..
#2
資深會員
資深會員


查看用戶資訊
換 成 12f 675/629 ,程式不用大改

mcu 已經內建 eeprom

只要在 設定改變的時候存資料,基本上是不用理會斷電這個條件

eeprom 的讀寫, datasheet 上面有

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


如何儲存 1 Byte data..
#1
資深會員
資深會員


查看用戶資訊
Dear All ;
笨鴨在玩12F508觸控燈光控制線路時,
碰到一個簡單的大問題...對偶而言啦!!!
就素---------->
不知有沒有一個簡單的方法來儲存1 Byte data;

可以在停電後, 再供電時, 將最後的設定亮度復原.
我的程式會把最後的設定亮度值存在 temp register,
但是停電後當然會消失啦...
But but but ...
偶不想用 S-EEPROM 24C01, 來儲存1 Byte data ,
一來太浪費,,,, 再說笨鴨偶....也還不會寫Read/Write程式,
所以啦.. 不知有沒有一個簡單的笨方法來儲存1 Byte data呢?
素不是一個笨問題踗???? 呵!!呵 !!!

發表於: 2007/4/6 1:11
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... ]

教育訓練中心

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