Hallo,
ja das hat er ja geschrieben, dass es in CCBasic geschrieben wurde.
Ich hab das mal kurz umgeschrieben, so dass es kompiliert werden kann.
Code:OPTION CC2.0 '-----------------------------------------------------------------------------' '*******************************************************' '* WINDT SYSTEMS *' '* DCF SIGNAL MONITOR v1.2 for CCIUM2.01 with CCIAB2.0 *' '* H.J. WINDT *' '* 2005 *' '*******************************************************' '-----------------------------------------------------------------------------' 'Use this software to monitor and or aim your DCF antenna.' 'The DCF signal is shown as a bar graph on the LCD.' 'A beep will sound when the DCF signal is good.' 'Feel free to use and share this software!' '-----------------------------------------------------------------------------' '*************** INS and OUTS **************' 'define signal freq define lcd_light_off port[16] '*******************************************' '**************** VARIABLES ****************' define loop byte[1] define bar_graph_length byte[2] define signal_monitor word[2] '*******************************************' '**************** CONSTANTS ****************' '*******************************************' '****************** SETUP ******************' 'print"#ON_LCD#"; : print"#INIT#"; : print"#CLR#"; : print" DCF SIGNAL "; : lcd_light_off = 0 LCD.init LCD.print " DCF SIGNAL " signal_monitor = 0 '*******************************************' '***************** PROGRAM *****************' #start if freq = 1 then goto signal_received signal_monitor = signal_monitor - 2 if signal_monitor < 0 then signal_monitor = 0 #display_bar_graph bar_graph_length = signal_monitor / 100 lcd.pos 2,1 for loop = 0 to bar_graph_length if loop > 0 then put &hff next lcd.print " "; if bar_graph_length = 16 then beep 4,2,4 goto start #signal_received signal_monitor = signal_monitor + 1 if signal_monitor > 1600 then signal_monitor = 1600 goto display_bar_graph







Zitieren

Lesezeichen