electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

help me communicate with 8255!


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> help me communicate with 8255!
Author Message
vanbayhoang



Joined: 31 Oct 2009
Posts: 5
Location: HVB


Post31 Oct 2009 14:55   

help me communicate with 8255!


Please can any one provide me asemble code for communicate with 8255 using at89c51!
thanks!
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post01 Nov 2009 2:21   

Re: help me communicate with 8255!


Here is a good starting point:
http://www.8052.com/codelib/files/8255_Example.zip

Rgds,
IanP
Back to top
Google
AdSense
Google Adsense




Post01 Nov 2009 2:21   

Ads




Back to top
vanbayhoang



Joined: 31 Oct 2009
Posts: 5
Location: HVB


Post01 Nov 2009 3:08   

help me communicate with 8255!


thanks!
you have asembly code? I need code asembly!
sorry!, My english is not good.
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6490
Helped: 1542
Location: West Coast


Post01 Nov 2009 3:25   

Re: help me communicate with 8255!


First, map 8255 as an external memory - that's the easiest way ..
See attached picture ..
On power on all mode/direction bits in the Control Register are set to "0" and that means that all 3 ports are set to be outputs ..

To send data to, say, port A, use the following command:

Code:
MOV DPTR, #addres of A; in this example it is #4000h
MOV A, #what you want to send
MOVX @DPTR, A


Other addresses are as follows:
Address 4000H: port A
Address 4001H: port B
Address 4002H: port C
Address 4003H: configuration register

To set Port A as inputs, you have to set D4 in the Control Register.
Code:
MOV DPTR, #4003h
MOV A, #00010000b
MOVX @DPTR, A


and then:
Code:
MOV DPTR, #4000h; addres of Port A
MOV A, @DPTR

will read PORT A of the 8255 ..

Rgds,
IanP



Sorry, but you need login in to view this attachment

Back to top
vanbayhoang



Joined: 31 Oct 2009
Posts: 5
Location: HVB


Post01 Nov 2009 4:08   

help me communicate with 8255!


thanks for your help!
have fun!
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> help me communicate with 8255!
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
About connecting 8255 with 8051 microcontroller (4)
how to write a code to interface with 8255 ? (5)
How to communicate with cdsMsgServer (2)
2 MCUs communicate with each other (13)
Help!!! Reg interfacing LCD to 8051 using 8255 (1)
I canīt communicate with a motorola 68hc11 on a BotBoard2 (2)
how to communicate data with sound card (2)
Make 16f819 communicate with 16f648a, how? (5)
Need to Communicate BarCode Scanner with PLC (2)
Programming for PIC16F877A to communicate with LabVIEW (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS