Hola, I'm currently working on a project involving Analog's ADE7756 Energy Meter chip. It has a 40-bit energy register to store the accumulated energy. I'm coding in Hi-Tech C on a 16F876 and am having troubles coming up with a good way to store the data and still be able to use it as a simple atomic variable. PICC doesn't seem to care for long int's, and even still a long isn't large enough to store the 40-bit number. A character array works for now, but testing is becoming a pain since I'd like to be able to add and multiply this number easily as well as output it using printf to my console. A side note, Hi-Tech's printf produces G's, H's and I's when I print using the %x format, last I heard those weren't hex values. :) Ideas? Suggestions? Is there a way to make a 40-bit int? -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics