Search Results - MEL PICBASIC Forum

Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.02 seconds.

  1. Re: SWAP COMMAND extended to Longs and array variables

    Just seen this post...
    It is possible
    X = X XOR Y
    Y = Y XOR X
    X = X XOR Y

    Just run 2 arrays, with for loop and this swap byte method, and they will be swapped.
  2. Re: Doing something at predefined amount of steps?

    Logic look good to me.

    But you have very inefficient part of code...

    IF A//E=0 and X>Y then GOSUB PULSEY
    IF A//E=0 and Y>X then GOSUB PULSEX
    This 2 line generate more than 400bytes of code,...
  3. Replies
    1
    Views
    75

    Re: PWM calculated?, not table

    I would use table.
    It is simpler and quicker, than calculating. And once you have one table, you can use same table for 3 phase.
    If you want to have less data points for some reason, use linear...
  4. Replies
    15
    Views
    336

    Re: Revisiting Timers & Time Stamps

    I agree with you. You are right.
  5. Replies
    15
    Views
    336

    Re: Revisiting Timers & Time Stamps

    :wink:

    16bit mode shouldn't make any difference. Because timer clock is much more slower than processor clock. So even 4 instruction clock needed to read and store 2 register into 2 values, won't...
  6. Replies
    15
    Views
    336

    Re: Revisiting Timers & Time Stamps

    Yes. Set some pin HI before and low after pause 65000. But you probably need to use something lower, like pause 1000.
    I think that I described it accurately, but it was typo
    It is error of just...
  7. Replies
    15
    Views
    336

    Re: Revisiting Timers & Time Stamps

    Probably inaccuracy of PAUSE command.
    It is error of just 0.9-1uS per mS(60uS/65000). And that is just one instruction time when running on 4MHz(4 000 000MHz/4clock per instruction =1000000...
  8. Re: Is it possible to make LCDOUT asynchronous?

    I'm not that good in asm. But You can always look at disassembly window in MPLAB X to see how PBP compiler done it.
    Also Step by step debugging helps a lot.
  9. Re: Is it possible to make LCDOUT asynchronous?

    This is off topic, but...
    Default vars are must to save. Because those are internal PBP vars inside compiler subroutines.
    That what you want is great, but require too much work if you ask me.
    You...
  10. Re: Is it possible to make LCDOUT asynchronous?

    I'm really glad that you tried it. I didn't have time to do it, but wanted...
    I don't know why everyone assumes always that PBP is slower than C. In my experience it was opposite.
    Speed of DT int...
  11. Re: Is it possible to make LCDOUT asynchronous?

    Actually you don't need C. Just google Bresenham's line algorithm...
    https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm
    Also I want to point that you do stuff totally opposite as it should...
  12. Re: Is it possible to make LCDOUT asynchronous?

    LCDOUT can be quick. If you just update values that was changed, not whole display.
  13. Replies
    1
    Views
    117

    Re: QR Code encoder

    Interesting...
    It doesn't look too easy. But it could be done.
    Arrays and pointers are used almost same way as in PBP.
    But I would suggest to store table data in ASM so it would use much less...
  14. Re: Non standard, 160 char LCD text displays, SPLC780 controller, anyone?

    That is too much money for that type of display, if you ask me. For that money you can have 7" display with touch, animation, etc...
    Just recently looked up nextion...
  15. Re: Low power accurate 6 month timer - suggestions?

    Thanks for sharing. You saved me a lot of time.
    Any of theirs RTC have impressive spec. I'm wondering how they achieve 1 ppm @40nA with new RTC...
  16. Re: Glitches when changing portD seen on other ports

    I don't know if your PIC have slewrate control. Try to set it to slower speed if you can. As fast rising edge can cause problem due to capacitive coupling to other pin.
    So when you change state on...
  17. Re: Need to drive 40 pins on variable change, is there a way to do it in elegant way?

    Check crystal capacitors, and crystal.
  18. Thread: MQ 135 sensor

    by pedja089
    Replies
    2
    Views
    305

    Re: MQ 135 sensor

    As far as I know, best way in PBP is to use lookup table and linear interpolation.
  19. Replies
    10
    Views
    753

    Re: Nextion Touchscreen LCD User Interface

    Now you get me interested in this display...
    I installed editor, and I got very nice surprise. You can use PIC with simulator/debugger.
    Second, I think that this code

    AdcVal VAR BYTE
    AdcVal_A...
  20. Re: with the pic16f628a off, a voltage on an1 comes out from main voltage pin, why?

    Why you don't connect A1 after switch?
  21. Replies
    14
    Views
    3,852

    Re: Using Floating Point to integer subroutines

    I do not have DEV_FAM.inc file.
    I have:
    FP1832L.bas
    FP32.A18
    MATH18.INC
  22. Replies
    14
    Views
    3,852

    Re: Using Floating Point to integer subroutines

    I have FP library running on few 18F46K80 and 18F87j50.
  23. Re: AD8302 Phase and magnitude to complex impedance

    First, I now see that I have mistake in formula, all items with "i" should be on right. I used online calc to solve it. Looks like that I need to solve by hand...
    Answer to your question is yes, and...
  24. Re: AD8302 Phase and magnitude to complex impedance

    Written in form Zx=R-jX
    8927
  25. Re: AD8302 Phase and magnitude to complex impedance

    Step 6: Realize how stupid you are, and how some things are simple :)
    Math is actually fairly simple.
    M=Vf/Vr-magnitude signal from AD8302. p- Phase from AD8302, Z0-system impedance
    ...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4