In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Zoot wrote: Robert -- to the best of my knowledge, RTCC interrupts are enabled by activating RTCC rollovers in the options register, setting whether you are using RTCC rollover or RTCC pin for trigger, setting prescaler. Then of course, it is presumed that the RTCC itself will have some kind of -W value written to it at the end of the ISR so that the next iteration is run when it is supposed to. In SX/B, the startup code automatically sets the options reg. properly, calculates prescaler and RETIW (thank you, Bean!), so unless your program is pure assembly, you can't get control over WHEN this happens at reset or after a powerdown. If you look at the list file from an SX/B program you'll see it in the assembly in the startup code, in the order Bean mentions. Using NOSTARTUP leaves file registers and such in their startup state, but will *still* set up the ports and options, btw. [code] Options register: RTW RTE_IE RTS RTE_ES PSA PS2 PS1 PS0 Bit 7 ... Bit 0 7 -- RTW -- 0 = Register 01 addresses W, 1 = RTCC 6 -- RTE_IE -- 0 = RTCC rollover interrupt enabled, 1 = disabled 5 -- RTS -- 0 = RTCC increments on internal instr. cycle, 1 = RTCC increments on RTCC input transition 4 -- RTE_ES -- 0 = RTCC increments on rising edges on RTCC pin, 1 = RTCC increments on falling edges on RTCC pin 3 -- PSA -- 0 = Prescaler assigned to RTCC, 1 = Prescaler assigned to Watchdog timer 2 -- PS2 -- Prescaler divider setting 1 -- PS1 -- 1:2 ... 1:256 for RTCC, 1:1...1:128 for WDT 0 -- PS0 -- WD timeout: 0.016 ... 2.0 seconds [/code] (Bean, correct me if I'm wrong on any of this...) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=234188#m234473 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)