So, you spent the time to do all that fiddling around, and then told us why you won't do any of this fiddling around. Seems easier to leave it alone, doesn't it? Douglas Wood Software Engineer dbwood@kc.rr.com Home of the EPICIS Development System for the PIC and SX http://epicis.piclist.com ----- Original Message ----- From: "Olin Lathrop" To: Sent: Saturday, June 09, 2001 7:58 AM Subject: Re: [PIC]:16F877... Math H E L P !!! -SOLVED- Thanxs David & Olin ! > > > Please switch your mailer to send as PLAIN TEXT only. =20 > > It was, and is, set to plain text for the piclist in the addressbook. > > (since I know piclisters wants that) > > > > > sending MIME-encoded text. I am using Outlook Express, and it won't = > > put the > > > ">" in front of the text I'm replying to when it is MIME encoded. > > Outlook Express still didn't add the "> " to your text when I replied to it. > I had to save your email message to a file, copy it to another machine that > has a decent editor (not Notepad), add the leading "> ", copy it back to > this machine, delete all of your message from this window, then import the > edited file into this window. Maybe now you can see why I don't reply to > these kinds of messages when someone is asking for a favor from me. I only > replied this time because you seem to trying to fix it. > > Here are the relevant lines from the header of your email message: > > > MIME-Version: 1.0 > > Content-Type: text/plain; charset="iso-8859-1" > > Content-Transfer-Encoding: quoted-printable > > The part causing the trouble is the last line. For true plain text this > should be "7bit" instead of "quoted-printable". In Outlook Express, go to > TOOLS > OPTION, then the SEND tab. "Mail sending format" should be "Plain > Text". Click on "Plain Text Settings". "Message Format" should be MIME, > and "Encode text using" should be NONE. Yours is currently set to "quoted > printable". > > Personally, I consider it a bug in Outlook Express on the receiving end. It > should be able to take the quoted printable text, wrap it to 76 character > lines or whatever, and then add "> " in front of every line when I reply. > However, it doesn't, so the burden goes to whoever has more to gain from the > communication. On the other hand sending plain text is an easy setting to > make once, so there is little excuse for anyone sending using other > encodings. > > > ok, didnt know that. I use OE too, and have no such problems w any = > > emails from=20 > > the piclist that I have noticed. > > Most PIClist messages are encoded properly. You will only notice the > difference when you try to reply to one sent with a different encoding. > > > Olin, glanced at your other msg, it will take me a few hours to study it = > > properly. > > Most interesting. Just couldnt figure out how u meant I should use the = > > pulse as=20 > > input value. So I sampled it first. Should be a push-over to adjust my = > > code to=20 > > use the pulse as an input instead of the 255 samples value. > > What you are doing will certainly work, and you can leave it that way if > you're happy with it. What you are doing in mathematical terms is box > filtering 255 samples, then applying a single pole low pass filter on the > result. In theory, replacing the initial box filter with another single > pole low pass filter as I suggested will get you a little better response > and a little cleaner signal, but it won't be a huge difference. Here is > code that implements the two pole filter scheme I'm talking about: > > ; WARNING: Untested code > ; > ; Apply two pole low pass filter to a single bit input stream. > ; The final live filtered 0 to 255 input value is exported in > ; LEVEL. > ; > ; This file contains fragments of suggested code only. It is not > ; ready to be assembled. Bank switching is left as an exercise > ; to the coder. > ; > > inbit_reg equ > inbit_bit equ > > filt1 res 2 ;after pole 1, low byte first > filt2 res 1 ;after pole 2, low byte > level res 1 ;exported high byte of final filter output > global level > > > ; > ; This section is run once each time the input bit is to be sampled. > ; The filters will be updated to take the new input bit into account. > ; The external effect will be that LEVEL is updated. > ; > > ; > ; Update FILT1. > ; > ; > ; Remove FILT1/256 from FILT1. > ; > movf filt1+0, w ;get FILT1/255 > subwf filt1+0 ;make the new low byte > skip_nborr ;no borrow from high byte ? > decf filt1+1 ;propagate the borrow > ; > ; Add the input bit value / 256 to the filter. > ; > btfss inbit_reg, inbit_bit ;the input bit is 1 ? > goto done_inbit ;input bit is 0, skip this section > > movlw h'FF' ;get value implied by input bit / 256 > addwf filt1+0 ;make new new low byte > skip_ncarr ;no carry to high byte ? > incf filt1+1 ;propagate the carry > done_inbit ;done dealing with input bit contribution > ; > ; Update FILT2. > ; > ; > ; Remove FILT2/256 from FILT2. > ; > movf filt2+0, w ;get FILT2/255 > subwf filt2+0 ;make the new low byte > skip_nborr ;no borrow from high byte ? > decf filt2+1 ;propagate the borrow > ; > ; Add FILT1 / 256 to the filter. > ; > movf filt1+0, w ;get FILT1/256 > addwf filt2+0 ;make new new low byte > skip_ncarr ;no carry to high byte ? > incf filt2+1 ;propagate the carry > > > ******************************************************************** > Olin Lathrop, embedded systems consultant in Littleton Massachusetts > (978) 742-9014, olin@embedinc.com, http://www.embedinc.com > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body