For I2C be sure that the level translator is not push-pull. It will probably not work at all with push-pull. (I have had this problem with beagleboard and 1.8v to 5v translation).
What you want is something like this: http://www.ti.com/product/txs0102 (they come in different configurations, more channels etc) It is a open-dran level translator and you add some external pullups.
SPI will work as long as there is no pullup on the "driven" side. There might be something like "internal pullup" for CS and the bidirectional push-pull will not be able to pull it down. (this was my case with beagleboard and enc424j600 chip)
If you are too lazy, you could connect the 5V SPI through 200ohm resistors without any level translator.
what you could do, is redirect stdout to stderr .... 1>&2 But i think that grep is grepping only messages from stdout, you need to add "2>&1" before the "|" (pipe). This way, stderr messages will be placed in the stdout and grep will parse all messages.
Yees I have been thinking the same thing. But i posted the same thing few yeas ago, and since then nothing changed. There are few problems: - People that use mplab for coding will not notice that their indentation is broken. Mplab does make the indents nice and clean. - people like to hack things together. I guess there are many contributors that are able to fix the bug, but are not really coders and/or love to bring their own coding style. - Ian should be the one to set the rules :)
One free running timer. And input signal routed to pin supporting interrupt on change.
Read the timer each time pin changes: (now the rising/falling edge depends on the polarity of the ppm signal) - on rising edge read timer and store value to variable - on falling edge read timer and substract the value from the stored one. The value will represent the time between 1ms and 2ms, (actual value depends on the period of the timer). Normalize and store value. You also increment the "channel counter". If the value calculated is greater than the SYNC time (10ms? i don't remember this one, but certainly longer than 2ms) you reset the "channel counter".
If you want C implementation you can have a look at any of the ton of UAV projects that are available on the internet. (ardupilot, paparazzi, etc etc etc)
I actually have ht9170b and ht9200a. But it takes at least 8 pins to connect them to the MCU. With this code it takes only 3-4pins (depends on what you need) at most, and the sw implementation is pretty straight forward and not very computation intensive.
The source is not perfect and still needs some final touch. Right now the detector works and sets the generator to whatever it hears on input. The STM32-103stk board has integrated microphone amplifier and headphone amplifier that is fed from PWM output (through series of filters)
Generator generates signal using PWM, by changing the duty cycle each period. Two sine signals (low and high) are generated using LUT and mixed before feeding into the PWM.
Detection is done by using 8 simultaneous signal detectors. One for each frequency in dtmf. After 205samples energie of each frequency is calculated and peak detected.