Multisim and Ultiboard

cancel
Showing results for 
Search instead for 
Did you mean: 

port output selection on 8051

How do I set the port to output mode only? This is for an at89lp

I tried doing

 

;Sets outport port 3 to push pull output
mov P3M0,#00h
mov P3M1,#01h

 

but P3M0 and P3M1 is not defined.

0 Kudos
Message 1 of 2
(3,454 Views)

There should be an include file that would define the ports for the device you are trying to use.  You add the include at the top of your source code so it will translate the port names (easier to read) to register numbers. If you can't find it, you will need to find the regsiter number and define P3M0 and P3M1 yourself.  I use only PICs but I would think the same thing applies.

0 Kudos
Message 2 of 2
(3,444 Views)