quris_terris
Junior Member level 3
i m using this instruction for reading data from P0 of microcontroller.
where P0 is serving as address and data port.
v=XBYTE[0xA000] -128;
where v is any variable . the address 0xA000 is address where no op is present . i generate only this address toactivate my decoder(which is connected to three high bits of address bus) and decoder send data to P0 by activating device(ADC) but data at P0 cannot be read. V has only value ie V=-128
what is the problem ? the assembly code for above statement is is as fallows
MOV DPTR,#0xA000
MOVX A,@DPTR
ADD A,#p0 (0x80)
MOV v(0x30) , A
where P0 is serving as address and data port.
v=XBYTE[0xA000] -128;
where v is any variable . the address 0xA000 is address where no op is present . i generate only this address toactivate my decoder(which is connected to three high bits of address bus) and decoder send data to P0 by activating device(ADC) but data at P0 cannot be read. V has only value ie V=-128
what is the problem ? the assembly code for above statement is is as fallows
MOV DPTR,#0xA000
MOVX A,@DPTR
ADD A,#p0 (0x80)
MOV v(0x30) , A