<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: I would like to read a pin at high speed...</title>
		<link>http://forums.leaflabs.com/topic.php?id=517</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:17:10 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=517" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3823</link>
			<pubDate>Fri, 04 Mar 2011 17:47:05 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3823@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Skids - thanks for the extra information.&#60;/p&#62;
&#60;p&#62;I think you have understood all my suggestions and views:&#60;br /&#62;
1. A listener (as you have described it) appears to be very doable with a Maple and a few electronic components. From our previous discussions, I think the USB throughput would likely be fine as long as you didn't do too much stuff in real time on the laptop.&#60;br /&#62;
2. You should make a simulator (using a Maple), even if it can only support lower speeds, because it will make development and testing easier&#60;/p&#62;
&#60;p&#62;If your simulator can get up to full speed, then it may be the core of a bus controller! To clarify, some of the learning from building this simulator will help quantify the difficulty of building the bus controller. You may have all of the controller horse-power you need.&#60;/p&#62;
&#60;p&#62;There is one thing I have learned over the years, and that is failure or difficulty comes from the places we don't understand. Hence, I like to do a 'thin sliver' through the entire 'end to end' problem so that I get some of a handle on the whole problem. So I try to tackle key parts of the problem area early because they are likely the home of the largest obstacles. Ideally strng them all together so that it executes a key 'use case'.&#60;/p&#62;
&#60;p&#62;As I get a better understanding of the problem, it still feels like the listener is very doable, with care and a willingness to &#34;get down and dirty&#34; with the I/O. &#60;/p&#62;
&#60;p&#62;A tricky part might be, once you have an adequately accurate but slow listener (using the simulator), scaling its speed up. &#60;/p&#62;
&#60;p&#62;I might do some small, relatively independant sets of experiments:&#60;br /&#62;
1. 'record' the real, full-speed signal without any interpretation (under 50 LOC?),&#60;br /&#62;
2. try to 'play back' a slowed down version of the 'recorded' signal as a simulation,&#60;br /&#62;
3. try to 'decode' the simulation, initially at low speed&#60;/p&#62;
&#60;p&#62;If building a controller is essential to overall success:&#60;br /&#62;
4. Play back the 'recording' in real time into the bus to see if the real receiver can be driven correctly.&#60;/p&#62;
&#60;p&#62;I may have missed something, but it seems like those 3 or 4 experiments would provide a good indication of likely success.&#60;/p&#62;
&#60;p&#62;(Yes, if you really like 'traditional textbooks' and find them effective, look out for a second hand copy of Art of Electronics. If you can find a copy to peruse, I recommend you check it out. I like 'proper' textbooks, but I know folks who get very little from them)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3818</link>
			<pubDate>Fri, 04 Mar 2011 09:55:40 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3818@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;gbulmer,&#60;/p&#62;
&#60;p&#62;Thank you for your very detailed response, I will attempt to answer your questions below.&#60;/p&#62;
&#60;p&#62;First, no I have not ordered &#34;The Art of Electronics&#34; as it is presently out of stock (Amazon) but I shall attempt to get a secondhand copy based on your recommendation.&#60;/p&#62;
&#60;p&#62;When I wrote &#34;I am wondering if I should attempt to simulate the 2Mhz ac signal to test the &#34;front end&#34; or just use a second maple to produce low voltage dc pulses and assume that the operation of the front end is simple.&#34;  I was asking if you felt that the extraction of 3 volt d.c. pulses from the twisted pair was a simple task and something I could put to one side until I have access to a live data bus.  This question is the reason I am purchasing books as I recognise that I don't have the necessary electronics background to fully understand some of your suggestions.  I get the impression that the answer is yes only slightly complicated by there being a number of ways of implementing an interface with the data bus.&#60;/p&#62;
&#60;p&#62;I can fully understand that you may not know what I'm attempting to achieve as I realise that I have been a little vague.  I have spent the last fifteen or so years working with a digital datalink communications system called JTIDS/Link16.  This system requires that the JTIDS radio is integrated with a host platform mission system.  The host communicates with the JTIDS radio using a dedicated 1553b data bus.  In the past and at present I have to rely on third party software to monitor data being passed on the bus, this software is always very expensive and often of dubious quality.  Over these years I have become interested in programming as a hobby and have realised that I could write some decent software that meet my own needs, but the stumbling block has always been the interface with the 1553 data bus.  A few years ago these cost approximately £5000 which is a little steep for what is a hobby based project.  Last year I discovered the Arduino and read about the then proposed Maple - I purchased my two Maple cards and started asking all my questions.  &#60;/p&#62;
&#60;p&#62;I have two aims:  The first is to build a bus monitor (a listener) that reads the 20 bit data words from the bus and passes the data (16 bits) to the laptop via the USB for decoding and display.  The second is to build a Bus Controller, possibly using a second Maple (or an Oak).  The bus controller has to set up a repeating series of messages called a frame and then allow the addition of extra messages from the laptop within the frame.  A frame always ends with a 4ms quiet period and the data exchange period is nominally 16ms thus a frame is 20ms long.&#60;/p&#62;
&#60;p&#62;The idea of using an Ethernet or similar interface chip is an interesting idea that I will look into.  Harris did produce a dedicated 1553 chip but they are hard to come by.&#60;/p&#62;
&#60;p&#62;best wishes&#60;/p&#62;
&#60;p&#62;Simon
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3812</link>
			<pubDate>Thu, 03 Mar 2011 17:22:22 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3812@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Skids - it just occurred to me that there might be a physical interface chip for the signal standard. Several companies make physical interface (PHY) chips for different types of standard interconnect or interface (e.g. USB, firewire, Ethernet, RS485, ), so you might get lucky. &#60;/p&#62;
