www.elektronik.si Seznam forumov www.elektronik.si
Forum o elektrotehniki in računalništvu
 
 PomočPomoč  IščiIšči  Seznam članovSeznam članov  SkupineSkupine  StatisticsStatistika  AlbumAlbum  DatotekeFilemanager DokumentacijaDocDB LinksPovezave   Registriraj seRegistriraj se 
  PravilaPravila  LinksBolha  PriponkePriponke  KoledarKoledar  ZapiskiZapiski Tvoj profilTvoj profil Prijava za pregled zasebnih sporočilPrijava za pregled zasebnih sporočil PrijavaPrijava 

Nostalgija PLD

 
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> Nostalgija - samogradnje
Poglej prejšnjo temo :: Poglej naslednjo temo  
Avtor Sporočilo
Silvo
Moderator
Moderator



Pridružen-a: Pon 24 Feb 2003 17:09
Prispevkov: 14551
Aktiv.: 65.53
Kraj: Koroška-okolica Dravograda

PrispevekObjavljeno: Tor Sep 18, 2018 9:19 pm    Naslov sporočila:  Nostalgija PLD Odgovori s citatom

Na eni zavrženi industrijski kartici sem našal večjo količino GAL-ov (GAL22V10) Glede na to, da so bili na podnožju sem jih spulil dol. Danes sem jih malo potestiral. Najprej sem poskusil, če ga z mojim programatorjem sploh lahko programiram. (G540 se z njim dobro razume) Prav tako ga podpira WinCupl (atmelov software za programiranje PLD-jev)

Naredil sem dve stvari. V prvem galu je astabil in binarni števec. V drugem pa bcd dekoder na 7seg. displej.

Koda:

Name     Astabil ;
PartNo   00 ;
Date     18.09.2018 ;
Revision 01 ;
Designer Silvo ;
Company  - ;
Assembly None ;
Location  ;
Device   G22V10 ;


PIN 1 = clk;
PIN [2,3,4,5] = [A0..3];
PIN 6 = tst ;
PIN 7 = !Vklop ;
PIN 8 = !Reset;
PIN 9 = Naprej;
PIN [10..11] = [Itmp0..1];
PIN [14..17] = [D0..3];
PIN [18..20] = [Qtmp0..2];


FIELD vhodi = [A0..3];
FIELD segmenti = [A,B,C,D,E,F,G];
FIELD HexStev = [D0..3];

Qtmp0 = !Itmp0;
Qtmp1 = !Qtmp0; 





Sequenced HexStev {                       /* free running counter */
present 'h'0    if Naprej next 'h'1;
      if Reset next 'h'0;
present 'h'1    if Naprej next 'h'2;
      if Reset next 'h'0;
present 'h'2    if Naprej next 'h'3;
      if Reset next 'h'0;
present 'h'3    if Naprej next 'h'4;
      if Reset next 'h'0;
present 'h'4    if Naprej next 'h'5;
      if Reset next 'h'0;
present 'h'5    if Naprej next 'h'6;
      if Reset next 'h'0;
present 'h'6    if Naprej next 'h'7;
      if Reset next 'h'0;
present 'h'7    if Naprej next 'h'8;
      if Reset next 'h'0;
present 'h'8    if Naprej next 'h'9;
      if Reset next 'h'0;
present 'h'9    if Naprej next 'h'A;
      if Reset next 'h'0;
present 'h'A    if Naprej next 'h'B;
      if Reset next 'h'0;
present 'h'B    if Naprej next 'h'C;
      if Reset next 'h'0;
present 'h'C    if Naprej next 'h'D;
      if Reset next 'h'0;
present 'h'D    if Naprej next 'h'E;
      if Reset next 'h'0;
present 'h'E    if Naprej next 'h'F;
      if Reset next 'h'0;
present 'h'F    if Naprej next 'h'0;
      if Reset next 'h'0;

}

HexStev.ar='h'0;
HexStev.sp='h'0;



Koda:

Name     LedDisply ;
PartNo   00 ;
Date     18.09.2018 ;
Revision 01 ;
Designer Silvo ;
Company  - ;
Assembly None ;
Location  ;
Device   G22V10 ;


PIN 1 = clk;
PIN [2,3,4,5] = [A0..3];
PIN 6 = tst ;
PIN 7 = !Vklop ;
PIN 8 = !Reset;
PIN 9 = Naprej;
PIN [14..20] = [A,B,C,D,E,F,G];
PIN [21..23] = [D0..2];

FIELD vhodi = [A0..3];
FIELD segmenti = [A,B,C,D,E,F,G];
FIELD HexStev = [D0..2];







             /*ABCDEFG*/
TABLE vhodi => segmenti.d {
   'b'0000 => 'b'1111110;
   'b'0001 => 'b'0110000;
   'b'0010 => 'b'1101101;
   'b'0011 => 'b'1111001;
   'b'0100 => 'b'0110011;
   'b'0101 => 'b'1011011;
   'b'0110 => 'b'1011111;
   'b'0111 => 'b'1110000;
   'b'1000 => 'b'1111111;
   'b'1001 => 'b'1111011;
   'b'1010 => 'b'1110111;
   'b'1011 => 'b'0011111;
   'b'1100 => 'b'0001101;
   'b'1101 => 'b'0111101;
   'b'1110 => 'b'1001111;
   'b'1111 => 'b'1000111;
}


segmenti.ar='h'0;
segmenti.sp='h'0;
segmetni.ot= Vklop;


Sequenced HexStev {                       /* free running counter */
present 'h'0    if Naprej next 'h'1;
      if Reset next 'h'0;
present 'h'1    if Naprej next 'h'2;
      if Reset next 'h'0;
present 'h'2    if Naprej next 'h'3;
      if Reset next 'h'0;
present 'h'3    if Naprej next 'h'4;
      if Reset next 'h'0;
present 'h'4    if Naprej next 'h'5;
      if Reset next 'h'0;
present 'h'5    if Naprej next 'h'6;
      if Reset next 'h'0;
present 'h'6    if Naprej next 'h'7;
      if Reset next 'h'0;
present 'h'7    if Naprej next 'h'0;
      if Reset next 'h'0;
}

HexStev.ar='h'0;
HexStev.sp='h'0;





Bolj slab posnetek

_________________
lp
Silvo
Nazaj na vrh
Odsoten Poglej uporabnikov profil Pošlji zasebno sporočilo
Pokaži sporočila:   
Objavi novo temo   Odgovori na to temo   Printer-friendly version    www.elektronik.si Seznam forumov -> Nostalgija - samogradnje Časovni pas GMT + 2 uri, srednjeevropski - poletni čas
Stran 1 od 1

 
Pojdi na:  
Ne, ne moreš dodajati novih tem v tem forumu
Ne, ne moreš odgovarjati na teme v tem forumu
Ne, ne moreš urejati svojih prispevkov v tem forumu
Ne, ne moreš brisati svojih prispevkov v tem forumu
Ne ne moreš glasovati v anketi v tem forumu
Ne, ne moreš pripeti datotek v tem forumu
Ne, ne moreš povleči datotek v tem forumu

Uptime: 47 dni


Powered by phpBB © 2001, 2005 phpBB Group