mg84fl54 Megawin Technology, mg84fl54 Datasheet - Page 51

no-image

mg84fl54

Manufacturer Part Number
mg84fl54
Description
Full-speed Usb Micro-controller
Manufacturer
Megawin Technology
Datasheet
The Timer0 and Timer1 interrupts are generated by TF0, TF1 in TCON register, which are set by a rollover in
their respective Timer/Counter registers in most cases. When a timer interrupt is generated, the flag that
generated it is cleared by the on-chip hardware when the service routine is vectored to.
The Timer2 interrupts would be generated by two flags, TF2 or EXF2 in TCON2 register. TF2 would be set by a
rollover in Timer/Counter registers in most cases and EXF2 would be set by a negative transition on T2EX pin
when T2CON.EXEN2=1.
The serial port interrupt is generated by the logical OR of RI and TI. Neither of these flags is cleared by
hardware when the service routine is vectored to. The service routine should poll RI and TI to determine which
one to request service and it will be cleared by firmware.
MG84FL54B has a keypad interrupt to immediately monitor the variations of P0. The interrupt is generated by
KBIF in register KBCON (See Keypad interrupt) that the flag is not cleared by hardware when the service
routine is vectored to and must be cleared by firmware.
The other peripheral interrupts, like SPI, TWSI and USB, are usually generated on the completion of data
transmission to inform CPU to access data. The SPI interrupt is generated by SPIF in register SPSTAT (See
16
Serial Peripheral Interface
(SPI)). The TWSI interrupt is generated by SI in register SICON (See
17 2-wire Serial
Interface
(TWSI)). The USB interrupt is generated on the combination of USB event flags and USB endpoint
flags contained in USB register (See
19 Universal Serial Bus
(USB)). These peripheral interrupt flags are not
cleared by hardware when the service routine is vectored to and must be cleared by firmware.
All of the bits that generate interrupts can be set or cleared by firmware, with the same result as though it had
been set or cleared by hardware. In other words, interrupts can be generated or pending interrupts can be
canceled in firmware.
MEGAWIN
MG84FL54B Data sheet
51

Related parts for mg84fl54