Attached is a frequency counter program to be used with the 9100 w/programmer option (display) -003 module & 20 pin dip clip. It reads & displays the 19 pins & frequency counts. The frequency counter is fairly stable (+/- 2) for a stable signal. This program may also be called by other programs but as of yet does not support variable passing. Any comments, questions, suggestions, enhancements appreciated! Kev program freq1 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! freq1 ! ! Frequency counter for use with 20 pin dip clip in "A" location of ! parallel I/O module. ! ! This program will clearn the operator screen & print two options over ! function keys F1 & F2. TEST <F1> will prompt the operator to clip the ! 20 pin dip clip over the test chip & press the ready button. Once the ! ready button on the dip module is pressed a pin by pin read out of 1-19 is ! is printed to the PROGRAMMERS monitor screen. ! ! Quit <F2>. ! ! June 6, 2002 ! ! mowerman@erols.com ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! declare string ch numeric in_chan = 0 global numeric done global string clrln = "\1B[2K" global string ln1 = "\1B[1;1f" global string ln3 = "\1B[3;1f" global string autolnoff = "\1B[20l" global string cursoroff = "\1B[?25l" global string clr = "\1B[2J" global string rev = "\1B[0m\1B[7m" global string norm = "\1B[0m" end declare function freqread ch2 = open device "/term2", as "output" print "Clip IC with 20 pin clip on MOD A" dev = clip ("TEST",20) reset device dev threshold device dev, level "ttl" counter device dev, mode "freq" arm device dev readout device dev count1=count device dev, pin 1 count2=count device dev, pin 2 count3=count device dev, pin 3 count4=count device dev, pin 4 count5=count device dev, pin 5 count6=count device dev, pin 6 count7=count device dev, pin 7 count8=count device dev, pin 8 count9=count device dev, pin 9 count10=count device dev, pin 10 count11=count device dev, pin 11 count12=count device dev, pin 12 count13=count device dev, pin 13 count14=count device dev, pin 14 count15=count device dev, pin 15 count16=count device dev, pin 16 count17=count device dev, pin 17 count18=count device dev, pin 18 count19=count device dev, pin 19 print on ch2, "" print on ch2, "" print on ch2, "Freq pin 1 of Chip =",count1 print on ch2, "Freq pin 2 of Chip =",count2 print on ch2, "Freq pin 3 of Chip =",count3 print on ch2, "Freq pin 4 of Chip =",count4 print on ch2, "Freq pin 5 of Chip =",count5 print on ch2, "Freq pin 6 of Chip =",count6 print on ch2, "Freq pin 7 of Chip =",count7 print on ch2, "Freq pin 8 of Chip =",count8 print on ch2, "Freq pin 9 of Chip =",count9 print on ch2, "Freq pin 10 of Chip =",count10 print on ch2, "Freq pin 11 of Chip =",count11 print on ch2, "Freq pin 12 of Chip =",count12 print on ch2, "Freq pin 13 of Chip =",count13 print on ch2, "Freq pin 14 of Chip =",count14 print on ch2, "Freq pin 15 of Chip =",count15 print on ch2, "Freq pin 16 of Chip =",count16 print on ch2, "Freq pin 17 of Chip =",count17 print on ch2, "Freq pin 18 of Chip =",count18 print on ch2, "Freq pin 19 of Chip =",count19 print on ch2, "" print on ch2, "" close channel ch2 ! Close Monitor display wait time 2000 ! 4 second pause end freqread init_display = clr+autolnoff+cursoroff+ln1 in_chan = open device"/term1",as"input",mode "unbuffered" loop while poll(in_chan,"input")=1 input ch end loop done=0 loop until done > 0 print init_display print ln1+"20 pin Frequency test" print ln3+clrln+rev+" TEST "+norm+" "+rev+" QUIT "+norm input on in_chan, ch if ch = "\81" then freqread() else if ch ="\82" then done = 2 endif end loop end program
How to subscribe or unsubscribe from the list:
To do either you send email to "MajorDomo@flippers.com" and in the body you state either "Subscribe techtoolslist" or "Unsubscribe techtoolslist", note that the Subject is "" (Blank)...