LDmicro0.2 MICRO=Microchip PIC16F1827 18-Pin PDIP, SOIC CYCLE=500 us at Timer1, YPlcCycleDuty:0, ConfigurationWord(s):0xA2C741C016FF3F84 CRYSTAL=32000000 Hz BAUD=9600 Hz, RATE=1000000 Hz, SPEED=100000 Hz PULL-UP LIST RA: 0xFFFFFFFF RB: 0xFFFFFFFF END VAR LIST 1 bytes #0X8F Now not used !!! 1 bytes #0x8F Now not used !!! 2 bytes 8000 Now not used !!! 1 bytes CADCPWM Now not used !!! 1 bytes CCount Now not used !!! 1 bytes CCountup Now not used !!! 1 bytes CDomeControl Now not used !!! 2 bytes CDomeCount Now not used !!! 2 bytes CDomeCount1 Now not used !!! 1 bytes CDomeCountDown Now not used !!! 1 bytes CDomeFade Now not used !!! 1 bytes CDomeTime1 Now not used !!! 2 bytes Cnew Now not used !!! 1 bytes Cnewfgbn Now not used !!! 1 bytes Coff1 Now not used !!! 1 bytes Coff2 Now not used !!! 1 bytes Con1 Now not used !!! 1 bytes Con2 Now not used !!! 2 bytes Cont Now not used !!! 2 bytes Control Now not used !!! 2 bytes Countup Now not used !!! 1 bytes Cwhich Now not used !!! 2 bytes DIV Now not used !!! 2 bytes DUTY Now not used !!! 2 bytes DUTY_CYCLE Now not used !!! 2 bytes DUTY_CYCLE2 Now not used !!! 2 bytes Dut1 Now not used !!! 2 bytes Duty Now not used !!! 2 bytes Duty_cycle 2 bytes MIN Now not used !!! 2 bytes PERCENT Now not used !!! 2 bytes Rand Now not used !!! 2 bytes SENS Now not used !!! 2 bytes SENS10 Now not used !!! 2 bytes SPAN Now not used !!! 1 bytes T1 Now not used !!! 2 bytes T2 Now not used !!! 2 bytes T3 Now not used !!! 2 bytes T4 Now not used !!! 2 bytes TA Now not used !!! 2 bytes TA1 Now not used !!! 2 bytes TA2 Now not used !!! 2 bytes TB Now not used !!! 2 bytes TB1 Now not used !!! 2 bytes TB2 Now not used !!! 1 bytes TCountup Now not used !!! 1 bytes TDomeCount Now not used !!! 1 bytes TDomeCount1 Now not used !!! 1 bytes TDomeCount2 Now not used !!! 1 bytes TDomeDelay Now not used !!! 1 bytes TDomeFade Now not used !!! 2 bytes TDuration Now not used !!! 1 bytes TFadeCount Now not used !!! 1 bytes TLED1 Now not used !!! 1 bytes TLED2 Now not used !!! 1 bytes TLight1 Now not used !!! 1 bytes TLight2 Now not used !!! 2 bytes TOutputTime Now not used !!! 1 bytes TPulse Now not used !!! 1 bytes TSound1 Now not used !!! 1 bytes TSound2 Now not used !!! 1 bytes TT1 1 bytes TT2 Now not used !!! 1 bytes TT3 Now not used !!! 1 bytes TT4 Now not used !!! 1 bytes TT5 Now not used !!! 1 bytes TTimer Now not used !!! 1 bytes TTooter1T1 Now not used !!! 1 bytes TTooter1T2 Now not used !!! 1 bytes TTooter1Time Now not used !!! 1 bytes TTooter2T1 Now not used !!! 1 bytes TTooter2T2 Now not used !!! 2 bytes Tauto_off Now not used !!! 2 bytes Tconti Now not used !!! 1 bytes Tct1 Now not used !!! 1 bytes Tct2 Now not used !!! 1 bytes Tct3 Now not used !!! 1 bytes Tct4 Now not used !!! 1 bytes Td Now not used !!! 2 bytes Tdelay_off Now not used !!! 1 bytes Tdelay_on Now not used !!! 2 bytes Tdfdfg Now not used !!! 2 bytes TestNumber Now not used !!! 1 bytes Tfghjfg Now not used !!! 1 bytes Tflash Now not used !!! 1 bytes Tghfjghjjghj Now not used !!! 1 bytes Tghjghj Now not used !!! 1 bytes Tghjghjgjkhl Now not used !!! 2 bytes Tghmjghj Now not used !!! 1 bytes Thjkhjkjk Now not used !!! 2 bytes Thjkhjkk Now not used !!! 2 bytes Tjkljkljkljkl Now not used !!! 2 bytes Tkjb Now not used !!! 2 bytes Tnbmnew Now not used !!! 1 bytes Tnecvw Now not used !!! 2 bytes Tnehjuklw Now not used !!! 1 bytes Tnew Now not used !!! 1 bytes Tnew2 Now not used !!! 1 bytes Tnn Now not used !!! 1 bytes Tof Now not used !!! 1 bytes Ton Now not used !!! 1 bytes Tosc Now not used !!! 1 bytes Tpuls Now not used !!! 1 bytes Trepeat Now not used !!! 2 bytes Tt2 Now not used !!! 1 bytes Tvfbhnvbn Now not used !!! 1 bytes Twait Now not used !!! 2 bytes Tyyui Now not used !!! 2 bytes UST Now not used !!! 2 bytes VALUE Now not used !!! 2 bytes a Now not used !!! 2 bytes adc Now not used !!! 2 bytes adj Now not used !!! 2 bytes ara Now not used !!! 2 bytes ch Now not used !!! 2 bytes ch_in Now not used !!! 2 bytes char Now not used !!! 2 bytes cnt Now not used !!! 2 bytes counter Now not used !!! 2 bytes cycle Now not used !!! 2 bytes d1 Now not used !!! 2 bytes dest Now not used !!! 2 bytes down Now not used !!! 2 bytes duty Now not used !!! 2 bytes duty_cycle Now not used !!! 2 bytes dutycyle Now not used !!! 2 bytes f1 Now not used !!! 2 bytes fark Now not used !!! 2 bytes fark0 Now not used !!! 2 bytes fark1 Now not used !!! 2 bytes farkx Now not used !!! 2 bytes ff Now not used !!! 2 bytes gereken Now not used !!! 2 bytes inch Now not used !!! 2 bytes kyt Now not used !!! 2 bytes kyt1 Now not used !!! 2 bytes last_ch Now not used !!! 2 bytes orAn Now not used !!! 2 bytes oran Now not used !!! 2 bytes orn Now not used !!! 2 bytes orn1 Now not used !!! 2 bytes orn10 Now not used !!! 2 bytes orn19 Now not used !!! 2 bytes orn2 Now not used !!! 2 bytes orn3 Now not used !!! 2 bytes orn4 Now not used !!! 2 bytes orn5 Now not used !!! 2 bytes orn6 Now not used !!! 2 bytes orn7 Now not used !!! 2 bytes orn8 Now not used !!! 2 bytes orn9 Now not used !!! 2 bytes period Now not used !!! 2 bytes puntos Now not used !!! 2 bytes reg0 Now not used !!! 2 bytes reg1 Now not used !!! 2 bytes reg2 Now not used !!! 2 bytes reg3 Now not used !!! 2 bytes reg4 Now not used !!! 2 bytes reg5 Now not used !!! 2 bytes reg6 Now not used !!! 2 bytes revol Now not used !!! 2 bytes saved Now not used !!! 2 bytes src Now not used !!! 2 bytes threshold Now not used !!! 2 bytes time Now not used !!! 2 bytes tot_cycles Now not used !!! 2 bytes up Now not used !!! 2 bytes val Now not used !!! 2 bytes var Now not used !!! 2 bytes yaz Now not used !!! END IO LIST XUP at 2 0 0 ADC at 17 0 0 PWMoutpin at 12 0 0 END PROGRAM RUNG 1 READ_ADC ADC 0 END RUNG 2 CONTACTS XUP 0 0 TCY TT1 500 0 OSR LES Duty_cycle 1024 ADD Duty_cycle Duty_cycle 1 END RUNG 3 SET_PWM Duty_cycle 1000 PWMoutpin 0-1024 END RUNG 4 PERSIST Duty_cycle END RUNG 5 GRT ADC 50 SUB Duty_cycle Duty_cycle 10 END RUNG 6 CONTACTS Rrr 0 0 GRT ADC 50 OSR SUB Duty_cycle Duty_cycle 10 END RUNG 7 COMMENT augmented with up without using a rising edge. and then I want to subtract -10 from the standing duty cycle value but without using edge. I want to return to the duty cycle value recorded before the subtraction when the potentiometer is 0. END