Richard Graziano wrote: > I need to load a 12-bit DAC with a number between 0 and 4095. How can > I divide the input number into a lower byte and an upper nibble? I am > using BASIC. If your basic supports the "mod" operator: UPPER = INT(NUMBER / 256) LOWER = NUMBER MOD 256 Otherwise: UPPER = INT(NUMBER/256) LOWER = NUMBER - UPPER * 256 -Andy === Andrew Warren --- aiw@cypress.com === IPD Systems Engineering, CYSD === Cypress Semiconductor Corporation === === Opinions expressed above do not === necessarily represent those of === Cypress Semiconductor Corporation -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body