They are generated by the system microcontroller and, in systems based on 8051 or 8085, for example, which use multiplexed address/data bus, they are latched in the address latch just before microcontroller attempts to read from or to write to the 8255 ..
ok listen if i have to use it in mode 0 with port a and b and inpts and ouputs repeectively i have to write a program for the command word then how ill be able to change the values of a0 and a1 weather to access port a or port b
can i have an example in assembly language
I don't know which microcontroller are you talking about but here is an example on how to control 8255 with 8051-derivative:
Code:
MOV DPTR, #0003h ; 03h - address of control register
MOV A, #10000001b ; Group A & B as outputs..C as required..
MOVX @DPTR, A
MOV DPTR, #0000h ; Address of port A
MOV A, #01h ; Only Bit0 is H..
MOVX @DPTR, A
MOV A, #11111110b
INC DPTR ; set PB as 11111110b..
MOVX @DPTR, A
A short description of the MOVX instruction you can find here: **broken link removed**
what about 8254
if i use counter 1 of 8254 and base address is 300 . For counter 1 it will become 301
what will be the address control word ?how can i calculate it