&#60;p&#62;Typically, they provide a very high degree of electrical isolation. The electrical isolation may be via small transformers or optical coupling, so there are no electrical connections, or carefully engineered diode-like electronics. PHY's also may help get some of the signaling waveforms right, i.e. by limiting the rate of change of the signal so it is a nice 'trapezoid', which helps reduce electrical interference or noise.&#60;/p&#62;
&#60;p&#62;It is probably not essential in initial work, but may be very helpful when you want to drive the signal wires 'for real' rather than just a test framework.&#60;/p&#62;
&#60;p&#62;USB, Firewire and RS485 use differential signals, so PHY's or signal interfaces for them might be a useful place to start looking. (I believe Ethernet is differential, but I think the voltage is much bigger/different)&#60;/p&#62;
&#60;p&#62;Edit: I was wrong about Ethernet. I was remembering the Power over Ethernet (PoE) spec. voltages, not the signaling voltages.&#60;br /&#62;
Wikipedia says 10BaseT uses +/- 2.5V so you might be able to coax an Ethernet PHY into working if you want significant electrical isolation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3811</link>
			<pubDate>Thu, 03 Mar 2011 16:55:42 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3811@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Skids - I hope you ordered &#34;The Art of Electronics 2nd Ed.&#34; by Horowitz and Hill. It is probably the only electronics book you ever need !-) (until 3rd Ed appears :-)&#60;br /&#62;
