Ñ÷åòíîå óñòðîéñòâî âèäåîèìïóëüñîâ íà ÏËÈÑ

Íà ýòîì ýòàïå âñå ôëàãè íåîáõîäèìûå äëÿ ôîðìèðîâàíèÿ èçîáðàæåíèÿ çàãðóæåíû. Ñàìî  ôîðìèðîâàíèå èçîáðàæåíèÿ íà÷èíàåòñÿ ñ ñîñòîÿíèÿ dz0.  ñîñòîÿíèÿõ ..z0 çíà÷åíèÿ ñ ñ÷åò÷èêà ïîñòóïàþò è ïåðåêîäèðóþòñÿ ñîãëàñíî òàáë3.2.10 äàëüøå çàïèñûâàþòñÿ â  ðåãèñòð äàííûõ.  ñîñòîÿíèè ..z1 èäåò ñ÷èòûâàíèå èç ðåãèñòðà äàííûõ â ðåãèñòð çíàêîãåíåðàòîðà CGRAM è âûâîäèòñÿ íà ýêðàí. È âñå ýòî íà÷èíàÿ ñ ds öèêëè÷åñêè, ïîâòîðÿåòñÿ ÷åðåç çàäàííûé èíòåðâàë âðåìåíè. Ñìîòðè ðèñóíîê 3.2.3.1

 äàííîì îïèñàíèè ïðîãðàììû ÿ îïóñêàë ñîñòîÿíèÿ, â êîòîðûõ âûäåðæèâàëèñü íåîáõîäèìûå ïàóçû äëÿ îáùåíèÿ ÏËÈÑ è ìèêðîêîíòðîëëåðà èíäèêàòîðà. Òàêæå íóæíî çàìåòèòü, ÷òî äàííûå â ýòîò ìîäóëü ïðîãðàììû ïîñòóïàþò â ïàðàëëåëüíîì âèäå, íàçâàíèå ýòîé øèíû Line[].

Ðèñ 3.2.3.1 Áëîê-ñõåìà óñòðîéñòâà óïðàâëåíèÿ èíäèêàòîðîì

3.2.4 Äåëèòåëü òàêòîâîé ÷àñòîòû äëÿ ðàáîòû èíäèêàòîðà(divFreq)

Îáûêíîâåííûé äâîè÷íûé ñ÷åò÷èê âûñòóïàåò â ðîëè äåëèòåëÿ òàêòîâîé ÷àñòîòû äëÿ ðàáîòû èíäèêàòîðà ò.ê. èíäèêàòîðó íóæíà ÷àñòîòà ìåíüøå ÷åì, âûäàåò êâàðöåâûé ãåíåðàòîð. Êîýôôèöèåíò äåëåíèÿ îïðåäåëÿåòñÿ ðàñ÷åòíûì è îïûòíûì ïóòåì (ïîäáîðîì).

 

3.2.5 Îáùàÿ ñòðóêòóðà ïðîãðàììû

Ñòðóêòóðó ïðîåêòà ìîæíî óâèäåòü, èñïîëüçóÿ ñïåöèàëüíîå ïðèëîæåíèå Max+plus/ Hierarhy Display. Îòêðîåòñÿ îêíî, â êîòîðîì ïðîåêò ïðåäñòàâëåí â âèäå äåðåâà, óêàçàíû èìÿ êàæäîãî ôàéëà è èñõîäíûé òèï, à òàêæå èêîíêà. Äâîéíîé ùåë÷îê ïî èêîíêå îòêðûâàåò èñõîäíûé ôàéë íèæíåãî óðîâíÿ ñ ïîìîùüþ ñîîòâåòñòâóþùåãî ðåäàêòîðà. Ñëåâà îò êàæäîé âåòâè óêàçàíû ôàéëû ñ òàêèìè æå èìåíàìè, íî äðóãèìè ðàñøèðåíèÿìè, êîòîðûå ñîçäàíû â ïðîöåññå îáðàáîòêè èñõîäíîãî ôàéëà.


