Hallo ThruMyEyez

Ein Tip : Beispiele in Bascom ansehen

mach das mal ohne Sub, ganz einfach z.B

dim x as Byte
x = 100

do

if Pinb.0 = 0 then
if x > 0 then
dec x
Ocr1a = x
end if
end if

if Pinb.1 = 0 then
if x < 254 then
incr x
Ocr1a = x
end if
end if

wait 1

loop

Mfg