In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Peter Van der Zee wrote: Hi Bebop; Sorry, was travelling all day from San Juan Puerto Rico, so was out of touch since last nite. PJ Monty is absolutely correct that this method is a poor way to tackle this issue\, and the interrupt should be used instead. Since you started this way, and you're struggling, I tought it best to help by continuing in the vain that you started, as that would probably be easier for you by not dumping you into the ISR issues all at once. Now, to answer your questions..... 1. No, clrb and setb are proper SX instructions.....please READ the documentation. 2. The syntax %1111_1101 is a bit oriented syntax. Again, read the docs. The underscore is simply a convenience tolerated by the assembler to make a byte ecpressed in bits a little more readable. It has no other function. Yea, my mistake, to be correct I should have limited the w value to 4 bits, but the assembler interprests it correctly, and in the SX52, ra DOES have 8 bits. 3. Unfortunately I have none of Guenther's books, so I can't comment there. But, there is no such thing as "mov rb!"....but there IS "mov !rb", and it refers to the affiliated registers, pre selected by the MODE value. The value in mode defaults to $0F on pwer-up and RESET, and its value is reatained until you change it by program. 4. No, (I presume you mean) "!ra" meand write the w valu to the ra port configuration register (pre)selected by m, the mode register. Hope you're getting onto the right path, and when you feel ready to tackle this with an ISR, as PJ suggested, give a holler, and we'll help out. Cheers, Peter (pjv) ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=107862#m108123 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)