I been trying to find with instruction was executed in this waveform and I narrowed down the choices to XRL A, @R0 or ORL 04H, A

here is the picture

http://img511.imageshack.us/img511/959/97955260mp4.jpg

I choice those two out of the rest because the write and the WR did change

can I get some help to determine which is read from the code ?

Thanks

Recommended Answers

All 9 Replies

What does the information in P0 and P2 tell you?

the addresses

P0 looks like data to me.

I'm assuming 'A' is a memory location identifier, and Rx are registers.

INC and DEC are obvious (and wrong), but what does XRL do?

P0 looks like data to me.

I'm assuming 'A' is a memory location identifier, and Rx are registers.

INC and DEC are obvious (and wrong), but what does XRL do?

" XRL does a bitwise "EXCLUSIVE OR" operation between operand1 and operand2, leaving the resulting value in operand1. The value of operand2 is not affected. A logical "EXCLUSIVE OR" compares the bits of each operand and sets the corresponding bit in the resulting byte if the bit was set in either (but not both) of the original operands, otherwise the bit is cleared. "

http://www.ustr.net/lcd001.shtml

You need to see the diagram to understand what's happening. P0 is the low byte and P2 is the high byte of the address bus. 2A67H is placed on the address bus. ALE goes low and enables the latch. 67H goes through to the output of the latch. P0 then acts as the data bus and 42h is placed on it. WR-bar goes low and 42H is written to 2A67H.
It then reads 04H and 13H from external ROM.

XRL A, @R0 or
ORL 04H, A please I'm totally confused

04H is read from 571AH. 13H is read from 571BH.
04H is the opcode for INC A.
13H is the opcode for RRC A.

I'm not sure any of them make any sense.

I assume you have this information?
http://www.win.tue.nl/~aeb/comp/8051/set8051.html
http://www.win.tue.nl/~aeb/comp/8051/instruction-set.pdf

The last two steps at 571A and 571B look look like program execution, where 04 and 13 are the opcodes of the instruction being fetched (which do match some of the choices you post).

As for what does the initial write, I've no idea.
The only thing which comes close is (d), but that would appear to write to internal RAM (and thus would not be visible on those lines).
Everything else seems to modify a register.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.