Ðèñ 3.2.5.1 Äåðåâî ïðîåêòà êîíôèãóðàöèè

Òåêñòû êàæäîãî ìîäóëÿ ìîæíî óâèäåòü â Ïðèëîæåíèè 3.

Çàêëþ÷åíèå


Ïîäâîäÿ èòîã âûøå ïðîâåäåííîé ðàáîòû, õî÷ó çàìåòèòü, ÷òî ïîëó÷èâøååñÿ óñòðîéñòâî îêàçàëîñü âïîëíå óäà÷íûì. Ðàáîòà óñòðîéñòâà áûëà ïðîâåðåíà ñ ïîìîùüþ ãåíåðàòîðà ïðÿìîóãîëüíûõ èìïóëüñîâ. Ïëàòà óñòðîéñòâà ïîêàçàíà íà ðèñóíêå 4.1.

Äàííîå óñòðîéñòâî ìîæíî ïîäêëþ÷àòü íå òîëüêî ê ÑÑ ñ ÔÝÓ, íî è ê äðóãèì äåòåêòîðàì ðàäèîàêòèâíûõ èçëó÷åíèé, íàïðèìåð ñ÷åò÷èê Ãåéãåðà. Äëÿ ýòîãî íåîáõîäèìî ïåðåñ÷èòàòü äåëèòåëü, êîòîðûé óñòàíîâëåí äî êîìïàðàòîðà.

Íà ýòàïå ðàçðàáîòêè â ñõåìó ñ÷åòíîãî óñòðîéñòâà  áûëà äîáàâëåíà ÀÖÏ Analog Device, AD7715ñ ïîñëåäîâàòåëüíûì èíòåðôåéñîì SPI. ÀÖÏ ïëàíèðóåòñÿ èñïîëüçîâàòü äëÿ èçìåðåíèÿ íàïðÿæåíèÿ ïîäàâàåìîãî íà äåòåêòîð.

Ëèòåðàòóðà


1.                 Êîðñóíñêèé Ì.È.,«Àòîìíîå ÿäðî» - Ì.: Ãîñòåõèçäàò, 1957.

2.                 Áðîäèí Â.Á., Êàëèíèí À.Â., «Ñèñòåìû íà ìèêðîêîíòðîëåðàõ è ÁÈÑ ïðîãðàììèðóåìîé ëîãèêè» - Ì.: Ýêîíîì, 2002.

3.                 Âèöûí Í. «Ñîâðåìåííûå òåíäåíöèè ðàçâèòèÿ ñèñòåì àâòîìàòèçèðîâàííîãî ïðîåêòèðîâàíèÿ â îáëàñòè ýëåêòðîíèêè» // Chip News, ¹ 1, 1997. Ñ. 12–15.

4.                 Ãóáàíîâ Ä. À., Ñòåøåíêî Â. Á., Õðàïîâ Â. Þ., Øèïóëèí Ñ. Í. «Ïåðñïåêòèâû ðåàëèçàöèè àëãîðèòìîâ öèôðîâîé ôèëüòðàöèè íà îñíîâå ÏËÈÑ ôèðìû ALTERA» // Chip News, ¹ 9–10, 1997, ñ. 26–33.

5.                 Òåõ. Äîê. «One Technology Way, P.O. Box9106, Norwood, MA 02062-9106, U.S.A.», #"_Toc137749732">Ïðèëîæåíèå 1 (Ïðèíöèïèàëüíàÿ ñõåìà óñòðîéñòâà)

Ïðèëîæåíèå 2 (Ñïèñîê ïîðòîâ ââîäà âûâîäà ÏËÈÑ epm 3256a)

 

Ïðèëîæåíèå 3 (Òåêñò ïðîãðàììû)


--Àíòèäðåáåçãîâàÿ  ñèñòåìà

INCLUDE "LPM_COUNTER";

CONSTANT DELAY = 6;

SUBDESIGN ANTIBOUNCE

(

         IN               : INPUT;

         CLK           : INPUT;

         OUT           : OUTPUT;

)

