danke werde ich dann heute abend gleich ausprobieren und hier posten
leider sprengt das fusing den chip speicher
aber es geht auch so mogeln is ja inn
kann man testprogramme hier auch in eine codesamlung reinlegenCode:'///////////////////////////////////////////////////////// '/// Bascom ISP Programmer TEST /// '/// PORT B toggel LED SERVOan portb3 LCD ' ADC1 porta1=signal 0-5V FUNKTION TYNY26 feb 2007 '///////////////////////////////////////////////////////// $regfile = "AT26def.dat" ' used device $crystal = 8000000 $hwstack = 32 ' default use 32 $swstack = 10 'default use 10 for $framesize = 40 'default use 40 for Ddra = &B11110000 Config Adc = Free , Prescaler = 64 , Reference = Off Start Adc Config Pinb.3 = Output Config Pinb.4 = Output Config Pinb.5 = Output Config Servos = 1 , Servo1 = Portb.3 , Reload = 10 Config Lcdpin = Pin , Db4 = Porta.4 , Db5 = Porta.5 , Db6 = Porta.6 , Db7 = Porta.7 , E = Portb.5 , Rs = Portb.4 Config Lcd = 20 * 2 Const Teiler = 0.00488 Const Teiler2 = 1.636 Enable Interrupts Dim Wertad As Word Dim Tmp As Word Dim Wertse As Byte Dim Volt As Single Wertad = 500 Do Waitms 10 Wertad = Getadc(1) 'If Wertad > 500 Then Set Porta.5 'If Wertad < 500 Then Set Porta.6 If Wertad > 1022 Then Wertad = 1022 If Wertad < 10 Then Wertad = 10 Tmp = Wertad / 4 If Tmp > 150 Then Tmp = 150 If Tmp < 40 Then Tmp = 40 Wertse = Low(tmp) Servo(1) = Wertse Volt = Wertad * Teiler Cls Lcd "Volt :" ; Volt Locate 1 , 11 : Lcd " V " '; Fusing(volt , "# . ##") Lowerline Wertse = Wertse - 40 Volt = Wertse * Teiler2 Lcd "Grad :" ; Volt Locate 2 , 13 : Lcd " " '; Fusing(volt , "# . ##") Waitms 100 Loop 'kein speicherplatz ehr auf dem chip fusing nicht möglich





Zitieren

Lesezeichen