Send_byte( data_16_bit >> 8); // send high byte Send_byte( data_16_bit ); // send low byte Mauricio Jancic Janso Desarrollos Microchip Consultant (54) - 11 - 4542 - 3519 >>-----Original Message----- >>From: pic microcontroller discussion list >>[mailto:PICLIST@MITVMA.MIT.EDU] On Behalf Of Thomas >>Sent: Lunes, 10 de Noviembre de 2003 16:34 >>To: PICLIST@MITVMA.MIT.EDU >>Subject: [PIC]: Breaking 16-bit word to 2 bytes >> >> >>Hi everyone, >> >>I have a 16bit data to send to the DAC. The SPI, as you >>already know, can only send 8 bits at a time. How do I break >>this 16bit data into 2 8bit data so that I can send to the >>SPI? Any other method besides breaking the 16bit data? I am >>using F452 with C18 compiler. Thank you in advance! >> >>Regards, >>Thomas >> >> >>--------------------------------- >>Do you Yahoo!? >>Protect your identity with Yahoo! Mail AddressGuard >> >>-- >>http://www.piclist.com hint: The PICList is archived three >>different ways. See http://www.piclist.com/#archives for details. >> >>-- >>Incoming mail is certified Virus Free. >>Checked by AVG Anti-Virus (http://www.grisoft.com). >>Version: 7.0.197 / Virus Database: 260.2.9 - Release Date: 06/11/2003 >> >> -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.197 / Virus Database: 260.2.9 - Release Date: 06/11/2003 -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.