<?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>István Ványi&#187; Projects</title>
	<atom:link href="http://www.vanyi.net/category/projects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.vanyi.net</link>
	<description>István Ványi personal site</description>
	<lastBuildDate>Wed, 31 Aug 2011 17:43:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Radio-orienteering &#8211; modifying fox hunting PIC asm &#8211; yo5at</title>
		<link>http://www.vanyi.net/projects/radio-orienteering-fox-hunting-pic-asm-yo5at/</link>
		<comments>http://www.vanyi.net/projects/radio-orienteering-fox-hunting-pic-asm-yo5at/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 18:02:17 +0000</pubDate>
		<dc:creator>Istvan</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[yo5at]]></category>

		<guid isPermaLink="false">http://www.vanyi.net/?p=491</guid>
		<description><![CDATA[I am going to modify a radio-orienteering (fox hunting) PIC asm (written by yo5ooe) code to fit the new IARU rules for the new type of fox hunting contest.
The current rule is:
The foxes are on a 5 minutes cycle. Fox 1 will transmit &#8220;MOE&#8221; in CW for one minute and then Fox 2 will transmit [...]<p><a href="http://www.vanyi.net/projects/radio-orienteering-fox-hunting-pic-asm-yo5at/">Radio-orienteering &#8211; modifying fox hunting PIC asm &#8211; yo5at</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>I am going to modify a radio-orienteering (fox hunting) PIC asm (written by <a href="http://www.vanyi.net/tag/yo5oee/" title="yo5oee">yo5ooe</a>) code to fit the new IARU rules for the new type of fox hunting contest.</p>
<p>The current rule is:<br />
The foxes are on a 5 minutes cycle. Fox 1 will transmit &#8220;MOE&#8221; in CW for one minute and then Fox 2 will transmit &#8220;MOI&#8221; for one minute and then Fox 3 will transmit &#8220;MOS&#8221; for one minute and then Fox 4 will transmit &#8220;MOH&#8221; for one minute and then Fox 5 will transmit &#8220;MO5&#8243; for one minute.</p>
<p>The new rule is:<br />
The foxes are on a 1 minutes cycle. Fox 1 will transmit &#8220;MOE&#8221; in CW for 12 seconds and then Fox 2 will transmit &#8220;MOI&#8221; for 12 seconds and then Fox 3 will transmit &#8220;MOS&#8221; for 12 seconds and then Fox 4 will transmit &#8220;MOH&#8221; for 12 seconds and then Fox 5 will transmit &#8220;MO5&#8243; for 12 seconds.</p>
<p><a href="http://www.vanyi.net/projects/radio-orienteering-fox-hunting-pic-asm-yo5at/">Radio-orienteering &#8211; modifying fox hunting PIC asm &#8211; yo5at</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vanyi.net/projects/radio-orienteering-fox-hunting-pic-asm-yo5at/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ARDF &#8220;fox hunting&#8221; start control clock</title>
		<link>http://www.vanyi.net/projects/ardf-fox-hunting-start-control-clock/</link>
		<comments>http://www.vanyi.net/projects/ardf-fox-hunting-start-control-clock/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 11:32:12 +0000</pubDate>
		<dc:creator>Istvan</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.vanyi.net/?p=207</guid>
		<description><![CDATA[This project was ordered by yo5kop radio club.
They needed this device to control the ham radio fox hunting contests. Mainly it&#8217;s a start clock which periodically attempt the participants to prepare for contest and finally give them the sign to start the contest.
This is the device photo:

ARDF &#8220;fox hunting&#8221; start control clock is a post [...]<p><a href="http://www.vanyi.net/projects/ardf-fox-hunting-start-control-clock/">ARDF &#8220;fox hunting&#8221; start control clock</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>This project was ordered by yo5kop radio club.<br />
They needed this device to control the ham radio fox hunting contests. Mainly it&#8217;s a start clock which periodically attempt the participants to prepare for contest and finally give them the sign to start the contest.</p>
<p>This is the device photo:<br />
<img src="http://www.vanyi.net/wp-content/uploads/2009/09/fox_hunting_device-300x240.jpg" alt="Fox hunting device" title="Fox hunting device" width="300" height="240" class="aligncenter size-medium wp-image-208" /></p>
<p><a href="http://www.vanyi.net/projects/ardf-fox-hunting-start-control-clock/">ARDF &#8220;fox hunting&#8221; start control clock</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vanyi.net/projects/ardf-fox-hunting-start-control-clock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PIC tachometer up to 9999 RPM</title>
		<link>http://www.vanyi.net/projects/pic-tachometer-up-to-9999-rpm/</link>
		<comments>http://www.vanyi.net/projects/pic-tachometer-up-to-9999-rpm/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 11:02:15 +0000</pubDate>
		<dc:creator>Istvan</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.vanyi.net/?p=204</guid>
		<description><![CDATA[Another early project of mine I build for yo5bhg.
It&#8217;s a simple tachometer with PIC microcontroller which can count up to 9999 RPM.
This is the code in the main.asm files (other files will be added when I have time to rewrite the comment to English).


?View Code ASM;-------------------------------------------------------------------------      
;Author    [...]<p><a href="http://www.vanyi.net/projects/pic-tachometer-up-to-9999-rpm/">PIC tachometer up to 9999 RPM</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>Another early project of mine I build for yo5bhg.<br />
It&#8217;s a simple tachometer with PIC microcontroller which can count up to 9999 RPM.</p>
<p>This is the code in the main.asm files (other files will be added when I have time to rewrite the comment to English).<br />
<span id="more-204"></span></p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p204code2'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p2042"><td class="code" id="p204code2"><pre class="asm" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">;-------------------------------------------------------------------------      </span>
<span style="color: #666666; font-style: italic;">;Author       : Istvan Vanyi, yo5ofj</span>
<span style="color: #666666; font-style: italic;">;Filename     : main.asm</span>
<span style="color: #666666; font-style: italic;">;PIC tachometer up to 9999 RPM</span>
<span style="color: #666666; font-style: italic;">;-------------------------------------------------------------------------      </span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">include</span> <span style="color: #7f007f;">&quot;config.inc&quot;</span>	<span style="color: #666666; font-style: italic;">;some include files</span>
    <span style="color: #000000; font-weight: bold;">include</span> <span style="color: #7f007f;">&quot;p16f628.inc&quot;</span>
    <span style="color: #000000; font-weight: bold;">org</span>	<span style="color: #0000ff;">0x0c8</span>
    <span style="color: #000000; font-weight: bold;">include</span> <span style="color: #7f007f;">&quot;display.inc&quot;</span>
    <span style="color: #000000; font-weight: bold;">include</span>	<span style="color: #7f007f;">&quot;delay.inc&quot;</span>
&nbsp;
&nbsp;
    <span style="color: #000000; font-weight: bold;">org</span>	<span style="color: #0000ff;">0x00</span>				<span style="color: #666666; font-style: italic;">;start the program</span>
    <span style="color: #000000; font-weight: bold;">goto</span>	start
&nbsp;
<span style="color: #666666; font-style: italic;">;**************************************************************</span>
    <span style="color: #000000; font-weight: bold;">org</span>	<span style="color: #0000ff;">0x04</span>				<span style="color: #666666; font-style: italic;">;interrupt vector</span>
    <span style="color: #000000; font-weight: bold;">goto</span>	interrupt
&nbsp;
interrupt<span style="color: #339933;">:</span>					
    <span style="color: #000000; font-weight: bold;">include</span>	<span style="color: #7f007f;">&quot;intsvr.inc&quot;</span>	
<span style="color: #666666; font-style: italic;">;**************************************************************</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">;**************************************************************</span>
start<span style="color: #339933;">:</span>
init<span style="color: #339933;">:</span>
    clrf 	r0				<span style="color: #666666; font-style: italic;">;clear registers</span>
    clrf 	r1
    clrf 	r2
    clrf	d1
    clrf	d2
    clrf	d3
    clrf	d4
&nbsp;
    clrf 	porta			<span style="color: #666666; font-style: italic;">;PORTA for input/output</span>
    movlw 	<span style="color: #0000ff;">0x07</span>
    movwf	cmcon
&nbsp;
    bank1	
    movlw	b<span style="color: #7f007f;">'00000000'</span>		<span style="color: #666666; font-style: italic;">;all  PORTB pins  output</span>
    movwf	trisb
&nbsp;
    movlw	b<span style="color: #7f007f;">'00110000'</span>		<span style="color: #666666; font-style: italic;">;ra0-ra3 output for cathode, ra4 input for the counter</span>
    movwf	trisa
&nbsp;
    movlw	b<span style="color: #7f007f;">'00100000'</span>		<span style="color: #666666; font-style: italic;">;tmr0 divide rate 1:1 </span>
    movwf	option_reg
    bank0
&nbsp;
&nbsp;
    movlw	b<span style="color: #7f007f;">'00110001'</span>     <span style="color: #666666; font-style: italic;">;set tmr1, intrerrupt every 500 msec</span>
    movwf	t1con                                                                   
&nbsp;
    movlw	b<span style="color: #7f007f;">'00001011'</span>
    movwf	tmr1h                                                                   
    movlw	b<span style="color: #7f007f;">'11011100'</span>
    movwf	tmr1l			
&nbsp;
    clrf	pir1			
    bank1                                                                           
    movlw	<span style="color: #0000ff;">.1</span>                                                                      
    movwf	pie1			<span style="color: #666666; font-style: italic;">;start temporizattion</span>
    bank0                                                                           
    movlw	b<span style="color: #7f007f;">'11100000'</span>			                                       
    movwf	intcon			<span style="color: #666666; font-style: italic;">;activate interrupting</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">;**************************************************************</span>
<span style="color: #666666; font-style: italic;">;main procedure</span>
<span style="color: #666666; font-style: italic;">;**************************************************************</span>
main<span style="color: #339933;">:</span>
    <span style="color: #00007f; font-weight: bold;">call</span>	display
    <span style="color: #000000; font-weight: bold;">goto</span>	main			<span style="color: #666666; font-style: italic;">;endless loop</span>
<span style="color: #666666; font-style: italic;">;**************************************************************	</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">end</span></pre></td></tr></table></div>

<p><a href="http://www.vanyi.net/projects/pic-tachometer-up-to-9999-rpm/">PIC tachometer up to 9999 RPM</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vanyi.net/projects/pic-tachometer-up-to-9999-rpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DCF-77 radio clock with PIC microcontroller</title>
		<link>http://www.vanyi.net/projects/dcf-77-radio-clock-with-pic-microcontroller/</link>
		<comments>http://www.vanyi.net/projects/dcf-77-radio-clock-with-pic-microcontroller/#comments</comments>
		<pubDate>Sat, 05 Sep 2009 10:57:51 +0000</pubDate>
		<dc:creator>Istvan</dc:creator>
				<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://www.vanyi.net/?p=197</guid>
		<description><![CDATA[In 2001 I started to learn PIC microcontrollers and Microchip PIC assemble language.
The project was ordered by yo5oee for our city&#8217;s Administrative Palace.
This was my first project related to PIC microcontrollers and it wasn&#8217;t so easy.
I&#8217;d used a DCF-77 radio controlled clock chip which made date and time synchronization every night. The picmicro was PIC16F877.
This [...]<p><a href="http://www.vanyi.net/projects/dcf-77-radio-clock-with-pic-microcontroller/">DCF-77 radio clock with PIC microcontroller</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>



No related posts.]]></description>
			<content:encoded><![CDATA[<p>In 2001 I started to learn PIC microcontrollers and Microchip PIC assemble language.</p>
<p>The project was ordered by yo5oee for our city&#8217;s Administrative Palace.</p>
<p>This was my first project related to PIC microcontrollers and it wasn&#8217;t so easy.<br />
I&#8217;d used a DCF-77 radio controlled clock chip which made date and time synchronization every night. The picmicro was PIC16F877.</p>
<p>This is the DC-77 module schematics:<br />
<a href="http://www.ptb.de/en/org/4/44/442/dcf77_1_e.htm"><img class="aligncenter size-medium wp-image-198" title="DCF-77 radio clock" src="http://www.vanyi.net/wp-content/uploads/2009/09/dcfrcvr-s-300x185.gif" alt="DCF-77 radio clock" width="300" height="185" /></a></p>
<p><span id="more-197"></span><br />
I written the atomic.inc file, the purpose was to synchronize the PIC clock with DCF clock.<br />
atomic.inc</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p197code4'); return false;">View Code</a> ASM</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1974"><td class="code" id="p197code4"><pre class="asm" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">;-------------------------------------------------------------------------      </span>
<span style="color: #666666; font-style: italic;">;Author       : Istvan Vanyi, yo5ofj</span>
<span style="color: #666666; font-style: italic;">;Filename     : atomic.inc</span>
<span style="color: #666666; font-style: italic;">;DCF-77 atomic radio controlled clock</span>
<span style="color: #666666; font-style: italic;">;-------------------------------------------------------------------------      </span>
    errorlevel <span style="color: #339933;">-</span><span style="color: #0000ff;">302</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">ORG</span> <span style="color: #0000ff;">700H</span>	<span style="color: #666666; font-style: italic;">;add this code to an upper address</span>
&nbsp;
&nbsp;
DECIDE<span style="color: #339933;">:</span>
    BTFSS	NEXT_BIT		<span style="color: #666666; font-style: italic;">;is new input bit allowed?</span>
    RETURN					<span style="color: #666666; font-style: italic;">;no</span>
                            <span style="color: #666666; font-style: italic;">;yes</span>
    MOVF	UNIT<span style="color: #339933;">,</span> w			
    SUBLW	<span style="color: #0000ff;">.5</span> 			
    BTFSC	STATUS<span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">C</span>		<span style="color: #666666; font-style: italic;">;is  the new bit is 0</span>
    <span style="color: #000000; font-weight: bold;">GOTO</span>	BIT_CLEAR		<span style="color: #666666; font-style: italic;">;yes</span>
&nbsp;
    MOVF	UNIT<span style="color: #339933;">,</span> w
    SUBLW	<span style="color: #0000ff;">.8</span>				
    BTFSC	STATUS<span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">C</span>		<span style="color: #666666; font-style: italic;">;is the new bit is 1?</span>
    <span style="color: #000000; font-weight: bold;">GOTO</span>	BIT_SET			<span style="color: #666666; font-style: italic;">;yes</span>
&nbsp;
    <span style="color: #00007f; font-weight: bold;">BSF</span>		FIRST_LOAD		<span style="color: #666666; font-style: italic;">;keep dcf  input LOW</span>
    RETURN
BIT_SET<span style="color: #339933;">:</span>				
    <span style="color: #00007f; font-weight: bold;">BSF</span>		BIT_VALUE		<span style="color: #666666; font-style: italic;">;ne bit is 1</span>
&nbsp;
    BCF	B0					<span style="color: #666666; font-style: italic;">;these are just controls to display 1</span>
    BCF	C0				
    <span style="color: #00007f; font-weight: bold;">BSF</span>	A0				
    <span style="color: #00007f; font-weight: bold;">BSF</span>	D0				
    <span style="color: #00007f; font-weight: bold;">BSF</span>	E0				
    <span style="color: #00007f; font-weight: bold;">BSF</span>	F0				
    <span style="color: #00007f; font-weight: bold;">BSF</span>	G0				
&nbsp;
    <span style="color: #000000; font-weight: bold;">GOTO</span>	END_DECIDE
BIT_CLEAR<span style="color: #339933;">:</span>					<span style="color: #666666; font-style: italic;">;new bit is 0</span>
&nbsp;
    <span style="color: #00007f; font-weight: bold;">BSF</span>	G0					<span style="color: #666666; font-style: italic;">;these are  just controls to display 0</span>
    BCF	A0				       
    BCF	B0				                                                               
    BCF	C0				                                                               
    BCF	D0				                                                               
    BCF	E0				                                                               
    BCF	F0				                                                               
&nbsp;
    BCF		BIT_VALUE
END_DECIDE<span style="color: #339933;">:</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	ROTATE			<span style="color: #666666; font-style: italic;">;rotate the newest byte</span>
    BCF		NEXT_BIT		<span style="color: #666666; font-style: italic;">;prohibid the input</span>
    CLRF	UNIT			<span style="color: #666666; font-style: italic;">;bew cycle</span>
    CLRF	HIGH_STATE		
    clrf	dcf_no
    INCF	SECOND			<span style="color: #666666; font-style: italic;">;a new second has been passed</span>
    RETURN
&nbsp;
ROTATE<span style="color: #339933;">:</span>
    BCF		STATUS<span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">C</span>		<span style="color: #666666; font-style: italic;">;rotate bytes</span>
    BTFSC	BIT_VALUE
    <span style="color: #00007f; font-weight: bold;">BSF</span>		STATUS<span style="color: #339933;">,</span><span style="color: #000000; font-weight: bold;">C</span>
    RLF		BYTE0
    RLF		BYTE1
    RLF		BYTE2
    RLF		BYTE3
    RLF		BYTE4
    RLF		BYTE5
    RLF		BYTE6
    RLF		BYTE7
    RETURN
&nbsp;
PARITY_CALC<span style="color: #339933;">:</span>				<span style="color: #666666; font-style: italic;">;parity calculation inside the bytes</span>
    MOVLW	<span style="color: #0000ff;">.0</span>
    MOVWF	PARITY
    MOVLW	<span style="color: #0000ff;">.9</span>
    MOVWF	CONTOR
<span style="color: #000000; font-weight: bold;">REPEAT</span><span style="color: #339933;">:</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    SUBWF	CONTOR<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	STATUS<span style="color: #339933;">,</span> Z
    <span style="color: #000000; font-weight: bold;">GOTO</span>	PARITY_END
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSC	<span style="color: #000000; font-weight: bold;">BYTE</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">7</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	PARITY
    RLF		<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #000000; font-weight: bold;">GOTO</span>	<span style="color: #000000; font-weight: bold;">REPEAT</span>
PARITY_END<span style="color: #339933;">:</span>
    RETURN
&nbsp;
SEPARATE<span style="color: #339933;">:</span>					<span style="color: #666666; font-style: italic;">;separate the received bytes into registries</span>
    incf	try				<span style="color: #666666; font-style: italic;">;try 5 times, not handled </span>
    MOVF	SECOND<span style="color: #339933;">,</span>W
    SUBLW	<span style="color: #0000ff;">.59</span>
    BTFSS	STATUS<span style="color: #339933;">,</span>Z
    <span style="color: #00007f; font-weight: bold;">BSF</span>		FIRST_LOAD
    <span style="color: #00007f; font-weight: bold;">BSF</span>		NEW_FRAME
    BTFSC	FIRST_LOAD
    RETURN
&nbsp;
<span style="color: #666666; font-style: italic;">;YEAR**************************</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">7</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">6</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">6</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE0<span style="color: #339933;">,</span><span style="color: #0000ff;">7</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		YEAR<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;MONTH************************</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MONTH<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MONTH<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MONTH<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MONTH<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MONTH<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;DAYS*********************** Don't need this </span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">6</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAYS<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE1<span style="color: #339933;">,</span><span style="color: #0000ff;">7</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAYS<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAYS<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;DAY************************</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE2<span style="color: #339933;">,</span><span style="color: #0000ff;">6</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		DAY<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;HOUR*********************	</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		HOURS<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;MINUTES*******************</span>
    BTFSC	BYTE3<span style="color: #339933;">,</span><span style="color: #0000ff;">7</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">6</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">4</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">5</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		MINUTES<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
<span style="color: #666666; font-style: italic;">;CONTROL**************************</span>
    BTFSC	BYTE4<span style="color: #339933;">,</span><span style="color: #0000ff;">7</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		CONTROL<span style="color: #339933;">,</span><span style="color: #0000ff;">3</span>
    BTFSC	BYTE5<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		CONTROL<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    BTFSC	BYTE5<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		CONTROL<span style="color: #339933;">,</span><span style="color: #0000ff;">1</span>
    BTFSC	BYTE5<span style="color: #339933;">,</span><span style="color: #0000ff;">2</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		CONTROL<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">;*************parity checker******************</span>
<span style="color: #666666; font-style: italic;">;START BIT  S = BYTE4,6******************</span>
    BTFSS	BYTE4<span style="color: #339933;">,</span> <span style="color: #0000ff;">6</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		PARITY_ERR		<span style="color: #666666; font-style: italic;">;NO START BIT</span>
<span style="color: #666666; font-style: italic;">;PARITY VERIFYING</span>
<span style="color: #666666; font-style: italic;">;PARITY P1 = BYTE3,6*******************</span>
    MOVF	MINUTES<span style="color: #339933;">,</span>W			
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSS	BYTE3<span style="color: #339933;">,</span> <span style="color: #0000ff;">6</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	PARITY		<span style="color: #666666; font-style: italic;">;P1 PARITY  </span>
&nbsp;
    BTFSS	PARITY<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		PARITY_ERR
<span style="color: #666666; font-style: italic;">;PARITY P2 = BYTE2,7*************************</span>
    MOVF	HOURS<span style="color: #339933;">,</span>W
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSS	BYTE2<span style="color: #339933;">,</span> <span style="color: #0000ff;">7</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	PARITY 			<span style="color: #666666; font-style: italic;">;P2 PARITY  </span>
    BTFSS	PARITY<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		PARITY_ERR
<span style="color: #666666; font-style: italic;">;PARITY P3 = BYTE0,0***********************</span>
    MOVF	YEAR<span style="color: #339933;">,</span> W
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
&nbsp;
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSC	PARITY<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	MONTH<span style="color: #339933;">,</span>W
&nbsp;
    <span style="color: #666666; font-style: italic;">;MOVF	MONTH, W</span>
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
&nbsp;
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSC	PARITY<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	DAYS<span style="color: #339933;">,</span>W
&nbsp;
    <span style="color: #666666; font-style: italic;">;MOVF	DAYS, W</span>
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
&nbsp;
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSC	PARITY<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span>
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	DAY<span style="color: #339933;">,</span>W
&nbsp;
    <span style="color: #666666; font-style: italic;">;MOVF	DAY, W</span>
    MOVWF	<span style="color: #000000; font-weight: bold;">BYTE</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	PARITY_CALC
&nbsp;
    MOVLW	<span style="color: #0000ff;">.0</span>
    BTFSS	BYTE0<span style="color: #339933;">,</span> <span style="color: #0000ff;">0</span> 
    MOVLW	<span style="color: #0000ff;">.1</span>
    XORWF	PARITY 			<span style="color: #666666; font-style: italic;">;P3 PARITY  </span>
    BTFSS	PARITY<span style="color: #339933;">,</span><span style="color: #0000ff;">0</span>
    <span style="color: #00007f; font-weight: bold;">BSF</span>		PARITY_ERR
&nbsp;
    <span style="color: #666666; font-style: italic;">;BTFSC	PARITY_ERR		;parity error, not handled </span>
    <span style="color: #666666; font-style: italic;">;no parity error then display</span>
    <span style="color: #666666; font-style: italic;">;CALL	DISPLAY		</span>
    <span style="color: #666666; font-style: italic;">;incf	hours				;this is used when there are difference between our time zone and DCF time zone</span>
&nbsp;
    movf	hours<span style="color: #339933;">,</span>w
    sublw	<span style="color: #0000ff;">09h</span>
    btfss	status<span style="color: #339933;">,</span>z
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme1
    movlw	<span style="color: #0000ff;">10h</span>
    movwf	hours
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme
&nbsp;
displayforme1<span style="color: #339933;">:</span>
    movf	hours<span style="color: #339933;">,</span>w
    sublw	<span style="color: #0000ff;">19h</span>
    btfss	status<span style="color: #339933;">,</span>z
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme2
    movlw	<span style="color: #0000ff;">20h</span>
    movwf	hours
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme
&nbsp;
displayforme2<span style="color: #339933;">:</span>
    movf	hours<span style="color: #339933;">,</span>w
    sublw	<span style="color: #0000ff;">23h</span>
    btfss	status<span style="color: #339933;">,</span>z
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme3
    movlw	<span style="color: #0000ff;">0h</span>
    movwf	hours
    <span style="color: #000000; font-weight: bold;">goto</span>	displayforme
&nbsp;
displayforme3<span style="color: #339933;">:</span>
    incf	hours
&nbsp;
displayforme<span style="color: #339933;">:</span>
    MOVF	hours<span style="color: #339933;">,</span>W			<span style="color: #666666; font-style: italic;">;display hours just for testing</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	DISP32
    MOVF	MINUTES<span style="color: #339933;">,</span>W		<span style="color: #666666; font-style: italic;">;display minutes</span>
    <span style="color: #00007f; font-weight: bold;">CALL</span>	DISP10		
    <span style="color: #00007f; font-weight: bold;">CALL</span> 	DISPLAY
&nbsp;
&nbsp;
    btfsc	szink_end1
    <span style="color: #00007f; font-weight: bold;">BSF</span>		SZINK_END2	
    <span style="color: #00007f; font-weight: bold;">BSF</span>		SZINK_END1
&nbsp;
    btfsc	parity_err
    <span style="color: #000000; font-weight: bold;">goto</span>	separate_end
&nbsp;
&nbsp;
&nbsp;
    btfss	szink_end2
    <span style="color: #000000; font-weight: bold;">goto</span>	first_time
&nbsp;
    MOVF	MINUTES<span style="color: #339933;">,</span> W
    MOVWF	MINUTES2
    MOVF	HOURS<span style="color: #339933;">,</span> W
    MOVWF	HOURS2
&nbsp;
    MOVF	MINUTES1<span style="color: #339933;">,</span> W
    SUBWF	MINUTES2
    BTFSS	STATUS<span style="color: #339933;">,</span> Z
    <span style="color: #000000; font-weight: bold;">GOTO</span>	read_err		<span style="color: #666666; font-style: italic;">;Read error ... continue using PIC  date and time</span>
&nbsp;
    MOVF	HOURS1<span style="color: #339933;">,</span> W
    SUBWF	HOURS2
    BTFSS	STATUS<span style="color: #339933;">,</span> Z
    <span style="color: #000000; font-weight: bold;">GOTO</span>	read_err		<span style="color: #666666; font-style: italic;">;Read error ... continue using PIC  date and time</span>
&nbsp;
&nbsp;
    <span style="color: #000000; font-weight: bold;">goto</span>	separate_end
&nbsp;
first_time<span style="color: #339933;">:</span>
    MOVF	MINUTES<span style="color: #339933;">,</span> W
    MOVWF	MINUTES1
    INCF	MINUTES1
    MOVF	HOURS<span style="color: #339933;">,</span> W
    MOVWF	HOURS1
    clrwdt
    <span style="color: #000000; font-weight: bold;">goto</span>	separate_end
&nbsp;
read_err<span style="color: #339933;">:</span>
    <span style="color: #00007f; font-weight: bold;">bsf</span>		parity_err
separate_end<span style="color: #339933;">:</span>
    RETURN</pre></td></tr></table></div>

<p><a href="http://www.vanyi.net/projects/dcf-77-radio-clock-with-pic-microcontroller/">DCF-77 radio clock with PIC microcontroller</a> is a post from: <a href="http://www.vanyi.net" title="István Ványi">István Ványi</a></p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://www.vanyi.net/projects/dcf-77-radio-clock-with-pic-microcontroller/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

