'**************************************************************** '* Name : UNTITLED.BAS * '* Author : [select VIEW...EDITOR OPTIONS] * '* Notice : Copyright (c) 2005 [select VIEW...EDITOR OPTIONS] * '* : All Rights Reserved * '* Date : 12/1/2005 * '* Version : 1.0 * '* Notes : * '* : * '**************************************************************** DEFINE OSC 4 SER var portc.0 'serial data SRCLK var portc.1 'shift register clock RCK var portc.2 'storiage register clock aka latch LED var portb.0 counter Var byte lights var byte output ser output srclk output rck output led for counter = 0 to 5 high led pause 100 low led pause 100 next main: low srclk 'bring clock low to synchronize for counter = 0 to 7 'increment counter from 0 to 7 lights = dcd counter 'turns bit number "counter" of "lights" to 1 and all the rest 0 low rck 'bring latch low shiftout ser, srclk, 1, [lights] 'send out lights high rck 'bring latch high again pause 300 next toggle led goto main