hello Im starting into programming and Im triying to program a pic to collect pulses, and for each pulse it accumulates 10 but when I start a new pulse sequence it repeats itself again and again till the memory fills up and gives error, the problem is that I cant make it add up, in the first cycle it adds up the total and stops when I put in the next it gives the proble, it doesnt add up to the total stored in the pics memory, also I have a function to give out 10 credits for every pulse it receives in anothr pin, and has a display totalizing the amount of pulses (credits) acumulated).
my problem is that I cant acumulate another set of pulses after the first come in, and it doesnt add up. please can anybody help? if its a problem I can offer compensation for the time, thanks!!
jorge

how are you passing data to application ?
what are the controls you are using ?
is it VB 6.0 ?

Im using picaxe program to write and it just says basic (no number) but Ill send you part of program so you can see the exact type
BASIC
\DOCUMENTS AND SETTINGS\ADMINISTRADOR\MIS DOCUMENTOS\RRRR.CAD
main:
label_1C: if pin0=0 then label_1C
let b0=b0+ 1
if b0= 4 then label_A9
low 0
pause 1000
high 0
goto label_1C


label_A9: pause 1000
label_27: if pin0=0 then label_108
let b0=b0+ 1
if b0= 8 then label_84
low 1
pause 1000
high 1
goto label_27

label_84: pause 1000
label_BD: if pin0=0 then label_BD
let b0=b0+ 1
if b0= 10 then label_12B
low 2
pause 1000
high 2
goto label_BD


label_108: if pin1=0 then label_113
pause 1000
low 5
goto label_1C

label_113: high 5
goto label_27

label_12B:
goto label_1C

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.