In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote: John, Yes, Usually the scaling is done in the interrupt. I normally have the interrupt to ALL the work, but if you need cooperation, have the main program clear a flag, then have the interrupt SET the flag after the time has been reached. The main program will look the flag to be set, then perform whatever action, then clear the flag again. Also you should check for the counters being zero instead of 255. When they reach 255 that is only dividing by 255 NOT 256. IF ISRCOUnter = 0 Then ISRMultiplier1 = ISRMultiplier1 + 1 IF ISRMultiplier1 = 0 Then PAUSE will not affect RTCC adversely. RTCC will be zero the very next cycle after it is 255. When the very first interrupt instruction is executed RTCC is 3. (Remember SX/B does some housekeeping for interrupts so RTCC will be > 3 when the first SX/B instruction is executed). John, as for the display (I'm assuming you mean the HC4LED display from me), keep each digit as a seperate variable. This eliminates the need to decode the digits. Something like Digits VAR Byte (4) INC Digits(0) IF Digits(0) = 10 THEN Digits(0) = 0 INC Digits(1) IF Digits(1) = 10 THEN Digits(1) = 0 INC Digits(2) ' And so on... Bean. ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=120370#m120435 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)