cancel
Showing results for 
Search instead for 
Did you mean: 

difficulty in accessing Port B in MCU I/O mode

babidesai123
Associate II
Posted on August 13, 2003 at 09:46

difficulty in accessing Port B in MCU I/O mode

3 REPLIES 3
babidesai123
Associate II
Posted on May 17, 2011 at 11:55

Hi,

I tried to access the port B in MCU I/O mode.But i couldn't access the same...

e.g

mov a,#0x00

mov dptr,#CONTROL_B

movx @dptr,a // MCU I/O mode

mov dptr,#DIRECTION_B

movx @dptr,a // as i/p port

mov a,#0x41

mov dptr,#DATAIN_B

movx @dptr,a

after this i tried to read the port B using

mov dptr,#DATAOUT_B

movx a,@dptr // read the data_out for poret B

& transmit the same on serial port....

but port B is always low...all bits=0

i would like to know where i am going wrong..

moreover the DATA_IN for port B is 0x01 (reg offset address or 0x02???)

babidesai123
Associate II
Posted on May 17, 2011 at 11:55

hI,

I AM ABLE TO ACCES THE PORT b. i got my mistake.....

purvi
yu-jun
Associate II
Posted on May 17, 2011 at 11:55

I don't know which wrong you said:

you send #0x41 and want get the data through read port B?

Is it your means?

If it is, you may get the same data, or not. because the data is sent, but that you have read has changed by the peripheral.