Jinx wrote... >> It's six in the morning, and I'm only half through my first cup >> of mud, so it's entirely possible I may have missed a "bsf >> status, rp0" somewhere; but I don't see it >It's two in the morning, and I've just finished my last cup of >mud. It is entirely possible you missed a bank set but you >didn't 'cos there wasn't one I can't believe I nailed that one at 6 am. Wow. But then again, banking/paging is the first thing I suspect anytime I goof something up, so that's where I started looking... >http://home.clear.net.nz/pages/joecolquitt/davedong.html >As you can see, there's now a definite sloping off of the >event, and it lasts for just 45ms. The decrease in amplitude >is not what you'd call stupendous but it's heading in the >right direction. I'll play around with it some more.=20 That's because C1 was sized for a 1-second decay time. =20 Sounds like you're just not a "dong" type guy, Jinx, more like one of those "tink" fellows. If all you want is a 45 millisecond tink instead of a nice, long dong, reduce C1 from 10uF down to about 1uF or even less. With C1 =3D 0.47uF, you should see the waveform decay almost completely in 45 ms. >As the >code and circuit is there, perhaps someone else might >like to grab Dave's dong and have a go, compare notes ouch >Freakin' bank switching got me again. Are PICs the only >micros that have this ? It is so much easier when you have >contiguous addressing At one time or another over the last quarter-century I've used the 4040, 8085, 8086, 6800, 68HC11, 6502, 68000, and the CP1600. None of them had it. If it weren't for the register banking, the program memory paging, the skip conditionals, and having little pieces of RAM scattered all over creation, PICs would be a piece of cake to program. The skips are a big problem for me: most of my work over the years was with 6800/68HC11, and those have branch instructions that vector to a specific location if a specific condition is met; after all those years doing branches that way, the PIC skip instructions just feel "wrong" (even though they're not, of course). But I'll get there someday. Watch, then I won't be able to program anything other than PICs, ever again! Dave -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body