INFO - FAQ - CC2-Forum - CCPro-Forum |
Maybe this can help you. Greetings, H.J. Windt '**************** VARIABLES ****************' define configuration byte[1] define servo_mode bit[1] define counter1 bit[2] define counter2 bit[3] define pullup_resistors_port1 bit[4] define pullup_resistors_port2 bit[5] define dcf77_synchronization bit[6] define i2c_communication_error bit[7] define start_key bit[8] '*******************************************' '****************** SETUP ******************' gosub set_configuration '*******************************************' '***************** PROGRAM *****************' #start end '*******************************************' '*************** SUBROUTINES ***************' #set_configuration print"#ON_CONFIG#"; 'setting up the configuration for the CCIUM2.01' get configuration servo_mode = 0 'change to 1 changes the 2 PWM-DAC ports (da[1], da[2]) into servo mode' counter1 = 0 'change to 1 changes the FREQ1 port into a HIGH to LOW active counter, max frequency is about 32767Hz' counter2 = 0 'change to 1 changes the FREQ2 port into a HIGH to LOW active counter, max frequency is about 32767Hz' pullup_resistors_port1 = 0 'change to 1 activates the internal pullup resistors for byteport[1]' pullup_resistors_port2 = 0 'change to 1 activates the internal pullup resistors for byteport[2]' i2c_communication_error = 0 '= 1 if an I2C communication error has occurred' start_key = 1 '= 0 if the start key was pressed' put configuration print"#OFF#"; return '*******************************************' |
Antwort schreiben |