Shop OBEX P1 Docs P2 Docs Learn Events
Beau's Phase Detector — Parallax Forums

Beau's Phase Detector

CenlasoftCenlasoft Posts: 265
edited 2011-09-20 14:18 in Propeller 1
@Beau or anyone that can help,
I was researching phase difference measurement with a prop and found Beau's Phase Detector post : http://forums.parallax.com/showthread.php?95640-Propeller-Demo-Frequency-Phase-Detector
I edited the code and took out the references to the TV object and used the Parallax Serial Terminal object instead. I tried it at different frequencies and got good results. My question is:
When there is a value that I am suppose to get ie. for 430 khz I get a number that has numbers to the right of the decimal place with a calculator and strange numbers on from the prop hat does not match. I assume that the function to correct this is a proc called:
SimpleNum(x,y,DecimalNumber,DecimalPoint). Can some one help me?
Thanks,
Curtis

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2011-09-20 14:18
    I would focus on that function ...

    SimpleNum(x,y,DecimalNumber,DecimalPoint)

    ...That was something I put together before the actual 'SimpleNumbers' object had been created or had a chance to mature.

    since the tv graphics were involved, I combined the x,y as to where I wanted the result placed. The decimal number is actually a full integer value ( I'm big into integer math if you can get away with it) ... and finally the DecimalPoint is where you want to re-introduce the decimal point making the result appear to have floating point characteristics.... There could be an error in that piece of code.


    If you can send me your revised code using the Serial rather than the tv, I will take a look at it.
Sign In or Register to comment.