亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? an ldmicro tutorial.mht

?? 用PIC單片機與AVR單片機製作PLC控制的階梯圖程序。
?? MHT
?? 第 1 頁 / 共 5 頁
字號:
microcontrollers, but=20
            that you have never used LDmicro. If you don't know very =
much about=20
            ladder logic or PLCs, then <A=20
            href=3D"http://www.plcs.net/contents.shtml">the plcs.net =
tutorial</A>=20
            might be helpful to you.</P>
            <P>Our device will have one pushbutton, and one LED. At =
startup, the=20
            LED will be off. When you press the pushbutton once, the LED =
will=20
            turn steady on. The second time you press the pushbutton, =
the LED=20
            will start blinking. The third time that you press the =
button, the=20
            LED will turn off again. On subsequent presses, the cycle =
will=20
            repeat.</P>
            <H3>Microcontroller Selection and Schematic</H3>
            <P>We will be using a PIC16F876, which is easily available =
from=20
            Digikey or other online distributors. It comes in a number =
of=20
            different packages; I chose a DIP.</P>
            <P>This is our schematic:</P>
            <P><IMG style=3D"PADDING-LEFT: 10px"=20
            src=3D"http://cq.cx/pics/ldtut-schematic.png"></P>
            <P>The microcontroller (IC1) is part number =
PIC16F876-20I/SP-ND at=20
            <A href=3D"http://www.digikey.com/">Digikey.</A> Almost any=20
            three-terminal resonator (U1) will do; you might try a =
535-9356-ND=20
            or an X909-ND.</P>
            <P>The only thing that might confuse you is that the =
pushbutton goes=20
            to Vdd, and there is a pull-down. You might be more used to =
seeing a=20
            pushbutton to ground with a pull-up. For TTL, this mattered. =
For=20
            modern CMOS it does not, and I find this =91active HIGH=92 =
arrangement=20
            less confusing than the traditional =91active LOW=92 =
circuit.</P>
            <P>Also, I chose to use a ceramic resonator with internal=20
            capacitors, U1, instead of a crystal and two ~20&nbsp;pF =
caps. A=20
            crystal would work just as well and it would be more =
accurate, but=20
            it would be a little bit more expensive, and you would need =
more=20
            parts.</P>
            <P>You could build this circuit in many different ways. I =
built it=20
            on a solderless breadboard, and it ended up looking like =
this:</P>
            <P><IMG=20
            style=3D"BORDER-RIGHT: black 1px solid; BORDER-TOP: black =
1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid" =

            src=3D"http://cq.cx/pics/ldtut-breadboard.jpg"></P>
            <P>(The resistor values pictured are not quite the same as =
the=20
            schematic; none of them are critical.)</P>
            <H3>Ladder Diagram for the Program</H3>
            <P>First, we are going to need an oscillator to generate the =

            =91blinking=92 signal for the LED. There is a standard way =
to do this in=20
            ladder logic:</P><PRE style=3D"FONT-SIZE: 13px; =
