You probably want GOTO, not GOSUB.
Hi all, this code works with adc pic, thanks for your help,
DATO VAR BYTE
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
LED VAR PORTB.0
Darrel's interrupt routine makes timers easy to use if you decide to go that route (look at elapsed time example to count ticks).
It looks like you are converting from C to BASIC, is that correct?
What is your level of BASIC understanding?
One good way to learn BASIC is to look at and study all the other code examples in...
What does the value "mills" represent?
Is it the time between encoder marks?
What PIC are you using?
Does it have internal timers?
If so you could use an interrupt to start the timer at each...
HI! I have a project I am bringing over to PIC from Arduino that controls a self-aquire satellite dish. There are no limit switches so I am performing a homing procedure using velocity, specifically,...
DT Interrupts does more than handle timers. Read the 16F link for details and examples.
I use picbasic pro. Now I want to make a PWM controlled battery charger with PIC16F. But I don't know how to use MOC3021 (triac drive) & INTCON hardware interrupt.
Plz anybody help...
Don't forget to add a" STEP -1" to your "FOR" line, unnecessary when counting up, but required to decrement your loop variable