AceOfHearts
New Member
I am learning to program the 8051.
I have downloaded a simple program I wrote to drive 7 segment display...I need some explenations.
On the microcontroller, the outputs are inverted so that when I wanted a Logic 1, it ouputs a Logic 0 instead, and vice versa.
If I Do
MOV A, #10
that is moving the decimal 10 into the accumulator, which in binary is 00001010
If I then do the following:
MOV P0, A
I am explecting P0.1 and P0.3 to be at Logic 1, but it seems to be the other way round when I download it....
I could easily complement the values in the program, but this is not what I was expecting from what I learnt before.
Any help appreciated...
I have downloaded a simple program I wrote to drive 7 segment display...I need some explenations.
On the microcontroller, the outputs are inverted so that when I wanted a Logic 1, it ouputs a Logic 0 instead, and vice versa.
If I Do
MOV A, #10
that is moving the decimal 10 into the accumulator, which in binary is 00001010
If I then do the following:
MOV P0, A
I am explecting P0.1 and P0.3 to be at Logic 1, but it seems to be the other way round when I download it....
I could easily complement the values in the program, but this is not what I was expecting from what I learnt before.
Any help appreciated...