PADDING-BOTTOM: 10px; PADDING-TOP: 10px; font-face: Lucida Console">     =
    ||      Rosc            Tosc_on         Tosc_off           Rosc      =
 ||
       1 ||-------] [--------[TON 250.0 ms]---[TOF 250.0 =
ms]---------(/)-------||
</PRE>
            <P>This will flash at 1/((250+250)&nbsp;ms), or 2&nbsp;Hz, =
or twice=20
            per second. The duty cycle will be&nbsp;50%=97250&nbsp;ms =
on, then=20
            250&nbsp;ms off. This circuit can make any kind of =
oscillator, with=20
            whatever period or duty cycle you require, so it is a good =
one to=20
            remember.</P>
            <P>Also notice that we have chosen to use an internal relay =
(=91Rfoo=92)=20
            instead of one attached to an I/O pin (=91Yfoo=92 or =
=91Xfoo=92). This makes=20
            sense, because there is no particular reason to bring that =
signal=20
            out to a pin. LDmicro will automatically assign memory for =
the=20
            internal relay.</P>
            <P>Our program will have three states: off, steady on, and =
blinking.=20
            The program should change its state on each rising edge of =
the=20
            signal from the pushbutton. This is a good application for a =

            circular counter. We will say that =91state 0=92 is =
=91off,=92 =91state 1=92 is=20
            =91steady on,=92 and =91state 2=92 is =91blinking.=92 The =
counter counts 0, 1,=20
            2, 0, 1, 2, ..., so if we just let the rung-in condition of =
the=20
            counter be the pushbutton input, then everything will work =
like we=20
            want:</P><PRE style=3D"FONT-SIZE: 13px; PADDING-BOTTOM: =
10px; PADDING-TOP: 10px; font-face: Lucida Console">         ||     =
Xbutton                                            Cstate      ||
       2 ||-------] [---------------------------------------------{CTC =
0:2}----||
</PRE>
            <P>Now the only thing left is to use the program state to =
set the=20
            state of the LED. We can do it like this:</P><PRE =
style=3D"FONT-SIZE: 13px; PADDING-BOTTOM: 10px; PADDING-TOP: 10px; =
font-face: Lucida Console">         ||   [Cstate =3D=3D]                 =
                          Yled       ||
       3 ||---[ 1       ]-------------------+------------------------( =
)-------||
         ||                                 |                            =
      ||
         ||   [Cstate =3D=3D]         Rosc      |                        =
          ||
         ||---[ 2       ]----------] [------+                            =
      ||
</PRE>
            <P>It should be easy to convince yourself that this does =
what we=20
            want. If the program is in state 1, then the =91Cstate =
=3D=3D 1=92=20
            instruction energizes =91Yled=92, as desired. In state 2, =
the =91Cstate =3D=3D=20
            2=92 instruction energizes =91Yled=92, but only when =
=91Rosc=92 is also true.=20
            Since =91Rosc=92 is oscillating, that means that the LED =
will blink, as=20
            desired. Finally, in state 0, neither of the equals =
instructions=20
            will be true, so there is no way that =91Yled=92 could ever =
turn on.</P>
            <H3>Entering the Ladder Diagram</H3>
            <P>Now that we have our circuit, we can draw it in LDmicro. =
When you=20
            start LDmicro, you will see a single empty rung:</P>
            <P><IMG src=3D"http://cq.cx/pics/ldtut-empty-rung.png"></P>
            <P>We want to enter the first rung from the listing above. =
We will=20
            start with the coil, so choose Instruction -&gt; Insert =
Coil. This=20
            will create a coil named =91Ynew.=92 This is what we want, =
except that=20
            the name is wrong, and it should be negated. Double-click =
the coil;=20
            this will bring up a dialog where we can fill that in:</P>
            <P><IMG src=3D"http://cq.cx/pics/ldtut-osc-coil.png"></P>
            <P>Now we can insert the rest of that rung in the same way. =
Click on=20
            the left edge of the coil, so that the cursor is vertical, =
and to=20
            the left of the coil. Now choose Instruction -&gt; Insert =
TON=20
            (Delayed Turn On). Once again double-click the timer to =
rename it=20
            and set the period. Add the TOF timer and the contacts in =
the same=20
            way.</P>
            <P>Now we want to enter the second rung, so choose Edit =
-&gt; Insert=20
            Rung After. Then click on the second rung to move the cursor =

            there:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-second-rung-empty.png"></P>
            <P>The second rung is easy: just fill in the two =
instructions in the=20
            right order, by placing the cursor where you want to insert =
and then=20
            choosing Instruction -&gt; Insert .... Remember to assign a =
name=20
            (=91Xbutton=92) to the contacts, and to set the name and =
upper limit of=20
            the counter. Then choose Edit -&gt; Insert Rung After again. =
Your=20
            program should look like this:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-third-rung-empty.png"></P>
            <P>The third rung will be a bit trickier, because it has =
parallel=20
            branches. That means that you have to think about the order =
in which=20
            you insert the instructions. First, insert the coil, and =
rename=20
            it:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-third-rung-coil.png"></P>
            <P>Now insert the first equals instruction to the left of =
the coil,=20
            as usual, and fill in the correct variable name and value. =
After you=20
            do that, add the parallel branch. You can do this by =
clicking on the=20
            bottom edge of the equals instruction; the cursor will be =
horizontal=20
            and below that equals instruction:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-third-rung-one-cond.png"></P>
            <P>Now choose Instruction -&gt; Insert EQU (Compare for =
Equals).=20
            Since your cursor is below the first equals instruction, the =
new=20
            equals instruction will be inserted below that instruction, =
in=20
            parallel with it. Rename it as usual. To finish the rung, =
you must=20
            insert the =91Rosc=92 contacts to the right of the second =
equals=20
            instruction. To do this, click on the right edge of the =
second=20
            equals instruction:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-third-rung-both-cond.png"></P>
            <P>At this point you can choose Instruction -&gt; Insert =
Coil; the=20
            coil will be inserted in series with the second equals =
instruction,=20
            as you require. Rename it and you are done:</P>
            <P><IMG =
src=3D"http://cq.cx/pics/ldtut-third-rung-complete.png"></P>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
kk眼镜猥琐国模调教系列一区二区 | 99vv1com这只有精品| 色综合中文字幕| 亚洲欧洲无码一区二区三区| 天天av天天翘天天综合网 | 亚洲一区国产视频| 国产伦精品一区二区三区视频青涩| 9人人澡人人爽人人精品| 91精品国产品国语在线不卡| 国产精品高潮呻吟久久| 久久不见久久见免费视频7| 在线观看亚洲成人| 亚洲丝袜制服诱惑| 大陆成人av片| 欧美成人a∨高清免费观看| 亚洲一区二区美女| 91在线观看美女| 国产欧美视频在线观看| 久久精品国产久精国产| 欧美日韩一区视频| 亚洲永久免费av| 成人中文字幕在线| 日本色综合中文字幕| 色综合久久综合网97色综合 | 麻豆免费精品视频| 欧美日本在线播放| 亚洲资源中文字幕| 色婷婷国产精品久久包臀| 国产精品久久久久天堂| 国产成人免费视频精品含羞草妖精| 欧美精品视频www在线观看| 亚洲一区二区欧美日韩| 欧美亚洲愉拍一区二区| 亚洲欧美视频一区| 色偷偷成人一区二区三区91| 亚洲女同ⅹxx女同tv| 91网站在线播放| 一区免费观看视频| 91论坛在线播放| 一区二区三区丝袜| 精品视频999| 亚洲电影一区二区三区| 欧美日韩激情在线| 日本不卡中文字幕| 欧美精品一区二区三区高清aⅴ | 久久电影网电视剧免费观看| 日韩一区二区在线观看视频| 日韩精品1区2区3区| 日韩一区二区三| 国产精品一线二线三线| 国产精品日韩成人| 色婷婷av一区二区三区软件| 亚洲一区二区欧美| 精品久久久久久最新网址| 国产专区欧美精品| 国产精品久久国产精麻豆99网站| 91视频在线观看| 日韩不卡一区二区三区| 久久新电视剧免费观看| 91麻豆精东视频| 青青草国产成人99久久| 中文字幕乱码日本亚洲一区二区 | 久久国产视频网| 国产日韩欧美亚洲| 在线影院国内精品| 韩国欧美一区二区| 亚洲欧美自拍偷拍| 日韩欧美中文字幕一区| av在线不卡免费看| 三级不卡在线观看| 国产精品私人影院| 欧美精品一二三区| 99re热这里只有精品视频| 视频一区视频二区中文字幕| 国产欧美日韩不卡| 欧美日韩高清影院| k8久久久一区二区三区| 蜜乳av一区二区| 日韩美女啊v在线免费观看| 日韩高清不卡在线| 欧美国产精品v| 日韩一区二区影院| 色婷婷狠狠综合| 国产99久久久久久免费看农村| 亚洲欧美韩国综合色| 精品国产成人系列| 欧美日韩一区视频| heyzo一本久久综合| 精品一区二区三区久久久| 一区二区免费在线| 国产精品欧美一区二区三区| 欧美二区三区的天堂| 成人性生交大片免费看在线播放 | 337p日本欧洲亚洲大胆精品| 欧美亚洲一区三区| 成人精品视频一区| 国产一区二区三区香蕉| 奇米影视一区二区三区小说| 一区二区欧美在线观看| 日韩美女精品在线| 国产三级精品三级在线专区| 日韩视频免费观看高清完整版| 欧美性受xxxx黑人xyx| av在线综合网| 粉嫩在线一区二区三区视频| 韩国女主播成人在线观看| 日韩—二三区免费观看av| 亚洲成av人片一区二区梦乃| 亚洲男同性视频| 亚洲黄色小视频| 一区二区三区在线视频免费| 国产精品妹子av| 国产精品久久综合| 国产精品麻豆网站| 国产精品久久夜| 国产精品三级在线观看| 国产精品二区一区二区aⅴ污介绍| 久久久久国产精品免费免费搜索| 欧美r级电影在线观看| 日韩免费观看高清完整版| 日韩三级电影网址| 日韩免费看的电影| 成人app网站| 欧美性大战久久久久久久蜜臀 | 亚洲成人福利片| 国内偷窥港台综合视频在线播放| 亚洲国产综合91精品麻豆| 亚洲va欧美va人人爽| 蜜桃精品在线观看| 韩日精品视频一区| 成人av免费在线观看| 精品久久久久久综合日本欧美| 8x福利精品第一导航| 欧美在线你懂的| 久久午夜电影网| 中文字幕欧美国产| 亚洲视频网在线直播| 精品美女一区二区| 国产不卡一区视频| 日一区二区三区| 激情偷乱视频一区二区三区| 国产东北露脸精品视频| av成人老司机| 国产精品免费久久久久| 一区二区在线电影| 日韩和的一区二区| 国产专区欧美精品| 91片黄在线观看| 欧美一区二区观看视频| 欧美激情自拍偷拍| 亚洲电影你懂得| 极品美女销魂一区二区三区| 99久久99久久综合| 欧美一级久久久| 亚洲欧美综合网| 蜜臀久久99精品久久久久宅男| 成人天堂资源www在线| 欧美日本高清视频在线观看| 久久精品亚洲国产奇米99| 一区二区高清免费观看影视大全 | 欧美日韩色一区| 久久精品视频一区二区| 亚洲综合激情小说| 成人丝袜高跟foot| 日韩写真欧美这视频| 亚洲三级在线免费观看| 久久狠狠亚洲综合| 欧美亚洲另类激情小说| 欧美国产精品久久| 麻豆精品一区二区av白丝在线| 色猫猫国产区一区二在线视频| 精品久久久久久综合日本欧美| 夜夜嗨av一区二区三区中文字幕| 国产精品一区二区三区网站| 欧美日韩一卡二卡| 中文字幕一区二区三区精华液| 久久99热这里只有精品| 欧美视频三区在线播放| 中文一区二区在线观看| 久久99久久99| 91精品国产综合久久久久久| 亚洲精品国产视频| 成人涩涩免费视频| 久久噜噜亚洲综合| 麻豆91精品91久久久的内涵| 欧美日韩综合在线| 国产精品国产三级国产aⅴ入口| 欧美日本韩国一区二区三区视频| 久久久久久久精| 亚洲二区在线观看| 91老师片黄在线观看| 亚洲国产激情av| 国产一区二区美女| 久久一日本道色综合| 免费成人深夜小野草| 欧美日韩国产a| 日韩av一级电影| 精品裸体舞一区二区三区| 日韩电影免费在线看| 91精品一区二区三区久久久久久|