Quote Originally Posted by Kamikaze47 View Post
> How to send the first 5 bit(msb) and after to send the others 11 bit(lsb) with shiftout

I'm not totally clear on what you are trying to do, but from that i'm assuming you want to send the word in the following order: bit11 bit12 bit13 bit14 bit15 bit0 bit1 ... bit9 bit10

if so, you can do it like this:

Code:
variable1  var word
temp       var word

temp=variable1>>11
shiftout data_pin, clock_pin, 0, [temp\5]
shiftout data_pin, clock_pin, 0, [variable1\11]
If this is not the order you want the bits sent, what order do you want?
I have the word PLL
bit15-bit14-bit13-bit12-bit11-bit10-bit9-bit8-bit7-bit6-bit5-bit4-bit3-bit2-bit1-bit0
I want to send the bit15-bit14-bit13-bit12-bit11 first
and after send the bit10-bit9-bit8-bit7-bit6-bit5-bit4-bit3-bit2-bit1-bit0