Sorry sayzer
if i didn't give enough explaination so here it is
I have 4 variables of 4bits each
Nibble1,Nibble2,Nibble3 and Nibble4
Lets assume that they contain the following values
nibble1=F which is binary 1111
nibble2=E which is binary 1110
nibble3=D which is binary 1101
nibble4=C which is binary 1100
i want to combine them to form a 16bit word variable say result
to make result=FEDC or 1111111011011100
Then i can use the shiftout command to send the value of result
as
ShiftOut DataP,Clk,MsbFirst,[result\16]
instead of as below as i presently do it
ShiftOut DataP,Clk,MsbFirst,[nibble1\4,nibble2\4,nibble3\4,nibble4\4]
Those are read in on PORTD.0 - PORTD3 one at a time as the device
i am reading is only capable of send 4bits at a time.
i think SteveB method might work though
Hope this is clear
Isaac




Bookmarks