In SX Microcontrollers, SX/B Compiler and SX-Key Tool, DAINC wrote: ' ------------------------------------------------------------------------- DEVICE SX28, OSC4MHZ, TURBO, STACKX, OPTIONX FREQ 4_000_000 ' ------------------------------------------------------------------------- ' IO Pins ' ------------------------------------------------------------------------- LED VAR RB.0 ' ------------------------------------------------------------------------- ' Variables ' ------------------------------------------------------------------------- result VAR Byte cmpValue VAR result.0 Watch_List: WATCH cmpValue, 1, UBIN ' ========================================================================= PROGRAM Start ' ========================================================================= ' ------------------------------------------------------------------------- ' Program Code ' ------------------------------------------------------------------------- Start: CMP_B = 0 ' enable comparator TRIS_B = %11111110 ' RB.0 is output Main: CMP_B = result ' exchange result with CMP GOTO Main I used SX MC 28AC, crystal 50MHz! And other prog is too! ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=196685#m197443 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)