In SX Microcontrollers, SX/B Compiler and SX-Key Tool, mebikerider wrote: What a coincidence to see this thread - I just spent the weekend wiring up an SX48 to be a pulse counter, intending to do this very thing with it. This is for a diagnostic instrument for debugging things like SD card drivers and floppy disk controllers, to show whether, and if so, exactly how many pulses have passed some point in a circuit. I already have a pulse counter with LED display made completely out of hardware, and it works great, except that it only counts up to 999, so I was hoping to use the SX to extend the count length almost arbitrarily, hopefully without losing too much speed response. It seemed like the timer in counter mode would be ideal for this, because it looked like it could accumulate the first 16 bits completely in hardware, giving a software routine plenty of time to cascade overflows to additional bits, and to show a snapshot of the counts on an LCD. I've been reading the timer documentation over and over, trying to figure out how to get a reading out of the counters, watching all my program efforts fail to work, and wondering why nothing in the documentation described how to do it. I guess I know now - becasue it can't be done, directly. But if this trick to read the counter may result in losing pulses then I don't think it will work for my project, because the entire purpose of this circuit is to show an accurate count of pulses. However, the RTCC external input may work almost as well, if it's configured to interrupt on overflow, and the ISR cascades the counts. What is the ninth RTCC bit in the SX48? I can't find any reference to it in the documentation. David ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=148780#m235519 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)