' ********************************************************************** ' ** Program name: PPOCN351.BAS - Version : 1.1 - 05 June 2000 ** ' ** Compiler : BASCOM 8051 DEMO, (IDE V.2.0.0.0, LIB V.2.0) ** ' ** Board : K51-AVR ** ' ** Firm: grifo(r) ITALIAN TECHNOLOGY ** ' ** Via Dell' Artigiano 8/6 40016 San Giorgio di Piano (BO) ** ' ** Tel.+39 051 892 052 Fax +39 051 893 661 ** ' ** http://www.grifo.com http://www.grifo.it ** ' ** sales@grifo.it tech@grifo.it grifo@grifo.it ** ' ** ** ' ** Written by: Adriano Pedrielli ** ' ********************************************************************** ' ' This program turns on in sequence the 16 TTL lines available on ' connector CN3. ' ' Before compiling select in menu Option/Compiler/Misc/ : ' Byte End 5F. ' '*********************************************************************** ' '********************* Compiler Directives ***************************** ' $regfile = "8052.DAT" ' 8xc51 registers list $romstart = &H0 ' code start address $crystal = 11059200 ' micro clock frequence ' '*********************** Variables declaration ************************* ' Dim Pout As Byte ' value for output lines Dim X As Byte ' genearal purpose variable Dim Valore As Byte , Valore1 As Byte ' value of counts ' '*************************** Main program ****************************** ' Main: ' delay for signals settling Waitms 1 Do Valore = 1 ' starting value Valore1 = 128 For X = 1 To 7 ' initialize cycle Pout = Not Valore ' complement the value P0 = Pout Pout = Not Valore1 ' complement the value P2 = Pout Valore = Valore * 2 ' left shift of bits Valore1 = Valore1 / 2 ' right shift of bits Waitms 255 ' delay Next X For X = 1 To 7 ' initialize cycle Pout = Not Valore ' complement the value P0 = Pout Pout = Not Valore1 ' complement the value P2 = Pout Valore = Valore / 2 ' right shift of bits Valore1 = Valore1 * 2 ' left shift of bits Waitms 255 ' ritardo Next X Loop End ' '**************************** Program end ******************************** '