How to access OPTION register and RTCC register?
Hello.· I want to use the RTCC pin as an external interrupt source.· When a switch connected to the RTCC pin sees High to Low transition, I want to enter the ISR.
In order to do this, I want RTCC set up as external event counter.
And I want my program to pre-load RTCC register with $FF (so that interrupt occurs on next 1 to 0 transition).·
Can someone please share a shell program that sets RTCC pin and pre-load the RTCC counter?
Thanks.·
In order to do this, I want RTCC set up as external event counter.
And I want my program to pre-load RTCC register with $FF (so that interrupt occurs on next 1 to 0 transition).·
Can someone please share a shell program that sets RTCC pin and pre-load the RTCC counter?
Thanks.·
Comments
Is there a way to watch the value of RTCC via SX Key debugger?
When I tried it before, RTCC always showed 0 for some reason, even though it was supposed to count internal cycle.
I tried SX Sim also, but RTCC always shows 0 also (even with OPTION = %1101_1000 or %0101_1000)
Thanks.
The program above does run properly in SX/Sim. Open the IO panel and click the RTCC input -- and give it a little time to simulate the action; you'll see the RTCC change from 0 back to 255.