Is your DAC a serial DAC i.e., it takes input serially? If yes, have you connected DAC input to Tx pin of PIC? Are you splitting the 18 bits into 2 8 bits and 2 bits and storing the 8 bits in seperate variable before sending serially? The smallest variable char type is a byte sized variable and if you store any value between 0-255 in a char it will be8 bits only. If you store binary 11 or decimal 3 or hex 3 in char it will be stored as 00000011 which is 8 bits. If you have first byte in byte1 and second byte in byte2 and 3rd byte in byte3, you send each variable serially one after another.