Use pointer to address xram mapped DS12887, as this example:how to interface it since it is considered as external memory.
#include <reg51.h>
xram char *ds12887;
void main (void){
char c;
ds12887 = &0x8000; // assume DS12887 locate on XRAM 0x8000
*ds12887 = 0; // 0x8000 <- 0
c = ++ds12887; // 0x8001 -> c
}
XBYTE[0x1234] = 0x55;
mov dptr,#0x1234
mov a,#0x55
movx @dptr,a
8051 onboard timer isn't RTC (real time clock), kiranmayik discusses about RTC.dedicate one onboard timer (in 8051) for the clock, that should do
MOV P0,#$55
MOV A,P0
MOVX A,@DPTR
MOVX @DPTR,A
MOVX A,@R0
MOVX @R0,A
MOVX A,@R1
MOVX @R1,A
XBYTE[0x1234] = 0x55;
If you use these statements to control I/O thru Port 0
Code:MOV P0,#$55 MOV A,P0
you need to connect the pull up resistors(10k)
MOV P0,#$55
Make sure the chip remain powered when your microcontroller voltage supply is off.each time the power is on the time is being set to the initial time
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?