Hi everyone, I have another quirk that's really horrid in the 18F458. It's a rather difficult problem to explain, so I will attempt my best to do so. My boss picked up an errata note from Microchip in the 18FXX8 document for Rev. B4 (Note numbers 4 and 5) that basically involved erratic code while crossing the 0x4000 boundary. That means any call's or goto's from the high section to the low section, or vice versa, had a potential to act erraticaly. In response to this, he emailed Microchip, and they replied stating to implement this: Basically make intermediate functions, foo_asm, written in assembly, that look like this: foo_asm: data 0xffff goto real_foo Where real_foo is written in C, located somewhere else. The "access" function, foo_asm, would be in the same region as the calling function.. so if I had a function in the high region of code (0x4000 and up), that needed to call/goto foo which is in the low section (0->4000), it would call foo_asm, which is located low section. This then calls the real function. So far so good? He decided to implement this by modifying all of our function calls this way - using access functions, splitting our code essentially into high and low sections. Ater this, a huge problem started to happen. The INTCON register, specifically the Low interrupt enable bit (Bit 6) was mysteriously getting cleared after the chip was reset. No code was doing this, and I verified by stepping through each line tediously. IT would get cleared at various different points, purely random. I did notice that it worked on some of our boards though. Taking a closer look at the chips, and then testing with 12 chips in all, I found that the code, after it was split, worked on all chips marked: PIC18F458-I/P 0234HQB BUT didn't work on all chips marked: PIC18F458-I/P 0303OUE Could anyone shed light on this problem? We would like to get the code working on all versions, but can't seem to do so at this point. Thank you for your time, Jai Dhar Sterner Automation Limited 43 Hanna Avenue Toronto, Ontario M6K 1X6 416-538-1826 x231 jai.dhar@sternerautomation.com http://www.sternerautomation.com #76 on this year's PROFIT 100 http://www.profitguide.com/profit100 -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body