Anonymous
Not applicable
Mar 22, 2009
02:43 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 22, 2009
02:43 AM
We have typed the following code to acces a port:
mov a, REG[PRT2DR]
OR A,0X0FF
MOV REG[PRT1DR],A
but the value at the port is not changing
please do help ASAP
mov a, REG[PRT2DR]
OR A,0X0FF
MOV REG[PRT1DR],A
but the value at the port is not changing
please do help ASAP
1 Reply
Mar 22, 2009
06:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Mar 22, 2009
06:49 AM
When you want to control a Port pin by accessing the PRTxDR register, the pin should be set to StdCPU and the drive mode should be other than HighZ or HighZ Analog. Try setting the drive mode to StdCPU / Strong and the code should work. Also, you can directly modify the pin state by using the following instruction.
or reg[PRT2DR], 0xFF
or reg[PRT2DR], 0xFF