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


Browsing this Thread:   1 Anonymous Users






Re: 笨鴨有問題????
#7
資深會員
資深會員


查看用戶資訊
First of all ....
Say sorry to all lovely ladies,, incloud the thousand year old FAIRY. 純文法錯誤 ... 老童言無忌囉, 我很愛女生的.
I hope, my wife won't kick on my skinny butt and let me sleep on cold lonely sofa at night....hahaha...

哈.. 哈.. 看懂啦 !!! Happy ..
我沒用過 rlf 這麼個指令 ....
以為是把 Index 內容向左移一位, 而跟 carry 無關,
原來 rlf 是 Rotate left through carry .
我還真笨耶...

發表於: 2006/2/7 4:09
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 笨鴨有問題????
#6
初級會員
初級會員


查看用戶資訊
Oh~~~~~

You called her 'it'!
How dare you are!
You have offended all women in the world !!!
(雖然是實話, 但別忘了丹麥佬因為說 自認的實話 而被穆斯林追殺).

Hahaha ...

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


Re: 笨鴨有問題????
#5
資深會員
資深會員


查看用戶資訊
哇...哇.... 看起來簡單, 原來是如此煩雜 .
謝謝您詳細的解釋...
笨鴨我需要時間好好消化一下...

By the way ,the thousand year old fairy is yours.
You keep it and I'm not going to touch it.
I would rather stay in 忠孝信義商圈 with 台北美媚...
hahaha ....

發表於: 2006/2/7 1:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 笨鴨有問題????
#4
初級會員
初級會員


查看用戶資訊
Hi! Duck,

That was Billie Chic on Mars.
I was on the moon with the fairy (and you were by my side). Remenber?! ^_^.

Full name of 'rlf f,d' instruction is 'rotate left f through carry'.
After rlf operation, content in carry flag will be in the LSBit of register f.

Imagine that if content of 'Index' is '0000 0000', 'SDA' is 'HI' and it is cloned to carry flag.
Content of __ 'Index' ___ 'Carry Flag'
'_________ 0000 0000____ 1

after 'rlf Index' is excuted,
Content of __ 'Index' ___ 'Carry Flag'
'_________ 0000 0001____ 0

Content of carry flag is now rotated into 'Index' as its LSB and the MSB of 'Index' is now in carry flag.

Let's take another example,
If serial data byte sent to SDA is '1010 1010'.
Whole strory of 'Read_byte' will be,
Content of __ 'Index' ___ 'Carry Flag'
'_________ 0000 0000____ 1 ; New SDA value cloned
'_________ 0000 0001____ 0 ; 'rlf Index' excuted.

'_________ 0000 0001____ 0 ; New SDA value cloned
'_________ 0000 0010____ 0 ; 'rlf Index' excuted.

'_________ 0000 0010____ 1 ; New SDA value cloned
'_________ 0000 0101____ 0 ; 'rlf Index' excuted.

'_________ 0000 0101____ 0 ; New SDA value cloned
'_________ 0000 1010____ 0 ; 'rlf Index' excuted.

'_________ 0000 1010____ 1 ; New SDA value cloned
'_________ 0001 0101____ 0 ; 'rlf Index' excuted.

'_________ 0001 0101____ 0 ; New SDA value cloned
'_________ 0010 1010____ 0 ; 'rlf Index' excuted.

'_________ 0010 1010____ 1 ; New SDA value cloned
'_________ 0101 0101____ 0 ; 'rlf Index' excuted.

'_________ 0101 0101____ 0 ; New SDA value cloned
'_________ 1010 1010____ 0 ; 'rlf Index' excuted.

Serial data byte on SDA now is in 'Index'.
Is it amazing?!

Carry flag is not for the purpose of testing, but for bit transitting.
Did you catch what I'm trying to tell?


發表於: 2006/2/5 14:41
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 笨鴨有問題????
#3
資深會員
資深會員


查看用戶資訊
Dear Wu..
哈... 了解,謝謝啦!!
But... clr carry flag and set carry flag 在此程式中好像是沒有關聯, 也許是其他程式會掣偵測吧 !Am I right??


發表於: 2006/2/5 11:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 笨鴨有問題????
#2
初級會員
初級會員


查看用戶資訊
Hi! Dear Duck,

For some private reasons, I disapeared for a period.
Did you back to TWN for Thanksgiving?
IOU one meal. You may get it anytime you will be in TWN again.

In your 'R_loop':
Carry flag was firstly reset to 'LO' and then 'SDA' is tested.
If 'SDA' is 'HI', then set carry flag (to 'HI').
It implies that
"if 'SDA' is 'LO', carry flag stays as 'LO'".

The 'SDA' state is now cloned to carry flag, isn't it?
After 'rlf' 8 times, one complete byte sent to 'SDA' is now in 'Index'.

OK La!
Look forward to hearing from you again.


發表於: 2006/2/4 11:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


笨鴨有問題????
#1
資深會員
資深會員


查看用戶資訊
Dear All ....
看到一個12c508 副程式 可以將一位元組資料由24Cxx內讀出,
在由FSR- Index 傳回.. 程式 如下....

Read_byte
movlw 11111101b ; SDA=input
tris GPIO ;
bsf SDA ;
movlw 08 ;
movwf temp ;
R_loop
bsf SCL ; SCL=H
clrc ; clr carry.
btfsc SDA ;
setc ; set carry
rlf Index ;
bcf SCL ;
decfsz temp ;
goto R_loop
retlw
不懂的是 clr carry 和 set carry 在做些甚麼呢 ???

發表於: 2006/2/4 8:05
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... ]

教育訓練中心

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