• 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: pic18F452使用8255扩展pin 的问题?
#4
資深會員
資深會員


查看用戶資訊
對阿
我本來就沒什麼沒禮貌

不過看來你果然也是沒禮貌的
哈哈哈~

發表於: 2005/8/24 17:12
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: pic18F452使用8255扩展pin 的问题?
#3
新會員
新會員


查看用戶資訊
mr. nicecookie,
i think people who rude is you. 沒禮貌....??

If you do not know the answer please keep quiet.

I had solved the problem, it do not work because of less one command.

Thanks for every one who may help me to think.

Sorry for typing english here because the PC I am using now do not have a chinese input software.

Thank u.



發表於: 2005/8/23 19:51
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: pic18F452使用8255扩展pin 的问题?
#2
資深會員
資深會員


查看用戶資訊
還大蝦勒
沒禮貌....

不鳥你

發表於: 2005/8/19 9:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


pic18F452使用8255扩展pin 的问题?
#1
新會員
新會員


查看用戶資訊
我的程序需要很多pin, 所以,用8255来扩展, 但是只有
input 没有output, 不懂是什么原因,

请大虾帮忙看看我的部分程序, 给我一些指点.



bcf CS ;chip select = 0

;;Reset 8255
;;NOTE : Active high for 8255 Reset
bsf RESET_8255 ;RESET = 1,clr the control register n all ports (A,B,C)
call DELAYL
bcf RESET_8255


;power on
;reset the 8255 using the RESET pin
;set the write pin (WR) high
;put the control word on the data bus (selects the Mode)
;set A0 and A1 pins high
;set the write pin (WR) low for a very short duration, keeping A0 & A1 high
;set the write pin (WR) high again

bsf _WR

movlw 0x00
movwf TRISD

movlw b'10000000' ;MODE:MODE SEL:PORTA:PORTC(UPPER):MODE SEL:PORTB:PORTC(LOWER)
movwf PORTD ;data from portD of PIC
nop

bsf A0 ;Control Word -> data bus , A0 =1
bsf A1 ;Control Word -> data bus , A1 =1


bcf _WR
nop
nop
bsf _WR


;output
movlw 0x00
movwf TRISD

movlw 0xff
movwf PORTD

;OUTPUT OPERATION to 8255, portA (WRITE)
;Data bus --> portA
bcf A1 ; A1 A0 _RD _WR
bcf A0 ; 0 0 1 0
nop
bsf _RD
bcf _WR
NOP
nop
bsf _WR

在线等待,,,,,~~~~~~~

谢谢




發表於: 2005/8/18 17:06
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... ]

教育訓練中心

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