Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - robots

17
General discussion / Re: RPI GPIO logic level conversion
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.
18
Bus Pirate Support / Re: SPISniffer Unix Grep
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.
19
General discussion / Re: DP sources - coding standard
[quote author="arhi"]definition on "big" is problematic (many projects use tabs) ..

anyhow, I believe it's time DP designs the policy .. whatever they do will be better then no policy[/quote]

Linux kernel, and OpenOCD are two projects that come to my mind that use tabs. Tabs are there to indent. That's the purpose of the button.
21
General discussion / Re: DP sources - coding standard
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 :)

I personally work with the "linux kernel coding style":
http://www.kernel.org/doc/Documentation/CodingStyle
with some exceptions to function naming. Have a look at piratepicprog/software in the svn.
23
Open Bench Logic Sniffer / Re: spartan/virtex 6 + ddr2/3 ?
Cortex-A9 dual core + fpga for an logic analyzer, are you serious ?  Why not develop own asic ?

I thinkg that pretty decent device can be made just by adding some RAM to the existing design. It just needs some time to think about it :-)
27
Project logs / Re: DTMF detector and generator
[quote author="Squonk"]
From playing with both hardware and software DTMF decoders, these last ones suffer from a lack of sensitivity compared to their hardware counterparts.[/quote]

The sw ones are worse ? This asks for some testing :) but I don't have enough time to do it right now
28
General discussion / Re: Measuring the Pulse Width of PPM signal programming in c
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)
29
Project logs / Re: DTMF detector and generator
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.
30
Project logs / DTMF detector and generator
HI,

I have created simple DTMF detector and generator for STM32-103STK platform (olimex). It is based on STM32 cortex-m3 cpu, and should be easily ported to another platforms as well.

DTMF generator is based on AVR314 appnote, and the detector is my practice in signal processing using "Goertzel algorithm". Everything is written for integer/fixedpoint arithmetics. (no floats at all)

https://github.com/robots/STM32/tree/master/dtmf

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.