<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>EM4100</title>
	<atom:link href="https://rodyne.com/?feed=rss2&#038;tag=em4100" rel="self" type="application/rss+xml" />
	<link>https://rodyne.com</link>
	<description></description>
	<lastBuildDate>Thu, 19 Mar 2015 08:58:58 +0000</lastBuildDate>
	<language>en-NZ</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.7</generator>

<image>
	<url>https://rodyne.com/wp-content/uploads/2015/11/web-header2.png</url>
	<title>EM4100</title>
	<link>https://rodyne.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Slow progress on RFID decoding</title>
		<link>https://rodyne.com/?p=656</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 19 Mar 2015 08:58:58 +0000</pubDate>
				<category><![CDATA[Mobile Terminal]]></category>
		<category><![CDATA[EM4100]]></category>
		<category><![CDATA[Manchester]]></category>
		<category><![CDATA[MLX90109]]></category>
		<category><![CDATA[RFID]]></category>
		<guid isPermaLink="false">http://rodyne.com/?p=656</guid>

					<description><![CDATA[From a previous post you may remember this diagram The seleae logic analyser did a good job of decoding this because if you can see, the variation between long and short pulses in some cases are well outside most algorithms &#8230; <a href="https://rodyne.com/?p=656">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>From a previous post you may remember this diagram</p>
<p><a href="http://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg"><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-642" src="http://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg" alt="DecodingEM4100" width="865" height="442" srcset="https://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg 865w, https://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100-300x153.jpg 300w" sizes="(max-width: 865px) 100vw, 865px" /></a></p>
<p>The seleae logic analyser did a good job of decoding this because if you can see, the variation between long and short pulses in some cases are well outside most algorithms to decode, the MLX90109 data sheet says how the built in manchester decoder will make this easy, all you have to do is check for a 50% duty cycle clock and clock the binary on the positive clock pulse.</p>
<p>To save you doing this I have two working circuits none of which produce anything like a 50% duty cycle, in fact the clock signal is just a mirror of the manchester data at twice the frequency. so what is going wrong?</p>
<p>The data sheet is very poor on this and to prove it works I&#8217;ve ordered the MLX90109 development kit, hopefully using this I should have some more positive news next time.</p>
<p>Of course I&#8217;m only getting snatches of times between work and sleep to do this so I am not giving it the full attention it deserves. The other option of course is to write a more fuzzy manchester decoder and ignore the built in decoder and this may be what I will do if I dont make any progress on finding the problem with the decoder.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Decoding an EM4100 Manchester Encoded RFID Tag</title>
		<link>https://rodyne.com/?p=641</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 28 Feb 2015 22:26:31 +0000</pubDate>
				<category><![CDATA[Mobile Terminal]]></category>
		<category><![CDATA[EM4100]]></category>
		<category><![CDATA[Manchester Encoding]]></category>
		<category><![CDATA[RFID]]></category>
		<guid isPermaLink="false">http://rodyne.com/?p=641</guid>

					<description><![CDATA[Above is the 64 bit raw Manchester Encoded data stream coming out of the data pin on the MLX90109 decoder of the Mobile terminal board. I have captured it using the Saleae Logic analyser which conveniently has a Manchester decoding &#8230; <a href="https://rodyne.com/?p=641">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p><a href="http://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg"><img decoding="async" class="aligncenter size-full wp-image-642" src="http://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg" alt="DecodingEM4100" width="865" height="442" srcset="https://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100.jpg 865w, https://rodyne.com/wp-content/uploads/2015/03/DecodingEM4100-300x153.jpg 300w" sizes="(max-width: 865px) 100vw, 865px" /></a></p>
<p>Above is the 64 bit raw Manchester Encoded data stream coming out of the data pin on the MLX90109 decoder of the Mobile terminal board. I have captured it using the <a href="https://www.saleae.com/" target="_blank">Saleae</a> Logic analyser which conveniently has a Manchester decoding option. (If you havent got one of these analysers I seriously recommend buying one.)</p>
<p>If you download the EM4100 RFID chip technical manual you will see you can get it in 3 options, Manchester encoding, BiPhase Encoding and Phase shift encoding. All the cheap RFID tags out there I have seen are Manchester encoded so for my particular device I will concentrate on this. (though the principles are identical for the others)</p>
<p>Before you bring an RFID tag into the proximity of the mobile systems RFID coil, the data line will either contain no data or random gibberish. Once it begins decoding something similar to the above data stream will emerge.</p>
<p>The tag I am decoding has the number 0007666343 printed on it so how do I get from the above gibberish to 0007666343?</p>
<p>There are already some very good write ups on this, but there is no harm in repeating them again. The diagram below is a copy of the one in the EM4100 technical document and if you got here via google, you&#8217;ve probably seen it on several sites.</p>
<p><a href="http://rodyne.com/wp-content/uploads/2015/03/em4100.png"><img decoding="async" class=" size-full wp-image-643 alignleft" src="http://rodyne.com/wp-content/uploads/2015/03/em4100.png" alt="em4100" width="489" height="467" srcset="https://rodyne.com/wp-content/uploads/2015/03/em4100.png 489w, https://rodyne.com/wp-content/uploads/2015/03/em4100-300x287.png 300w" sizes="(max-width: 489px) 100vw, 489px" /></a></p>
<p>The data stream is read from top to bottom and from left to right. So the 64 bits are made up of 9 logic &#8216;1&#8217;s as a preamble, followed by 2 even parity hex characters with the manufacturer version, followed by 8 even parity hex characters with the tags number, then the 4 column parity bits and finally a stop &#8216;0&#8217; bit.</p>
<p>The pre-amble is important in two ways:</p>
<ol>
<li>Firstly in manchester encoding it generates our lowest bit rate square wave which allows our decoding mpu to sample and deterime the bit rate.</li>
<li>Secondly, the nine  &#8216;1&#8217;s are unique in the data stream and allow us to determine where the data starts. * (See last point below)</li>
</ol>
<p>The second line D00, D01, D02, D03 deocdes into a hex character which in the above case is %0001, because only one bit is set, and we are even parity, P0 is therefore set to a 1. Ignoring the pre-amble and putting all our bits from above into the above table we get:</p>
<p><a href="http://rodyne.com/wp-content/uploads/2015/03/em4100-decoded.png"><img loading="lazy" decoding="async" class=" size-full wp-image-645 alignleft" src="http://rodyne.com/wp-content/uploads/2015/03/em4100-decoded.png" alt="em4100-decoded" width="452" height="379" srcset="https://rodyne.com/wp-content/uploads/2015/03/em4100-decoded.png 452w, https://rodyne.com/wp-content/uploads/2015/03/em4100-decoded-300x252.png 300w" sizes="auto, (max-width: 452px) 100vw, 452px" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The Version Number of the Tag is therefore 0x12 and the Unique ID of the tag is 0x0074FAA7 which when converted to base 10 (Decimal) is 0007666343 which is the number that is printed on the tag. Note we always convert to 10 digits and include the leading zeros.</p>
<p>The column parity column works the same as the row parity so on column 1 we have 00001110 which is 3 &#8216;1&#8217;s set so we add a &#8216;1&#8217; in the parity column to make it &#8216;4&#8217; an even number.</p>
<p>the last bit is always &#8216;0&#8217; and the stream the repeats the sequence without a break (hence the need to find the pre-amble!).</p>
<p>Note that we do not require the version number of the tag and it is normally not printed on the tag, technically there could be the same number from two different manufacturers, but practically you have more chances of winning the lottery than this happening.</p>
<p>Hopefully it helps someone.</p>
<p>* Note the observant amongst you may have noticed that the series of zeros in the middle of the data stream look like they could be mistaken for the pre-amble so how do you know if it is or not?</p>
<p>The most simple way for an MPU to decode manchester is to split each data bit into two.</p>
<p>When we get a transition from low to high we have a logic &#8216;1&#8217; so the bitstream will be &#8217;01&#8217;</p>
<p>When we get a transition from high to low we have a logic &#8216;0&#8217; so the bitstream will be &#8217;10&#8217;</p>
<p>If you see &#8217;00&#8217; or &#8217;11&#8217; in the bitstream you have an invalid combination and you have probably got your waveform sampling 180 degrees out of phase (you chose poorly) to fix you just move the sample window forward by a bit length and try again.</p>
<p>Now to write some code&#8230;</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
