c8051f410 Silicon Laboratories, c8051f410 Datasheet - Page 188

no-image

c8051f410

Manufacturer Part Number
c8051f410
Description
2.0 V, 32/16 Kb Flash, Smartclock, 12-bit Adc
Manufacturer
Silicon Laboratories
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
c8051f410-GQ
Manufacturer:
SiliconL
Quantity:
1 928
Part Number:
c8051f410-GQ
Manufacturer:
SILICON
Quantity:
99
Part Number:
c8051f410-GQ
Manufacturer:
Silicon Laboratories Inc
Quantity:
10 000
Part Number:
c8051f410-GQR
Manufacturer:
SiliconL
Quantity:
5 500
Part Number:
c8051f410-GQR
Manufacturer:
Silicon Laboratories Inc
Quantity:
10 000
Part Number:
c8051f410-GQR
Manufacturer:
SILICON LABS/芯科
Quantity:
20 000
Part Number:
c8051f410-GQR
0
Part Number:
c8051f410-GQR..
Manufacturer:
SILICON
Quantity:
15 000
Part Number:
c8051f410DK
Manufacturer:
Silicon Labs
Quantity:
135
C8051F410/1/2/3
Reads and writes of RAMDATA load the value at address RAMADDR into RTC0DAT. The following exam-
ple writes 0xA5 to address 0x20 in the RAM and reads the value back to a temporary variable:
// in 'C':
unsigned char temp = 0x00;
// Unlock the smaRTClock interface
RTC0KEY = 0xA5;
RTC0KEY = 0xF1;
// Enable the smaRTClock
RTC0ADR = 0x06; // address the RTC0CN register
RTC0DAT = 0x80; // enable the smaRTClock
while ((RTC0ADR & 0x80) == 0x80);
// Write to the smaRTClock RAM
RTC0ADR = 0x0E;// address the RAMADDR register
RTC0DAT = 0x20;// write the address of 0x20 to RAMADDR
while ((RTC0ADR & 0x80) == 0x80);// poll on the BUSY bit
RTC0ADR = 0x0F;// address the RAMDATA register
RTC0DAT = 0xA5;// write 0xA5 to RAM address 0x20
while ((RTC0ADR & 0x80) == 0x80);
// Read from the smaRTClock RAM
RTC0ADR = 0x0E;// address the RAMADDR register
RTC0DAT = 0x20;// write the address of 0x20 to RAMADDR
while ((RTC0ADR & 0x80) == 0x80);
RTC0ADR = 0x0F;
RTC0ADR |= 0x80; // initiate a read of the RAMDATA register
while ((RTC0ADR & 0x80) == 0x80);
temp = RTC0DAT; // read the value of RAM address 0x20
; in assembly:
188
Bit 7:
Internal Register Definition 20.9. RAMDATA: smaRTClock Backup RAM Data
; Unlock the smaRTClock interface
mov RTC0KEY, #0A5h
mov RTC0KEY, #0F1h
R/W
Bit7
Note: This register is not an SFR. It can only be accessed indirectly through RTC0ADR and RTC0DAT.
RAMDATA: smaRTClock Battery Backup RAM Data Bits.
These bits provide read and write access to the smaRTClock Backup RAM byte that is
selected by RAMADDR.
R/W
Bit6
// address the RAMDATA register
R/W
Bit5
R/W
Bit4
// poll on the BUSY bit
// poll on the BUSY bit
// poll on the BUSY bit
// poll on the BUSY bit
Rev. 1.0
R/W
Bit3
R/W
Bit2
R/W
Bit1
R/W
Bit0
smaRTClock
00000000
Reset Value
Address:
0x0F

Related parts for c8051f410