| ??? 12/27/03 16:04 Read: times |
#61435 - RE: AT89LS8252 dual dptr problem Responding to: ???'s previous message |
Veljo:
It is hard to determine what the problem is from just the code you provided. Have you checked that the write_spi_byte routine is not stepping on memory in an incorrect manner? Is there an interrupt coming along and having its way with your SFRs? Note...That the use of dual data pointers is normally relegated to applications wherein you need to reference two areas of DPTR addressed memory within the same loop. As such it is deemed desirable to find the fastest possible way to toggle the DPTR select bit. If you do not use a scheme that is faster that the normal mov dptr,#addr instruction then you have missed the whole advantage of having dual data pointers. Some 8052 derivative designers have placed the select bit in an SFR in a way that it can be bit addressed or toggled with an INC or DEC instruction. For your Atmel ATAT89LS8252 processor the designers did not provide these methods....however there are instructions that can get the bit set or cleared faster than the scheme you have used moving WMCOM into and back from the accumulator. To set the bit you can try ORL WMCOM, #02H and to clear the bit try the instruction ANL WMCOM, #FDH. Good luck finding your problem. Michael Karas |
| Topic | Author | Date |
| AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
| RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
| RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
| RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
| RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 | |
| RE: AT89LS8252 dual dptr problem | 01/01/70 00:00 |



