if the time between 50mSec pulses is fairly long, say, 50 mSec or more, you can connect the pulse to a GPIO pin of an Xbee. The configure it to send a message each time the GPIO pin changes from 0 to 1 or vice versa, or both. Then on the receiving end, you have an XBee mated to a PC or microprocessor to count messages.
ARM7 would do but is overkill versus an 8 bit like an Atmel AVR or other.
If the receiving end can be a PC, no micro is needed.
Thanks for your answer. The problem is that I can have up to 4 different devices generating different pulses. So what will happen if 4 pulses arrive at the same time on 4 different GPIO ? The min. time duration for these pulses is 80ms. But if I respect Shanon-Nyquist, I should sample every 40 ms ?
On the coordinator side, there is an Xbee attached on a port Com of an embedded board arm9 - linux. So yes, a kind of pc.
40ms is a fairly long time for a processor. You could poll in a tight loop with just about any microcontroller. I prefer AVRs for little stuff, as GCC is available for that architecture. PICs generally require commercial C compilers, and the architecture of the PIC16 and PIC18 is abysmal by modern standards.
You can also use a hardware interrupt pin, which will generate an interrupt on a pin change. AVRs have a few available. MSP430s are one set of microcontrollers which allow you to generate interrupts on 1-2 whole 8bit ports.
The XBee can sample as frequently as every 1ms so it would seem like an external microcontroller in unnecessary. Multiple samples can be bundled into one transmission to reduce overhead–you’ll need to do that if you want to facilitate extremely fast sampling rates.
Check the ATIR (sampling rate) and ATIT (time between transmissions) commands to get started.
Thanks, I will start a Pcb prototype with a lpc2138 and code a C API frame library for it via UART.
Regards,
Francois
you know about Coridium’s Wireless ArmMite - has socket for XBee, and uses a small LPC (ARM7), programmable with IAR’s free liimited demo version? I think SFE sells it.
The vendor’s BASIC and C for this board are usable though idiosyncratic.