flotulopex,
INPUTDATA = PORTA >> 4 'LOWER 4 BITS OF INPUTDATA ARE NOW UPPER 4 BITS OR PORTA (INPUT PINS)
PORTA = PORTA & %11110000 'STRIP LOWER 4 BITS OF PORTA
PORTA = PORTA | (DIGIT & %00001111) 'REPLACE LOWER 4 BITS WITH NEW DIGIT DATA
Now your upper 4 bits are stored in variable INPUTDATA. The lower 4 bits of PORTA have just been updated with the lower 4 bits of variable DIGIT.
If I'm incorrect about your original question? I can't think of any easier method.
Dave Purola,
N8NTA




Bookmarks