That looks like an inconvenient, non-standard protocol to interpret. Since 
there is no clock line, you can't rely on edges to signal the start of each 
bit(other than the start of the datagram). However the timing of the packet 
is consistent, so I would approach it based on timing. The data 
transmission rate is very slow(833 bits per second => 833Hz) so you may be 
able to sample the data accurately without using the PRUs.

- Detect the rising edge to indicate the start of the packet
Do the following 41 times:
  - Sample the data pin
  - Pause for 1.2ms
-Verify that the message is valid by calculating the checksum

My current language of choice is Python, so I would put this logic in a 
thread which runs independently of the main program thread and creates a 
valid, parsed data structure representing the contents of the packet. 
However, you can use any language you want though.

NOTE: If you find that a lot of your of your packets are invalid then you 
should switch to using a PRU, which allows much more accurate sampling at 
higher rates.

On Saturday, October 4, 2014 10:21:57 AM UTC-7, JJ wrote:
>
> Here's my situation: I have a device with four pins: GND, Vin, data and 
> DTR. When DTR is pulled low, device sends digital data to the data line. I 
> know the bit length and the data message length, but the question is, how 
> can I read the data (zeros and ones) with a Beaglebone Black?
>
> Just to clarify, I need to read data from this device: 
> https://www.john.geek.nz/2011/07/la-crosse-tx20-anemometer-communication-protocol/
> However, it would be nice to know the principal of data capture/reading. 
> For now I know only how to detect the start of the data transmission 
> (rising edge) but everything else is unclear: what programming 
> languages/libraries do I need?. 
>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to