How would I locate a structure to coincide with the beginning of SFR space for the 8051? address 0x80 of directly assessible data memory.
We are using a core8051 (inside an FPGA), and the core8051 lets us map external events to SFR space. So it would be very convienent to define a structure which allows us to more easily access all of SFR space. (we take care not to "stomp" on already defined SFR registers.
How can I do that?
Thanks
Jon-
Yes, indeed that is exactly what we are doing. it is an 8k buffer, but the 8051 only sees a byte, and we read that byte as fast as we can.
fast as we can Eddie, now you are talking my language. I have, since - due to what I make - "speed is my game" developed tricks galore and maybe, just maybe, I have a trick to speed up what you do.
If you want to, you can post your 'fast code snippet' and if I see any way to speed it up, I'll happily let you know what it is.
If confidentiality is an issue and you still want my comment(s) e-mail me. BTW confidentiality is the only reason I find acceptable for communication outside the forum if the issue belong in a forum.
Erik
Excellent! Thanks. I will post some, but it will be a few days, as I have some other project bs to clean up right now.
Then a FIFO may be the fastest way to read the data. And, you don't need to worry with indexing thru SFRs. For example:
sfr FIFO_RESET = 0x??; sfr FIFO_READ = 0x??; unsigned char xdata buffer [0x2000]; void func (void) { unsigned char xdata *bp; FIFO_RESET = 1; for (bp=buffer; bp < &buffer[sizeof(buffer)]; *bp++ = FIFO_READ); }
Jon