# Search:

Type: Posts; User: CuriousOne; Keyword(s):

Page 1 of 4 1

1. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

Thanks a lot! it was really time issue, I did not expected it to take so long to show something :) I waited about 20 seconds and LCD shows text now and led also blinks.
2. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

Downloaded trial of that PIC simulator - it appears to not be working, I mean I can load hex, run it, I see instructions cycling, but no led blinking, no LCD is outputting anything....

Also...
3. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

Division by 0 returned 0 in good old times, and I was hoping for same here, but no problem, adding another IF-THEN fixes that.

Another question, going on business trip with my laptop, so I will...
4. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

I run into different problem now - division by 0 returns 65535. Is this normal?

SPOS1=550
SPOS2=600
RPOS1=550
RPOS2=550

SLEN1=ABS(SPOS1-SPOS2)
5. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

So currently I have the following conditions.

Slider movement from edge to edge (30cm) is 100 readings from ADC - value changes from 300 to 400.
Head rotation (it can do 720 degrees) is 800...
6. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

It works, but not exactly, the problem is that ADC readings are not linear, so using predefined number of steps does not work, need to read adc constantly and adjust steps based on it.
7. ## Thread: Doing something at predefined amount of steps?

by CuriousOne
Replies
25
Views
927

### Re: Doing something at predefined amount of steps?

I'm slowly advancing in this task :) Here you can see video filmed from slider itself, and video how slider operates (on this video it is running 20x faster than during filming)....
8. ## Thread: Is it possible to make LCDOUT asynchronous?

by CuriousOne
Replies
23
Views
601

### Re: Is it possible to make LCDOUT asynchronous?

Thanks a lot, but I don't know C syntax and all these different brackets make code unreadable for me.
9. ## Thread: Is it possible to make LCDOUT asynchronous?

by CuriousOne
Replies
23
Views
601

### Re: Is it possible to make LCDOUT asynchronous?

Well I thought I outlined it straight.

There are two pulses, each is 5 microseconds, generated during one turnaround of the loop. The loop is slowed according to requirements, however, shortest...
10. ## Thread: Is it possible to make LCDOUT asynchronous?

by CuriousOne
Replies
23
Views
601

### Re: Is it possible to make LCDOUT asynchronous?

Main loop generates pulses for two stepper motors control and their frequency can reach 2-3khz. Any disruption in speed should be avoided, since these motors drive camera slider and any speed change...
11. ## Thread: Is it possible to make LCDOUT asynchronous?

by CuriousOne
Replies
23
Views
601

### Is it possible to make LCDOUT asynchronous?

There is tight main loop, which should not be interrupted. But there is also need to update 1602 LCD at specified moments of time. LCDOUT statement is very slow and nothing can be done while it is...
12. ## Thread: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

by CuriousOne
Replies
14
Views
487

### Re: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

Thanks, checked it. Even downloaded their IDE. Too monstrous, bad direct sunlight visibility, not mentioning just to display "123" on screen, you have to create an array :D I'll pass :)

by CuriousOne
Replies
56
Views
15,507

Replaced Pause 1 in ADC subroutine with 5 NOPs and speed is now 780Hz. I guess if I interleave both ADC reading operations, can get total speed of 400Hz, which should be enough...

by CuriousOne
Replies
56
Views
15,507

I tried that thing with modulus and +5, but in real code it causes more noise. Say digit is jumping between 699-700, with that code, I occasionally see it jumping to 707. For the noise, in ADC...
15. ## Thread: Generate a non-blocking pulse with an Interrupt Service Routine

by CuriousOne
Replies
15
Views
1,519

### Re: Generate a non-blocking pulse with an Interrupt Service Routine

Thanks, that appears to be too hard for me. I'm using PIC16F886 btw :)
16. ## Thread: Generate a non-blocking pulse with an Interrupt Service Routine

by CuriousOne
Replies
15
Views
1,519

### Re: Generate a non-blocking pulse with an Interrupt Service Routine

Actually I can add another variable in main loop, like this:

Maincode:
'condition
IF BUTTON=1
Then
incr=1
endif
17. ## Thread: Generate a non-blocking pulse with an Interrupt Service Routine

by CuriousOne
Replies
15
Views
1,519

### Re: Generate a non-blocking pulse with an Interrupt Service Routine

Thanks!

Pulse is generated depending on some conditions (record completed, end reached, button pressed, etc.). I know that I can get a way with standard workarounds, but I thought it might be...
18. ## Thread: Generate a non-blocking pulse with an Interrupt Service Routine

by CuriousOne
Replies
15
Views
1,519

### Re: Generate a non-blocking pulse with an Interrupt Service Routine

Having similar issue, almost...

Need to generate 0.2-0.5 second pulse on hardware pin, but without stopping main code waiting for that pause. Is there a way to use timer for that? I don't need...

by CuriousOne
Replies
56
Views
15,507

796 will keep changing, so there always will be then case than final result will be less again.

Regarding how it does, in school I was taught that if something is above 5, it is rounded to nearest...

by CuriousOne
Replies
56
Views
15,507

I mean, 796/10 should be 80, but PBP returns 79.

by CuriousOne
Replies
56
Views
15,507

This data is feedback from position of camera slider. For the rounding, I'm dividing it by 10, and PBP does it wrong - instead of rounding to nearest big, it rounds to nearest small value.
22. ## Thread: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

by CuriousOne
Replies
14
Views
487

### Re: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

Excellent, will order it next week and give it a try. Too bad they don't make it into 20 chars x 8 lines type....

by CuriousOne
Replies
56
Views
15,507

Hysteresis idea is great and I've done in fact PID algorithm on pic by myself, but I don't see how it is related. All I want is to have rough, 80 position input from ADC, without data flickering,...

by CuriousOne
Replies
56
Views
15,507

LOL what I actually need is ROUND statement which will round, for example, 799 to 800.

by CuriousOne
Replies
56
Views
15,507