I'm currently running NOP on a Z80A cpu. All it does it flash some led, I expected it to flash 1 by 1. The led are place from address 16-0
Algimantas's answer is partly correct - the pins will begin to count in binary as these represent the 16-bit program counter (PC). But they also present an 8-bit I register, and 8-bit Refresh (R) counter. Thus there is a different pattern on the upper 8 address lines than the "expected" straight binary pattern.
There are two things going on, an opcode fetch, and a refresh cycle. The LEDS are actually showing the contents of the PC register followed by the I register on the upper 8 bits of the address bus and R is on the bottom 8 bits. It is further complicated by the length of the different registers.
More detailed explanation: The Z80 fetches opcodes with a a cycle named "M1" which is 4 clocks long. The PC is presented on the LED's during clock cycles T1 and T2. A refresh cycle also occurs during T3 and T4 of all M1 cycles. In T3 and T4, the address pins present the contents of the 8-bit I register (interrupt page register) on the upper 8 bits, and the lower 8 bits is the R-register that also increments after each opcode fetch.
The R and I registers will start at 00 and the Z80 PC will start at 00000 on reset. For the first 256 (Edit: actually 128) cycles, the LED will show the I + Refresh and the PC RAM memory addresses in perfect sync.
But at cycle 128 (0x080), the pattern will change. The Refresh register will have wrapped around back to 0x00, so the pattern will change as shown below
Address bits in Hex:
0x0000 M1 cycle (opcode fetch) 0x0000 Refresh cycle is made from I (00) + R (00) 0x0001 M1 cycle (opcode fetch) 0x0001 R 0x0002 M1 cycle (opcode fetch) 0x0002 R <and so on...> 0x007f M1 cycle (opcode fetch) 0x007f R they both still match. 0x0080 M1 cycle (opcode fetch) 0x0000 R <=- refresh register has wrapped around 0x0081 M1 <= but the Program Counter does not. 0x0001 R <= refresh is now at a count of 1 0x0081 M1 <= but the Program Counter = 0x81 <and so on...>
The LEDs show individual bits of address that is currently accessed. This is a binary representation and each combination of on/off LEDs corresponds to different address.
Since you are giving it a hardwired NOP instruction, the address grows sequentially like this:
0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 0010 0000 0000 0000 0011 <and so on...> 1111 1111 1111 1111
After that it rolls over back to all zeros. If you gave it some real code that does something, the LEDs would not grow sequentially due to branches in code. They would also show memory addresses being accessed for reading or writing.