We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi everyone..... Hope u r fine....... I have a problem in the following code
ORG 00H BACK:MOV A,#55H MOV P1,A ACALL DELAY MOV A,#0AAH MOV P1,A ACALL DELAY SJMP BACK DELAY: MOV R3,#70 H2:MOV R4,#254 H1:DJNZ R4,H1 DJNZ R3,H2 RET END
Now if i see the output in port P1 I see that P1:0xAA then 0X55 then 0XAA then 0x55 (repeat continuously......)toggling Pins:0xAA then 0X55 then 0XAA then 0x55 (repeat continuously......)toggling Now if i modify my program by just replacing port P1 by port P0 in all lines and now if i see output in port P0 i see that.. P1:0xAA then 0X55 then 0XAA then 0X55 (repeat continuously......)toggling pins:there is no change or toggling Why is it so?????? Why is there no toggling in output window of port p0 under pins: pins:No change P0:toggling plz help me out......
read "the bible! it will answer all your questions.
here are the links to "the bible" Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer’s Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
Stop using SMS (Stupid Monkey ***). Stupid Monkey *** has no place in a professional forum, if you want to contine using it, go somewhere where you can join other bungling amateurs.
Erik
Just because you set the port bits to high, that doesn't mean that the processor actually manages to hold them high. If the port pin is connected to the output of another chip, that other chip may drive the signal low.
Hence you can set one value for the port, and then look at the port pin register to check what state the pins really did get.
So the port can be both an input and an output and the same time.
This is very clearly described if you do take the time to read the supplied links. If you decide to not read the links (or similar links/books), you will never be able to use the processor even close to what it can do.
There is no way people on forums will spend the time to try to duplicate all that information so the only way you can grow is if you spend time learning.