??? 10/11/06 18:21 Read: times |
#126230 - you are missing half the story and mixing Responding to: ???'s previous message |
If you write to a port, it takes 1 cycle to do the write. If it's an external port, it takes one cycle to do the write. if the bus cycle is 12 clocks, and the system clock is at 24 MHz, that's a half microsecond. If it's a two-cycle instruction, which an external port write would be, it will take a microsecond, right?
all movx instructions are 2 cycles which pull you down to 500kHz if you do repetetive data to a 8255. That, however is ridiculous, you also need to get the data to the accumulator, an as fast as possible data mover could be mov R2, #high_address_of_8255 mov r0, #low_address_of_8255 mov dptr, #buffer mov r7,count loop: movx a,@dptr 2 inc dptr 2 movx @r0,a 2 djnz count, loop 2 total 8 cyclesso for any real work the best you can get is 125kBYTE/sec so, as, indeed the best you can do (even with a ridiculous example) is 500kHz, how can it then be "That 1.2 Mbytes/sec rate is considerably slower than the oldest, slowest i8255 can do." also, you compare to "traditional" and now you mix in "and the system clock is at 24 MHz" Erik |