mpc82g516a Megawin Technology, mpc82g516a Datasheet - Page 112

no-image

mpc82g516a

Manufacturer Part Number
mpc82g516a
Description
8-bit Microcontroller
Manufacturer
Megawin Technology
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
mpc82g516aE
Manufacturer:
MEGAWIN
Quantity:
1 200
Part Number:
mpc82g516aF
Manufacturer:
MEGAWIN
Quantity:
20 000
21.2 Power-Down Mode
To save even more power, the Power-Down mode can be invoked by software .An instruction that sets PD bit
(PCON.1) causes that to be the last instruction executed before going into the Power-Down mode. In the Power-
Down mode, the on-chip oscillating is stopped. With the clock frozen, all functions are stopped, the contents of
the on-chip RAM and all of the Special Function Registers retain their values. The port pins output the values
held by their respective SFRs.
Either a hardware reset from the RST pin or the External Interrupt (INT0~INT3) & Keypad Interrupt can be used
to exit from Power-Down. Reset initializes all the SFRs but does not change the on-chip RAM. The External
Interrupt & Keypad Interrupt allow both the SFRs and the on-chip RAM to retain their values; and, once the
interrupt is serviced, the next instruction to be executed after RETI will be the one following the instruction that
put the device into Power-Down.
21.2.1 Wake-up from Power-Down Mode
To exit from Power-Down mode by External Interrupts or Keypad Interrupt, it is recommended to insert at least
one NOP instruction following the instruction that invokes Power-Down mode. The NOP instruction is used to
eliminate the possibility of unexpected code execution when returning from the interrupt service routine.
Note: /INT0 is used in this example.
MEGAWIN
;******************************************************************************************
; Wake-up-from-power-down by /INT0 interrupt
;******************************************************************************************
INT0
EA
EX0
;
IE0_isr:
;
start:
Resume_operation:
;
BIT
BIT
BIT
CSEG
JMP
CSEG
JMP
CLR
;... do something
;...
RETI
;...
;...
SETB
CLR
SETB
SETB
SETB
ORL
NOP
;If /INT0 is triggered by a falling-edge, the MCU will wake up, enter "IE0_isr",
;and then return here to run continuously !
;...
;...
0B2H
0AFH
0A8H
AT
start
AT
IE0_isr
EX0
INT0
IE0
IT0
EA
EX0
PCON,#02h
0000h
0003h
;P3.2
;IE.7
;IE.0
;/INT0 interrupt vector, address=0003h
;pull high P3.2
;clear /INT0 interrupt flag
;may select falling-edge/low-level triggered
;enable global interrupt
;enable /INT0 interrupt
;put MCU into power-down mode
;! Note: here must be a NOP
MPC82G516A Data Sheet
112

Related parts for mpc82g516a