[Edit: this is a 'traditional' text book, not designed for readers who value fun over fundamentals, or who prefer easy answers to hard facts :-]&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;The signal line is a twisted pair and is basically an ac voltage at 2Mhz. If I connect to a pin on the Maple via diode and a resistor the diode will block half the signal ...&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;For one signal:&#60;br /&#62;
True&#60;br /&#62;
Yes, Half Wave Rectification, you only get the positive part, the diode will block half the signal.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I am not certain what should happen to the neutral or second wire ...&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Assuming the video you linked to is correct, the second wire is the complementary or 'mirror image' signal.&#60;br /&#62;
Lets call the two signal wires A and B.&#60;br /&#62;
When A is +3.75V, B is -3.75V&#60;br /&#62;
When B is +3.75V, A is -3.75V&#60;br /&#62;
So, if there is a diode and a load (resistor) connecting B to ground, the other half of the signal will appear from it.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62; ... should I connect this to a ground pin ...&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;No, I would put a diode and resistor on A and B signals, and recover both positive halves of the signal. Then you will be able to tell the difference between no signal, and signal A being negative.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62; ... Also am I correct in thinking that a second diode is then used to clamp the positive signal to plus 3 volts?&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Yes, I would use diodes to clamp the signal swing to plus 3.3 volts.&#60;br /&#62;
In the scheme I am suggesting, both signals are used, and diodes are used to 'half wave rectify' both signals. Both those signals are also clamped by further diodes so that they can't go above 3.3V.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;I am wondering if I should attempt to simulate the 2Mhz ac signal to test the &#34;front end&#34; or just use a second maple to produce low voltage dc pulses and assume that the operation of the front end is simple.&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;I'm not clear what you mean.&#60;br /&#62;
I would want to make/get something that I could use to simulate the signal producing part of the system. A Maple seems like a great approach because you can do some experiments at low frequency where it will be easier to debug, and at frequencies that are meaningful; depending on complexity, maybe 2MHz, but maybe a bit lower. But this might not be enough for your purposes. I really don't understand enough of what you need to do ultimately. &#60;/p&#62;
&#60;p&#62;A simple signal generator is just going to give a simple repetitive signal, it won't encode data. I don't have anything fancier, so I can't comment on other pieces of equipment.&#60;/p&#62;
&#60;p&#62;I think I could make something that records chunks of the rectified signal using a Maple.&#60;br /&#62;
I think I could also replay that recorded signal using a Maple (no deep thought here, just off-the-top-of-my-head), but it might look a bit whacky (no libraries, just raw I/O access), and I might not be able to get &#60;strong&#62;exactly&#60;/strong&#62; the 2MHz frequency the machinery produces (but likely within 50%).&#60;br /&#62;
Assuming generating the rectified signal is an adequate test framework, then it feels doable.&#60;/p&#62;
&#60;p&#62;So my feeling is, if the video is accurate, and the bit I read in the spec is accurate, you could likely get a 'listener' working on a Maple, and make a test/simulation tool from a Maple, with a few diodes, resistors and maybe a few more low-cost components (under $10) for the interface.&#60;br /&#62;
If you need to &#60;strong&#62;drive&#60;/strong&#62; the &#60;strong&#62;real&#60;/strong&#62; signal wires (and not just listen or simulate) it will get more difficult, and you will need some smarter interface, but once you've built a 'listener', you'll have learned so much more about the foibles of the system, that you will be in a better position to decide how to progress.&#60;/p&#62;
&#60;p&#62;If it all becomes very nasty, I feel test equipment to observe the real system (e.g. a storage 'scope or logic analyser) would be more use than something that could simulate the signal.&#60;br /&#62;
(LeafLabs can likely comment better on test equipment than me.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3807</link>
			<pubDate>Thu, 03 Mar 2011 07:40:49 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3807@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I have just placed an order for a couple of new electronics books so that I can attempt to build a front end. As these still have yet to arrive I would like to ask some more basic questions:&#60;/p&#62;
&#60;p&#62;The signal line is a twisted pair and is basically an ac voltage at 2Mhz.  If I connect to a pin on the Maple via diode and a resistor the diode will block half the signal (true/false? half wave rectification?) I am not certain what should happen to the neutral or second wire, should I connect this to a ground pin and if so should I also connect the screen to ground.  Also am I correct in thinking that a second diode is then used to clamp the positive signal to plus 3 volts?&#60;/p&#62;
&#60;p&#62;I am wondering if I should attempt to simulate the 2Mhz ac signal to test the &#34;front end&#34; or just use a second maple to produce low voltage dc pulses and assume that the operation of the front end is simple.  If I were to buy some form of test equipment to generate an ac square wave what would do the job; I read about signal generators, function generators pattern generators and so on but suspect that they may be overkill.&#60;/p&#62;
&#60;p&#62;Any thoughts?&#60;br /&#62;
Skids
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3795</link>
			<pubDate>Tue, 01 Mar 2011 19:09:46 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3795@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Okay, I agree.&#60;br /&#62;
It definitely says the signals are differential, and at complementary voltage values (+3.75V &#38;amp; -3.75V).&#60;br /&#62;
So one approach to connecting to the signals to a Maple input is to use a couple of diodes to rectify the signal across a load (e.g. a resistor), so it will never go negative (because reverse voltages will be blocked by the diode).&#60;/p&#62;
&#60;p&#62;I'd start off with a voltage divider and 3.3V zener diodes, to reduce the chances of something bad happening (and I might leave them in circuit forever:-)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3788</link>
			<pubDate>Tue, 01 Mar 2011 15:10:09 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3788@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;The 4th tutorial on this page : &#60;a href=&#34;http://www.mil-1553.com/Excalibur08/Templates/showpage.asp?DBID=1&#38;amp;LNGID=1&#38;amp;TMID=84&#38;amp;FID=434&#34; rel=&#34;nofollow&#34;&#62;http://www.mil-1553.com/Excalibur08/Templates/showpage.asp?DBID=1&#38;amp;LNGID=1&#38;amp;TMID=84&#38;amp;FID=434&#60;/a&#62;  describes the signal as differential.&#60;/p&#62;
&#60;p&#62;Skids
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3787</link>
			<pubDate>Tue, 01 Mar 2011 14:25:47 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3787@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
Yes I do have a dual trace oscilloscope but unfortunately I failed to take a screen shot of both lines (Doh!), I will attempt to get some new screen shots next time I have access to the live data bus in a few weeks time.&#60;/p&#62;
&#60;p&#62;best wishes&#60;br /&#62;
Skids
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3736</link>
			<pubDate>Fri, 25 Feb 2011 12:27:42 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3736@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Skids - have you a dual trace oscilloscope? Can you put both signals in, and see what they do?&#60;br /&#62;
If they are differential signals, one will be positive, and the other negative.&#60;/p&#62;
&#60;p&#62;In any case, you could just diodes to rectify the signal. I'd use a Schottky  diode because the voltage drop is smaller.&#60;br /&#62;
A pair of diodes, and a resistor on each signal would allow you to keep the signal within 0 to 3.3V&#60;br /&#62;
(Or you could use an optical coupler to isolate your Maple from the signal.)&#60;br /&#62;
You won't be using much current, so small signal Schottky diodes would do (they are about 3p each in 50's or 100's). If you are handy with a soldering iron, you could use the cheap surface mount components from e.g. RS. Soldering them onto a bit of veroboard would be feasible.&#60;/p&#62;
&#60;p&#62;I looked at the ST Micro document &#34;RM0008 Reference manual&#34;, and it says the input pins have a Schmmit trigger incorporated already, so you shouldn't need to do much signal conditioning once the signal is clamped to 0 to 3.3V.&#60;/p&#62;
&#60;p&#62;If the signal is as clean as it looks from the photo, decode it directly as you go along.&#60;br /&#62;
Run a timer at, say 8MHz (at least 4x faster than the signal, and preferably much faster)&#60;br /&#62;
Associate a pin-change interrupt handler with the input pin tied to the signal.&#60;br /&#62;
When the packet starts (i.e. it wasn't in 'getting a packet' state), set the timer to 0, set the state to 'getting a packet',&#60;br /&#62;
Grab the timer value on the pin-triggered interrupts, the timer is the time since the last change, the change could be at the start of a bit, or mid bit, and the timer value will allow the coder to recognise which.&#60;br /&#62;
You can probably work out if it was a 0 or 1 as you go&#60;/p&#62;
&#60;p&#62;If it is noisy, and when you are just starting to experiment, and will want lots of debug information, save the values into an array, and do some processing once the packet appears to be complete. &#60;/p&#62;
&#60;p&#62;I realise I am glossing over all the hard work, but I think it's worth setting out a basic approach.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3735</link>
			<pubDate>Fri, 25 Feb 2011 07:54:46 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3735@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi,  I have been away working with the equipment I wish to monitor and have managed to put my new scope on the data lines.  The connection is three wire comprising two signal wires and a screen.  The voltage swings between +/- 3 volts at the point I am connecting to (known as a stub).  I have posted a screen shot of a single data packet at the following web address &#60;a href=&#34;http://www.axholmecameraclub.co.uk/page17/page17.html&#34; rel=&#34;nofollow&#34;&#62;http://www.axholmecameraclub.co.uk/page17/page17.html&#60;/a&#62; and I have indicated the mid data bit transitions on the screen shot.  &#60;/p&#62;
&#60;p&#62;I have also dragged the same PDF file to this text but I'm not sure that it will upload the file.&#60;/p&#62;
&#60;p&#62;In general the data came in bursts every 30 ms and most of the 30ms the bus was quiet.  I tried to condition the data signal using a TLC 132 comparator but I did not have much success so I will read up on Scmitt_trigger as you suggest.&#60;/p&#62;
&#60;p&#62;best wishes&#60;br /&#62;
Skids&#60;/p&#62;
&#60;p&#62;/Users/skids/Documents/1553 Bus Monitor Project/Scope1.pdf
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3690</link>
			<pubDate>Sun, 20 Feb 2011 11:39:37 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">3690@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;skids - I think that running the clock at 4MHz or more will let the code identify where in  time the edge happens, and hence what the transition/edge represents.&#60;/p&#62;
&#60;p&#62;What voltages does the signal swing between?&#60;br /&#62;
Is it a two wire differential signal, i.e. while one wire swings negative, the other swings positive?&#60;/p&#62;
&#60;p&#62;If it is a 'proper' differential signal, you could use diodes to rectify it. A comparator or Schmitt trigger (&#60;a href=&#34;http://en.wikipedia.org/wiki/Schmitt_trigger&#34; rel=&#34;nofollow&#34;&#62;http://en.wikipedia.org/wiki/Schmitt_trigger&#60;/a&#62;) would give it nice sharp edges.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3679</link>
			<pubDate>Sat, 19 Feb 2011 05:08:59 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3679@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Continued:&#60;/p&#62;
&#60;p&#62;My post above was written based on sampling the data at 1Mhz as discussed earlier in the texts.  It seems to me that I can avoid some problems by sampling at 2Mhz, this will allow the routine to identify if it is sampling a sync &#34;chip&#34; or a data &#34;chip&#34; based on the previous samples (I think).&#60;/p&#62;
&#60;p&#62;Simon
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-3678</link>
			<pubDate>Sat, 19 Feb 2011 05:01:22 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">3678@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi after several months!  Work and general life as usual got in the way but I am now in a position to restart my project.  I have reread the posts above and now understand what gbulmer was getting at when he writes that my code only need sample at the data rate; the original data is contained in one half of the the manchester bit stream and the timing will/should be stable over 20 data bits of a frame or data word.&#60;/p&#62;
&#60;p&#62;The reason I am writing is to ask yet another question:  gbulmer's explanation above talks about detecting the sync pulses in terms of shuffling for a moving airport walkway and its the shuffling that I don't yet understand how to implement.  This is probably a good point to state what my assumptions are as there is a good chance that they are wrong.  The original manchester data stream is an a.c. squarewave. To read this signal I need to convert it into d.c. highs and lows.  I believe I can do this by using a high speed comparator.  The problem with doing this is that I am throwing away half the information in the original signal as the negative portions and zero portions (no data on line) are now both treated as zeros.  This will not cause a problem reading the data portion of the stream but I think it gives me a problem in identifying the sync pulses.&#60;/p&#62;
&#60;p&#62;A sync puse is defined as a long manchester  pulse of 3 bit periods.  Two types are defined; long high followed by long low or the reverse of long low followed by long high.  Am I correct in thinking that there is no way of avoiding the need to identify the start of both types of sync pulse?  If this is the case would using a second pin to feed an inverted signal into work with the maple decoding the first pin to go high after a period of quiet?&#60;/p&#62;
&#60;p&#62;I hope to be able to gain access the the real databus sometime next week and attach my prototype frontend end to it and then monitor the signals using a scope.&#60;/p&#62;
&#60;p&#62;best wishes&#60;/p&#62;
&#60;p&#62;Simon
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-2815</link>
			<pubDate>Wed, 24 Nov 2010 13:36:05 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">2815@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Skids - sorry, that is a book I haven't looked at. &#60;/p&#62;
&#60;p&#62;I have got suffiently comfortable with the Atmel ATmega datasheets and application notes that I've stopped looking at stuff which is covered in Atmels documentation. This is especially true for the Arduino as the source code of pretty much everything that it can do is on the web somewhere.&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;The additional complexity I was referring to is the various timer modes: normal, clear timer on compare match (CTC), fast PWM and phase correct PWM.
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Yes, I have slogged through the Atmel documentation. It isn't pretty.&#60;br /&#62;
It may be easier and quicker to just try every mode with an oscilloscope by your side :-)&#60;/p&#62;
&#60;p&#62;Fortunately, there are only a finite number of things a timer can do!-)&#60;/p&#62;
&#60;p&#62;There are a bunch of ways to proceed. So please go the way that makes sense. One way might be to start off with an interrupt handler, set up to wait for a signal change on a pin. When the interrupt handler is triggered, look at the pin value (which will be stable by then) and the timer value. Set the timer to tick at, say 4 or 8MHz for full speed (say 4 or 8KHz for initial experiments) so that the handler can tell the difference between a mid-bit-time Manchester transition, versus the optional 'getting to the right level' start-bit-time transition.&#60;/p&#62;
&#60;p&#62;Your second Maple could generate data by using delayMicrosecond to Manchester encode data in software.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Skids on "I would like to read a pin at high speed..."</title>
			<link>http://forums.leaflabs.com/topic.php?id=517&amp;page=2#post-2814</link>
			<pubDate>Wed, 24 Nov 2010 12:37:45 +0000</pubDate>
			<dc:creator>Skids</dc:creator>
			<guid isPermaLink="false">2814@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi&#60;/p&#62;
&#60;p&#62;Thanks for the links - more reading tonight!&#60;/p&#62;
&#60;p&#62;Re your request &#34; Would you post a link to the Arduini timers?&#34;  I am unable to post a link as it was a chapter from the book &#34;Arduino Microcontroller Processing for Everyone!&#34; by Steven F. Barrett published  by Morgan &#38;amp; Claypool.  The additional complexity I was referring to is the various timer modes: normal, clear timer on compare match (CTC), fast PWM and phase correct PWM.&#60;/p&#62;
&#60;p&#62;I will pass on DMA for the time being then - phew!&#60;/p&#62;
&#60;p&#62;best wishes&#60;br /&#62;
Simon
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
