Nicholas wrote: > Can someone advise me whether is my source code is correct? Hi Nicholas, I'd like to try to help you, but could you provide some more details? I could not tell from your post if your project is working or not. Do you mean 'correct' in terms of 'best practices' of C coding or do you mean 'correct' in terms of the program is not compiling correctly, or 'correct' in terms of your microcontroller (programmed with your code) is not working as you intended. If you can be more specific you'll probably have a better chance of someone helping you out. 1) Does your C program compile without error(s)? 2) Does it work partially or not at all as you expect? 3) Have you tested your I2C routines to see if they work with your I2C devices? Come on back with some more details and I'm sure someone will help you get back on track if you are having problems. Best regards, Ken Pergola -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu