⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lf.html

📁 PKE(被动无钥门禁系统
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by AsmDoc -->
<TITLE>
HTMLWriter
</TITLE>

<META NAME="keywords" CONTENT="HTMLWriter class">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="LF";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">


<!-- ======== START OF CLASS DATA ======== -->
<H2>
Module LF</H2>
<HR>

<P>
	This module implements functions for Low Frequency communication.	The input signal should have an header (see below) followed by several data bytes.
<P>

<P>
<B> Header timing:</B><p style="position:relative;" id="LF_time_0_p"><IMG SRC="LF_time_0.jpg" NAME="LF_time_0"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_time_0_res()",100);var LF_time_0_init = document.LF_time_0.width ;function LF_time_0_res(){try{if(LF_time_0_init > parent.classFrame.innerWidth-45)	document.LF_time_0.width=parent.classFrame.innerWidth-45;else{	document.LF_time_0.width=LF_time_0_init;	document.getElementById("LF_time_0_p").style.left= ((parent.classFrame.innerWidth-document.LF_time_0.width-45) / 2) + "px";	document.getElementById("LF_time_0_p").style.width= document.LF_time_0.width	+ "px";}}catch(Exception){}}</SCRIPT><B> A coded '1':</B><p style="position:relative;" id="LF_time_1_p"><IMG SRC="LF_time_1.jpg" NAME="LF_time_1"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_time_1_res()",100);var LF_time_1_init = document.LF_time_1.width ;function LF_time_1_res(){try{if(LF_time_1_init > parent.classFrame.innerWidth-45)	document.LF_time_1.width=parent.classFrame.innerWidth-45;else{	document.LF_time_1.width=LF_time_1_init;	document.getElementById("LF_time_1_p").style.left= ((parent.classFrame.innerWidth-document.LF_time_1.width-45) / 2) + "px";	document.getElementById("LF_time_1_p").style.width= document.LF_time_1.width	+ "px";}}catch(Exception){}}</SCRIPT><B> A coded '0':</B><p style="position:relative;" id="LF_time_2_p"><IMG SRC="LF_time_2.jpg" NAME="LF_time_2"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_time_2_res()",100);var LF_time_2_init = document.LF_time_2.width ;function LF_time_2_res(){try{if(LF_time_2_init > parent.classFrame.innerWidth-45)	document.LF_time_2.width=parent.classFrame.innerWidth-45;else{	document.LF_time_2.width=LF_time_2_init;	document.getElementById("LF_time_2_p").style.left= ((parent.classFrame.innerWidth-document.LF_time_2.width-45) / 2) + "px";	document.getElementById("LF_time_2_p").style.width= document.LF_time_2.width	+ "px";}}catch(Exception){}}</SCRIPT><HR>

<P>
<!-- =========== CONSTANT SUMMARY =========== -->

<A NAME="constant_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constant Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.4500</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.T_HDR_INIT">LF.T_HDR_INIT</A></B></CODE>

<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.600</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.T_HDR_GAP">LF.T_HDR_GAP</A></B></CODE>

<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.2250</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.T_HDR_HIGH">LF.T_HDR_HIGH</A></B></CODE>

<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.2250</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.T_HDR_LOW">LF.T_HDR_LOW</A></B></CODE>

<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.8</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.TransmitBufferSize">LF.TransmitBufferSize</A></B></CODE>

<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;.250</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.T_STEP">LF.T_STEP</A></B></CODE>

<BR>
</TD>
</TR>
</TABLE>
<P>
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Function Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.Init">LF.Init</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function initializes the LF module.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.SendBuffer">LF.SendBuffer</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function sends the TransmitBuffer out.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.SendHeader">LF.SendHeader</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function sends the LF Header.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.TransmitByte">LF.TransmitByte</A></B>(&nbsp;w&nbsp;)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function transmitts one byte of data over the LF interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.TransmitStop">LF.TransmitStop</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function transmitts a stop bit over the LF interface.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.FieldOn">LF.FieldOn</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function turns the LF-Field on.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.FieldOff">LF.FieldOff</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function turns the LF-Field off.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;STATUS,Z&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.Buffer.addByte">LF.Buffer.addByte</A></B>(&nbsp;w&nbsp;)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function adds one byte of data to the end of the transmit buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;STATUS,Z&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.Buffer.Write">LF.Buffer.Write</A></B>(&nbsp;w&nbsp;&nbsp;FSR1&nbsp;)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function overwrites the current transmit buffer with the data of another buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;STATUS,Z&nbsp;</CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.Buffer.Append">LF.Buffer.Append</A></B>(&nbsp;w&nbsp;&nbsp;FSR1&nbsp;)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function appends the data of a given buffer at the end of the current transmit buffer.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE></CODE></FONT></TD>
<TD><CODE><B><A HREF="LF.html#LF.Buffer.Clear">LF.Buffer.Clear</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	This function clears the current transmit buffer.</TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ CONSTANT DETAIL =========== -->

<A NAME="constant_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constant Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="LF.T_HDR_INIT"></A><H3>
LF.T_HDR_INIT</H3>
<DL>
<DD>	This constant defines the length of the first high time in micro seconds on the LF-Line.	It is used to give the receiver some time to adjust internal circuits	to the signal strength of the following LF-transmission.<BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .4500
<P>
<DL>
</DL>
</DL>
<B> Header timing:</B><p style="position:relative;" id="LF_T_HDR_INIT_time_0_p"><IMG SRC="LF.T_HDR_INIT_time_0.jpg" NAME="LF_T_HDR_INIT_time_0"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_T_HDR_INIT_time_0_res()",100);var LF_T_HDR_INIT_time_0_init = document.LF_T_HDR_INIT_time_0.width ;function LF_T_HDR_INIT_time_0_res(){try{if(LF_T_HDR_INIT_time_0_init > parent.classFrame.innerWidth-45)	document.LF_T_HDR_INIT_time_0.width=parent.classFrame.innerWidth-45;else{	document.LF_T_HDR_INIT_time_0.width=LF_T_HDR_INIT_time_0_init;	document.getElementById("LF_T_HDR_INIT_time_0_p").style.left= ((parent.classFrame.innerWidth-document.LF_T_HDR_INIT_time_0.width-45) / 2) + "px";	document.getElementById("LF_T_HDR_INIT_time_0_p").style.width= document.LF_T_HDR_INIT_time_0.width	+ "px";}}catch(Exception){}}</SCRIPT><HR>

<A NAME="LF.T_HDR_GAP"></A><H3>
LF.T_HDR_GAP</H3>
<DL>
<DD>	This constant defines the length of the gap between the initial high time and the start of the Wake-up-Filter in micro seconds.	It is used to detect the end of the initial high time and the beginning of the Wake-up-Filter.<BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .600
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="LF.T_HDR_HIGH"></A><H3>
LF.T_HDR_HIGH</H3>
<DL>
<DD>	This constant defines the length of Wake-up-Filter high time in micro seconds.	It is used to filter other LF-sources or noise and keep the microcontroller in sleep mode.<BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .2250
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="LF.T_HDR_LOW"></A><H3>
LF.T_HDR_LOW</H3>
<DL>
<DD>	This constant defines the length of Wake-up-Filter low time in micro seconds.	It is used to filter other LF-sources or noise and keep the microcontroller in sleep mode.<BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .2250
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="LF.TransmitBufferSize"></A><H3>
LF.TransmitBufferSize</H3>
<DL>
<DD>	This constant defines the length of the output buffer.	It has to match the longest possible transmission length.<BR><BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .8
<P>
<DL>
</DL>
</DL>
<HR>

<A NAME="LF.T_STEP"></A><H3>
LF.T_STEP</H3>
<DL>
<DD>	This constant adjusts the bitrate of the transmission.<BR>	You may override the default value by either defining the same constant	in your Project.inc file or by changing the default value in the module's	source.<BR><BR>Default value = .250
<P>
<DL>
</DL>
</DL>
<B> A coded '1':</B><p style="position:relative;" id="LF_T_STEP_time_0_p"><IMG SRC="LF.T_STEP_time_0.jpg" NAME="LF_T_STEP_time_0"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_T_STEP_time_0_res()",100);var LF_T_STEP_time_0_init = document.LF_T_STEP_time_0.width ;function LF_T_STEP_time_0_res(){try{if(LF_T_STEP_time_0_init > parent.classFrame.innerWidth-45)	document.LF_T_STEP_time_0.width=parent.classFrame.innerWidth-45;else{	document.LF_T_STEP_time_0.width=LF_T_STEP_time_0_init;	document.getElementById("LF_T_STEP_time_0_p").style.left= ((parent.classFrame.innerWidth-document.LF_T_STEP_time_0.width-45) / 2) + "px";	document.getElementById("LF_T_STEP_time_0_p").style.width= document.LF_T_STEP_time_0.width	+ "px";}}catch(Exception){}}</SCRIPT><B> A coded '0':</B><p style="position:relative;" id="LF_T_STEP_time_1_p"><IMG SRC="LF.T_STEP_time_1.jpg" NAME="LF_T_STEP_time_1"  BORDER="0"></p><SCRIPT type="text/javascript">window.setInterval("LF_T_STEP_time_1_res()",100);var LF_T_STEP_time_1_init = document.LF_T_STEP_time_1.width ;function LF_T_STEP_time_1_res(){try{if(LF_T_STEP_time_1_init > parent.classFrame.innerWidth-45)	document.LF_T_STEP_time_1.width=parent.classFrame.innerWidth-45;else{	document.LF_T_STEP_time_1.width=LF_T_STEP_time_1_init;	document.getElementById("LF_T_STEP_time_1_p").style.left= ((parent.classFrame.innerWidth-document.LF_T_STEP_time_1.width-45) / 2) + "px";	document.getElementById("LF_T_STEP_time_1_p").style.width= document.LF_T_STEP_time_1.width	+ "px";}}catch(Exception){}}</SCRIPT><HR>
<P>
<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="LF.Init"></A><H3>
LF.Init</H3>
<PRE>
&nbsp;<B>LF.Init</B>()</PRE>
<P>
<DL>
<DD>	This function initializes the LF module.
<P>
<P>
<DD><DL>
<DT><B>Used SFRs:</B><DD> T2CON PR2 CCPR1L CCP1CON</DD></DL>
</DD>
<DD><DL>
<DT><B>Stacklevel:</B><DD>1</DD></DL>
</DD>
<DD><DL>
<DT><B>Status:</B><DD> Tested</DD></DL>
</DD>
</DL>
<HR>
<A NAME="LF.SendBuffer"></A><H3>
LF.SendBuffer</H3>
<PRE>
&nbsp;<B>LF.SendBuffer</B>()</PRE>
<P>
<DL>
<DD>	This function sends the TransmitBuffer out.
<P>
<P>
<DD><DL>
<DT><B>Used SFRs:</B><DD>T0CON INTCON CCP1CON  FSR2   E                         </DD></DL>
</DD>
<DD><DL>
<DT><B>Calls subroutines:</B><PRE>	LF.SendHeader		Delay.Mikros			Delay.Start8			Delay.Start16

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -