First off, hello all! I'm new to the piclist, but have read SEVERAL pages over these last few weeks. This place seems like a GREAT resource for resolving PIC problem ... but I haven't seen anything addressing my situation (maybe I'm strange). What I'm working on is multiplexing 5 7-segment displays using a 16F84. I'm using 7 I/O pins for the segments, and 5 more pins to enable each (through a transistors, to tie the common cathode to ground). My problem is that I'm trying to do it as follows: I have a variable defined in the top of the program: DispNum EQU 0x10 ; selected display variable Of course, I have lines of code to set the output pins, clear them all, etc. Down in the body of the code (where I want to use the variable), I have this within a loop: movwf PortB ; Now, display the new digit bsf PortA,DispNum ; Enable the next display call Delay1 ; Execute a delay bcf PortA,DispNum ; Disable the display My reasoning for doing this is because I'm more familiar with BASIC than Assembly (although I am learning). I don't want to use a constant for the pin number because the pin number changes each loop cycle. So PortA,1 will light on one cycle, PortA,2 on the next, etc. Each time the loop count increments, I want the DispNum variable to increment, and address the pin number to be active. When I assemble it, I get no errors. But when I simulate it, PortA pin one is the only one that goes high (not sure why). I've tried changing the declaration statement to #DEFINE and #DECLARE, but haven't gotten either to work. Can anyone tell me how to declare a variable, so that I can use the value stored IN the variable in the above lines of code? Please? ... Thanks for your time, Allen T. Mahurin (ATM) __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body