In SX Microcontrollers, SX/B Compiler and SX-Key Tool, davehein wrote: Nige, The "analog" variable is a single byte, so it can only hold values from 0 to 255. Also, the #1000 constant is truncated to a single-byte value, which is why the basic compiler is issuing the warning. You would need a 2-byte value to be able to count to 6000. I'm not familiar with the count routine, so I don't know if it can handle 2-byte values. You could look at the assembly code generated by the count routine and adapt it to your specific needs. Instead of using a binary counter you could implement a 4-digit BCD counter. This would eliminate the need for dividing by 1000, 100 and 10. Dave Hein ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=135099#m135569 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)