FrankT wrote: > > Via I2c I receive 2 bytes HighByte and LowByte. > > What is the fastest way (with MPLABC) to convert them into a unsigned long > variable? > > Frank Temmerman. Define your long variable MylongVar. Define HighByte and LowByte at the same addresses as MyLongVar ie : unsigned long MyLongVar unsigned LowByte @ &MylongVar unsigned HighByte @ &MylongVar+1 Loading the correct values into HighByte and LowByte will automatically load it into MyLongVar -- Friendly Regards Tjaart van der Walt mailto:tjaart@wasp.co.za _____________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | | WASP International http://wasp.co.za | | GSM and GPS value-added applications | | Voice : +27-(0)11-622-8686 | Fax : +27-(0)11-622-8973 | |_____________________________________________________________|