VARIABLE

         CT              : LPM_COUNTER WITH(LPM_WIDTH=DELAY);

         TRIG : DFF;

BEGIN

         TRIG.D = !IN;

         CT.ACLR = !(!IN $ TRIG.Q);

         CT.CLOCK = CLK;

         TRIG.CLK=CT.Q[DELAY-1];

         OUT = !TRIG.Q;

END;

--Äåñÿòè÷íîäâîè÷íûé ñ÷åò÷èê

CONSTANT DIGITS = 6;

INCLUDE "LPM_COUNTER";

SUBDESIGN COUNTER10

(

         -- âõîäíûå äàííûå

         CLOCK                                                     : INPUT;

         ACLR                                                        : INPUT;

         COUNT_ENA                                           : INPUT;

         -- âûõîä

         Q[DIGITS-1..0][3..0]               : OUTPUT;

)


VARIABLE

         RESET[DIGITS-1..0]                       : NODE;

         COUNTER[DIGITS-1..0]                 : LPM_COUNTER WITH (LPM_WIDTH=4);

BEGIN

         IF COUNTER[0].Q[3..0]==B"1010" THEN RESET[0]=vcc; ELSE RESET[0]=gnd; END IF;

         IF COUNTER[1].Q[3..0]==B"1010" THEN RESET[1]=vcc; ELSE RESET[1]=gnd; END IF;

         IF COUNTER[2].Q[3..0]==B"1010" THEN RESET[2]=vcc; ELSE RESET[2]=gnd; END IF;

         IF COUNTER[3].Q[3..0]==B"1010" THEN RESET[3]=vcc; ELSE RESET[3]=gnd; END IF;

         IF COUNTER[4].Q[3..0]==B"1010" THEN RESET[4]=vcc; ELSE RESET[4]=gnd; END IF;

         IF COUNTER[5].Q[3..0]==B"1010" THEN RESET[5]=vcc; ELSE RESET[5]=gnd; END IF;

         COUNTER[0].clock=clock;

         COUNTER[DIGITS-1..1].clock=RESET[DIGITS-2..0];

         Q[DIGITS-1..0][3..0]=COUNTER[DIGITS-1..0].Q[3..0];

         COUNTER[DIGITS-1..0].aclr=RESET[DIGITS-1..0]#aclr;

         COUNTER[0].cnt_en=COUNT_ENA;

END;

--Óñòðîéñòâî óïðàâëåíèÿ èíäèêàòîðîì

CONSTANT DATA_WITH = 8;


INCLUDE "LPM_COUNTER";

SUBDESIGN WH1602

(

         CLK                                        : INPUT;

         IN[5..0][DATA_WITH-1..0]             : INPUT;

         D[DATA_WITH-1..0]                       : BIDIR;

         E                                            : OUTPUT;

         RW                                         : OUTPUT;

         RS                                          : OUTPUT;

)

VARIABLE

         clk_a                                       : NODE;

         Ddff[DATA_WITH-1..0]                            : dff;

         Din[DATA_WITH-1..0]                    : dff;

         Dmsh[DATA_WITH-1..0]                : NODE;

         _RW                                       : NODE;

         _RS                                        : NODE;

         Eena                                        : NODE;

         Pause                                      : LPM_COUNTER WITH (LPM_WIDTH=9);

         STR                                       : LPM_COUNTER WITH (LPM_WIDTH=4);

         LINE[DATA_WITH-1..0]                 : NODE;

         ST                                          : MACHINE

                   WITH STATES ( z0, p1, r1, p2, r2, p3, r3, p4,

                                                        r4, b4, c4, r5, b5, c5, r6, b6, c6, r7, b7, c7, r8, b8, c8,

                                                        ds, bs, cs, dz0, bz0, cz0, dz1, bz1, cz1 );

         Dtri[DATA_WITH-1..0]                    : TRI;

         OE                                          : NODE;

         INC[3..0]                                 : NODE;

         INBUF[5..0][DATA_WITH-1..0]                : DFF;

         READ                                              : DFF;


