Search Results - MEL PICBASIC Forum


Search:

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

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    17
    Views
    676

    Re: jumping out of a gosub reminder

    You could just goto error handler if you found error. Then make just one exit of it, and exit with @ Reset.
    This will reset PIC and clear stack. Same way as if you power off then on.
  2. Replies
    17
    Views
    676

    Re: jumping out of a gosub reminder

    When compiler gosub, it will always return. Unless you use ISR to modify stack, which I wouldn't recommend.
  3. Replies
    17
    Views
    676

    Re: jumping out of a gosub reminder

    Not necessarlly, Lot of hi level programing language have this already implemented. eg in .net: On Error GoTo, Try, catch, etc...
    Same could be done for HW. If something external happened then you...
  4. Replies
    17
    Views
    676

    Re: jumping out of a gosub reminder

    But if I understand correctly he want to goto and never return.
    So you need to pop stack to prevent overflow.
  5. Replies
    3
    Views
    190

    Re: 40466 LCD help

    Maybe this will help
    8797
  6. Replies
    17
    Views
    676

    Re: jumping out of a gosub reminder

    I had similar ideas, but give up on them. I use something like this:

    Gosub xx : If err=1 then goto yy

    XX:
    if something to triger going to err sub then
    err=1 ' goto in different sub after...
  7. Re: Need to drive 4 rgb leds, but have only 1 pin available...

    You missed the point...
    Use same RC circuit to drive APA LED. Apa have Data and Clock pin and you have one pin free.
  8. Re: Need to drive 4 rgb leds, but have only 1 pin available...

    Not necessary, you can create clock and data using only one pin.
    eg
    https://www.romanblack.com/shift1.htm
  9. Replies
    21
    Views
    775

    Re: Array error in Hserin

    You need _ before PBP name, when used in ASM.
  10. Replies
    10
    Views
    1,008

    Re: Ability to pay per MCU License.

    Then declare variable in BANKA. And use it.
    I have one of best compilers for pic. It iscalled PicBasic Pro :)
    And pbp have very good optimization. And wouln't benefit in program size from adding...
  11. Replies
    10
    Views
    1,008

    Re: Ability to pay per MCU License.

    I use TmpB1... TmpW1... TmpL1 etc...
    Passing values to sub cant make nothing for better code efficiently.
    It can make it just look better. Behind curtain, ASM code is same, or worse if compiler...
  12. Replies
    4
    Views
    439

    Re: large preload includes

    It can be done with #IF ....
    Look manual for conditional compile in manual.
    I would suggest to you that you download data using serial port, or similar. So you don't have need to load multiple hex...
  13. Replies
    19
    Views
    3,814

    Re: 10-Bit PWM using PIC16F1509

    Take look at SPWM from DT. Or better MIBAM.
  14. Replies
    14
    Views
    1,223

    Re: Better code check before compile?

    That is exactly what I have on my mind in post #8.
    Maybe it will be useful if compiler give just warning about missing RETUN.
    But That wouldn't prevent bad stuff from happening same as it throwing...
  15. Replies
    14
    Views
    1,223

    Re: Better code check before compile?

    Then 80% of my programs wouldn't compile. I often use multiple entry point in same sub. And have only one return at end.
  16. Replies
    14
    Views
    1,223

    Re: Better code check before compile?

    If your code can start fire, you are doing something really wrong.
    For first run, always use PSU with limited power(at least current limiting) with no load at output. Move actuators if you have...
  17. Replies
    28
    Views
    4,363

    Re: Error when compiling with DT_INTS_3_4b"

    I didn't use K40. But it shouldn't be too hard to implement that.
    As you have only one INT source. TMR2 INT should be disabled. As you need timer 2 only for PWM.
  18. Replies
    28
    Views
    4,363

    Re: Error when compiling with DT_INTS_3_4b"

    I'll just guess, but probably interrupt flag isn't reset in ISR.
    So after exiting ISR, it will jump straight back into ISR.
  19. Replies
    14
    Views
    2,301

    Re: IOC on the 27k40

    For same reason I stick to PBP+MPLAB X. And in more than one case I compared very similar programs in C(and microC) and PBP, and PBP is by far smallest. So you can do more in smaller IC.
  20. Replies
    21
    Views
    2,974

    Re: Real Ice and PBP

    I have REAL ICE. I use MPLAB X. From MPLAB side it is same as if you are using PK3, except it CAN NOT power target, unless you buy additional adapter board. It is little more reliable than PK3.
    It...
  21. Thread: Goodbye

    by pedja089
    Replies
    53
    Views
    6,539

    Re: Goodbye

    You mention that you make your board.
    So just make ones that are compatible with arduino. It should be really easy, I think eagle have library with board layout and connectors.
    So just put your...
  22. Re: Re-using pins while still connected to MAX7219 ?

    Probably you will get audible click on start and stop of data transition, and probably some noise during.
    You may implement this
    https://www.romanblack.com/shift1.htm

    Also you could use SPI port...
  23. Replies
    17
    Views
    1,929

    Re: Multiplexer address control..

    Because that would generate more than double ASM instructions. Lets compare ASM for your code and mine.

    Here is your code

    LATB = LATB & $0F 'strip upper 4 bits
    LATB = LATB | Control << 4 'add...
  24. Replies
    17
    Views
    1,929

    Re: Multiplexer address control..

    I'm using as single bit, not array. And changing only upper 4 bit.
    For this PBP will generate 4 asm instruction per PBP line, and execute 2 or 3 of them.
    In worst case scenario 12 asm instruction...
  25. Replies
    16
    Views
    8,349

    Re: Calculate tuning value for the AD9850 DDS.

    I use 18F for 99% of my project. So by default i go to 18F ASM. Also pbp for 16F doesn't support long variables(because of large overhead, but in my opinion it should).

    You are right, but I put...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4