Hi! I use a T89C51CC01 from Atmel WM, I would like to use the dual dptr feature on my program. When I run the Debugger, i can't switch the DPTR. In the µC manual, it says that we must set the DPS bit of the AUXR1 register. I do this just before writing on the DPTR. When i set this bit and write just after on the DPTR register, the debugger show me that i write on the first DPTR and not in the second ? Does anyone konw why ?
save_table_eeprom: MOV A,EECON ANL A,#01H CJNE A,#00,save_table_eeprom ;Test si l'EEPROM n'est pas occupé ;Début de la programmation MOV EECON,#02H ORL AUXR,#020H MOV DPTR,#0081H MOV AUXR1,#01H MOV DPTR,#01C8H ;here it's my problem! MOVX @DPTR,A ;I rite on the bad DPTR ;Lancement du cycle d'écriture en EEPROM MOV EECON,#054H MOV EECON,#0A4H RET
I didn't need to view the actual value by the SFR address! I need to know if i really use two or one DPTR in my program! Does the debugger could show me if my second DPTR is used ? In the debugger mode of µVision, It seem's to me that the register window show the value of the two DPTR normally! There is DPTR[0] and DPTR[1]. So, why DPTR[1] never change and keep the value 0x0000 ?