BEGIN

         clk_a = dff(!clk_a, clk, vcc, vcc);

         Pause.clock = clk_a;

         -- outputs

         Ddff[DATA_WITH-1..0].d = Dmsh[DATA_WITH-1..0];

         Ddff[DATA_WITH-1..0].clk = !clk_a;

         Dtri[DATA_WITH-1..0].in = Ddff[DATA_WITH-1..0].q;

         D[DATA_WITH-1..0] = Dtri[DATA_WITH-1..0].out;

         Din[DATA_WITH-1..0].d = D[DATA_WITH-1..0];

         Din[DATA_WITH-1..0].clk = !dff (clk_a & Eena , clk, vcc, vcc);

         Dtri[DATA_WITH-1..0].oe = dff (OE, !clk_a, vcc, vcc);


         RW = dff (_RW, !clk_a, vcc, vcc);

         RS = dff (_RS, !clk_a, vcc, vcc);

         E = dff (clk_a & Eena , clk, vcc, vcc);

         -- machine

         ST.clk = clk_a;

         CASE ST IS

                   WHEN z0 =>

                            Dmsh[DATA_WITH-1..0] = H"FF"; OE = vcc;

                            Eena = gnd;          _RW = gnd;                   _RS = gnd;           Pause.aclr = vcc;

                            ST = p1;

                   --  çàãðóçêà èíäèêàòîðà ïîñëå âêëþ÷åíèÿ ïèòàíèÿ

                   --  ïàóçà ïåðåä âêëþ÷åíèåì 21ìñ

                   WHEN p1 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = gnd; _RW = gnd;         _RS = gnd; Pause.aclr = gnd;

                            IF Pause.q[]==200 THEN ST = r1; ELSE ST = p1; END IF;

                   -- INITIAL SETTING ONCE 00111000

                   WHEN r1 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = p2;

                   -- ïàóçà 7 ìñ > 4.1 ìñ

                   WHEN p2 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = gnd; _RW = gnd;         _RS = gnd; Pause.aclr = gnd;

                            IF Pause.q[]==100 THEN ST = r2; ELSE ST = p2; END IF;

                   -- INITIAL SETTING TWICE 00111000

                   WHEN r2 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = p3;

                   -- ïàóçà 0.7 ìñ > 0.1 ìñ

                   WHEN p3 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = gnd; _RW = gnd;         _RS = gnd; Pause.aclr = gnd;

                            IF Pause.q[]==10 THEN ST = r3; ELSE ST = p3; END IF;

                   -- INITIAL SETTING THIRD 00111000

                   WHEN r3 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = p4;

                   -- ïàóçà 0.7 ìñ > 0.1 ìñ

                   WHEN p4 =>

                            Dmsh[DATA_WITH-1..0] = H"38";  OE = vcc;

                            Eena = gnd; _RW = gnd;         _RS = gnd; Pause.aclr = gnd;

                            IF Pause.q[]==10 THEN ST = r4; ELSE ST = p4; END IF;

                   -- Function Set 0011NF**

                   WHEN r4 =>

                            Dmsh[DATA_WITH-1..0] = H"3C"; OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = b4;

                   WHEN b4 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = c4;

                   WHEN c4 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = r5; ELSE ST = b4; END IF;

                   -- Display ON/OFF = 00001DCB, Display ON,Cursor&Blink OFF

                   WHEN r5 =>

                            Dmsh[DATA_WITH-1..0] = H"0C"; OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = b5;

                   WHEN b5 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = c5;

                   WHEN c5 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = r6; ELSE ST = b5; END IF;

                   -- Entry Mode Set = 000001IS, Increment & Shift OFF

                   WHEN r6 =>

                            Dmsh[DATA_WITH-1..0] = H"06";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = b6;

                   WHEN b6 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = c6;

                   WHEN c6 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = r7; ELSE ST = b6; END IF;

                   -- Return Home

                   WHEN r7 =>

                            Dmsh[DATA_WITH-1..0] = H"02";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = b7;

                   WHEN b7 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = c7;

                   WHEN c7 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = r8; ELSE ST = b7; END IF;

                   -- Clear Display

                   WHEN r8 =>

                            Dmsh[DATA_WITH-1..0] = H"01";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = b8;

                   WHEN b8 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = c8;

                   WHEN c8 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = ds; ELSE ST = b8; END IF;

                   --ôîðìèðîâàíèå èçîáðàæåíèÿ

                   WHEN ds =>

                            Dmsh[DATA_WITH-1..0] = LINE[]; OE = vcc;

                            Eena = vcc; RW = gnd;  _RS = vcc; Pause.aclr = vcc;

                            ST = bs;

                   WHEN bs =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = cs;

                   WHEN cs =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF STR.q==H"F" THEN ST=dz0;

                            ELSIF Din[DATA_WITH-1].q==0 THEN ST = ds; ELSE ST = bs; END IF;

                   --ïåðåìåùåíèå â íà÷àëî

                   WHEN dz0 =>

                            Dmsh[DATA_WITH-1..0] = H"40";  OE = vcc;

                            Eena = gnd; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = bz0;

                   WHEN bz0 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = cz0;

                   WHEN cz0 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = dz1; ELSE ST = bz0; END IF;


                   WHEN dz1 =>

                            Dmsh[DATA_WITH-1..0] = H"80";  OE = vcc;

                            Eena = vcc; _RW = gnd;         _RS = gnd; Pause.aclr = vcc;

                            ST = bz1;

                   WHEN bz1 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = vcc; _RW = vcc;         _RS = gnd; Pause.aclr = vcc;

                            ST = cz1;

                   WHEN cz1 =>

                            Dmsh[DATA_WITH-1..0] = H"00";  OE = gnd;

                            Eena = gnd; _RW = vcc;         _RS = gnd; Pause.aclr = gnd;

                            IF Din[DATA_WITH-1].q==0 THEN ST = ds; ELSE ST = bz1; END IF;

         END CASE;



         INBUF[5..0][DATA_WITH-1..0].clk=READ.q;

         INBUF[5..0][DATA_WITH-1..0].d=IN[5..0][DATA_WITH-1..0];

         IF ST==dz1 THEN READ.d=vcc; ELSE READ.d=gnd; END IF;

         READ.clk=clk;

         IF ST==ds THEN STR.clock=vcc; ELSE STR.clock=gnd; END IF;

         STR.aclr=READ.q;

         CASE STR.q[] IS

                   WHEN H"1" => LINE[]=INBUF[5][DATA_WITH-1..0];

                   WHEN H"2" => LINE[]=INBUF[4][DATA_WITH-1..0];

                   WHEN H"3" => LINE[]=INBUF[3][DATA_WITH-1..0];

                   WHEN H"4" => LINE[]=INBUF[2][DATA_WITH-1..0];

                   WHEN H"5" => LINE[]=INBUF[1][DATA_WITH-1..0];

                   WHEN H"6" => LINE[]=INBUF[0][DATA_WITH-1..0];

                   WHEN H"7" => LINE[]=H"20";

                   WHEN H"8" => LINE[]=H"43";

                   WHEN H"9" => LINE[]=H"44";

                   WHEN H"A" => LINE[]=H"45";

                   WHEN H"B" => LINE[]=H"46";

                   WHEN H"C" => LINE[]=H"47";

                   WHEN H"D" => LINE[]=H"48";

                   WHEN H"E" => LINE[]=H"49";

                   WHEN H"F" => LINE[]=H"4A";

         END CASE;

END;



* ïðîìèëü (ìèëëèîííàÿ ÷àñòü, 10-6). Ñòàáèëüíîñòü ÷àñòîòû
Äîïóñòèìîå îòêëîíåíèå ÷àñòîòû îò íîìèíàëüíîãî çíà÷åíèÿ. Èçìåðÿåòñÿ â ïðîöåíòàõ èëè â "ppm"


Ñòðàíèöû: 1, 2, 3, 4, 5, 6, 7, 8



Ðåêëàìà
 ñîöñåòÿõ
ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü ðåôåðàòû ñêà÷àòü