It would be real beaut if there were 2 additional functions, which would suit a lot of stuff I am doing:
1. DTMF decoding and converting to ASCII
2. FREQIN to about 10kHz
As I say, these would suit me a whole lot.
It would be real beaut if there were 2 additional functions, which would suit a lot of stuff I am doing:
1. DTMF decoding and converting to ASCII
2. FREQIN to about 10kHz
As I say, these would suit me a whole lot.
32-bit interger math (longs) would be very nice. DIV32 helps but "real" longs would be very nice.
Hello Muddy,
Your frequency can easily be calculated by using Pulsin in a subroutine...This has not been tested, but the idea is there. I wrote one a long time ago for RPM on a 2 stroke airplane engine.
routine:
Pulsin Pin1, 1 ,Pos 'measures the positive Pulse
Pulsin Pin1, 0, Neg 'measures the negative Pulse.
Wavelength/cycle=Pos + neg 'Adds them together for the full length
Frequency=1000/Wavelength '(in ms)
Frequency=1000000/Wavelength '(in us)
return Frequency
DTMF is a frequency...Thus the above routine can measure the frequence of the DTMF and tell you which number you pressed...
Dwayne
Ability to Fly:
Hurling yourself towards the ground, and missing.
Engineers that Contribute to flying:
Both optimists and pessimists contribute to the society. The optimist invents the aeroplane, the pessimist the parachute
Pilots that are Flying:
Those who know their limitations, and respect the green side of the grass...
Hi, DwayneOriginally Posted by Dwayne
Just a little example of what you wrote ... also applied to a model RPM Meter !!!
DTMF might be a little trickier as there are TWO mixed frequencies ... but there are cheap and excellent DTMF decoders on the market ...
Why re-invent the wheel ???
Regards
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
Even if it's not important.. it could be interesting to have
Hardware and Software block definition
Same for all other function like DEBUG, HPWM, HSERIN....Code:' ' Lcd ' --- With LCD Data = PORTA,0 ' Set data pin of LCD to ' PORTA.0-PORTA.3 RS = PORTB,4 ' Set RS bit of LCD to ' PORTB.4 E = PORTB,5 ' Set E bit of LCD to ' PORTB.5 LINES = 4 ' 4 Lines LCD COMMANDUS = 2000 ' Command delay time in uSec DATAUS = 50 ' Data delay time in uSec EndWith
I/O Alias block
Variable type blockCode:Alias PORTA .0 = SCL .1 = SDA .2 = StatusLED EndAlias
Code:BYTE CounterA Discard BlahBlah EndBYTE
Last edited by mister_e; - 6th November 2005 at 18:56.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hello alain,
DTMF decoders are very hard to find. I know there are many models on the market but they seem to be unavailable.
Clare, Motorola, SDI, TI and some others manufacturers have stated the end of manufacture for this part!
Zarlink are another company that make this part, but they are not interested to sell it for an order under 10000 units.
I think a function like DTMF Decoding would be very interesting in the next release of PBP.
salut!
Martin
Bookmarks