Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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 :)
  13. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    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...
  14. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    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. 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. 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. 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. 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...
  19. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    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...
  20. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    I mean, 796/10 should be 80, but PBP returns 79.
  21. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    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. 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....
  23. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    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,...
  24. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    LOL what I actually need is ROUND statement which will round, for example, 799 to 800.
  25. Replies
    56
    Views
    15,507

    Re: Stable Adc Reading Routine

    I tried this:

    IF ADCVal DIG 0 > 5 THEN ADCVal = ADCVal + 10

    actually it does not helps, and fluctuations sometimes become worse - say it was 70, than I see for moment it climb to 77 :D
    ...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4