2003-12-19 08:34 PM
ST7FLITE19: 2 important question need ANSWER
2003-12-18 03:08 PM
a)
DCRxH DCRxL are just ''preload PWMx DUTY CYCLE REGISTER'' not as described in user manual as ''PWMx DUTY CYCLE REGISTER''. So in case of OUTPUT COMPARE, if you set DCRx to some value, you just set the preload DCRx, the real DCRx are still equ to ''0x000'', the OUTPUT COMPARE doesnt work anyway! You have to TRANSFER them into DCRx by OVF set and TRANCR set. Am i right? b) if an IO pin is set to an interrupt input pin, and the sensitivity is ''falling edge only''. When a falling down signal happened, it will enter the interrupt service routine(''ISR''), and this is OK. But in the ISR, the signal changes from falling to rising and then to falling , then keep low. At this time, it exits the ISR by excutes IRET, the same interrupt occures again! Why? Thanks J.V.2003-12-18 10:53 PM
1. The values in the DCRx goes into the shadow registers only at the OVF provided TRAN bit is set. Similar is the case with OPx bits.
2. It is the next pending interrupt. [ This message was edited by: Jatin on 19-12-2003 12:24 ]2003-12-19 08:34 PM
refer to the 2nd question:
''...then keep low. At this time, it exits the ISR by excutes IRET, the same interrupt occures again!... '' If a rising edge is insert again, and then keep high. At this time, it exits the ISR by excutes IRET, no interrupt occures any more. How does it cancel the pending interrupt? Thanks! J.V.