2003-08-13 12:46 AM
difficulty in accessing Port B in MCU I/O mode
2011-05-17 02:55 AM
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???)2011-05-17 02:55 AM
hI,
I AM ABLE TO ACCES THE PORT b. i got my mistake..... purvi2011-05-17 02:55 AM
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.