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
    29
    Views
    9,319

    Re: Better code check before compile?

    Same here :confused:
  2. Replies
    3
    Views
    241

    Re: If ... THEN @ NOP

    I expected that...
    Then you must press enter two more times :)
  3. Replies
    29
    Views
    9,319

    Re: Better code check before compile?

    From manual

    2.18 Line-Concatenation ( : )
    Multiple commands may be written on a single line using colon characters to tell PBP where to insert a "virtual" line break.
  4. Replies
    29
    Views
    9,319

    Re: Better code check before compile?

    Hehe. Read manual...
    This : replaces new row. Same as you press enter on your keyboard. So try to compile code from my code above. You will get same results.
    Only thing behind THEN depending on IF....
  5. Replies
    3
    Views
    241

    Re: If ... THEN @ NOP

    @ symbol is for replacing ASM ENDASM. It should be first charter on that line, so it will indicate that line is ASM.

    So try to write If ... THEN ASM NOP ENDASM
  6. Replies
    29
    Views
    9,319

    Re: Better code check before compile?

    That is not bug. That way should work. This : is same as new row.
    So this line

    if ticker>150 and ard<140 and atrig=0 then ticker=1: atrig=1

    is same as this


    if ticker>150 and ard<140 and...
  7. Replies
    7
    Views
    1,354

    Re: AT+CMGS hangs if command is misissued

    Started with sim300, then sim900D, now sim800C.
    I think simcom is best modem for price.
    There is at least 150 pcs in few different products, and I think that there is no failed modem in field....
  8. Replies
    7
    Views
    1,354

    Re: AT+CMGS hangs if command is misissued

    There is no universal solution for that. It depends on implementation of AT command parser and sometimes there is difference between modems FW versions.
    In my programs I repeat command 3 times, if...
  9. Replies
    5
    Views
    735

    Re: CALL instruction not working

    I assume that you had PIC18 connected with external flash.
    I totally missed your first sentence in first post. Sorry about that.
  10. Replies
    5
    Views
    735

    Re: CALL instruction not working

    Are you sure, that you set up correct offset?
    Try to add hard coded address instead label.
    As I assume that flash adr 0 is not PC adr 0. Or I missed something?
    I'm also interested in your HW setup.
  11. Replies
    28
    Views
    6,715

    Re: Battery power back-uped circuit

    Mosfet is easy. Chose one with low Vgsth and as low as possible Rdson. Current more than 4A for modem only.
    I usually use AO3401. To be safe I put 2 parallel. Also it is good idea to PIC have...
  12. Replies
    28
    Views
    6,715

    Re: Battery power back-uped circuit

    You shorted gate to GND in first schematic. So MOSFET are allways on.
    As you see in document anodes of LEDs are connected to positive input supply via diode. Not to GND.
    I overlooked D1 in second...
  13. Re: Unable to fit variable XXX in requested bank 0

    Same here. And you can confirm that looking at .LST file.
  14. Replies
    28
    Views
    6,715

    Re: Battery power back-uped circuit

    First schematic can work. But MOSFET have no purpose. There is no need for one.
    Second schematic doesn't allow battery discharge when charging.
    Don't know where you found that schematic, but look...
  15. Re: Unable to fit variable XXX in requested bank 0

    PBP variables are allocated in bank0. There is a lot of variables if you have complex IF AND OR THEN statement.
  16. Re: My first PBP bootloader (almost) working .. help

    Just spent half an hour reading your first post :D

    You can get block size from ASM.

    BlockSize VAR BYTE BANKA SYSTEM
    @ MovLW BLOCK_SIZE
    @ MovWF BlockSize
  17. Replies
    25
    Views
    3,227

    Re: DEFINE RESET_ORG and DEC modifier issue

    Look at this
    http://www.picbasic.co.uk/forum/showthread.php?t=137

    Store raw data in FLASH. Terminate your string with 0.
    Use readcode to read data, send one byte at time, and that is it.
    So you...
  18. Replies
    10
    Views
    1,445

    Re: DEFINE RESET_ORG and DT Instant Interrupt

    Not good solution at all. Because you need to erase FLASH before writing.
    That code need to be in bootloader, as I explained in few post above.
    GOTO need to be placed in while assembling, not at...
  19. Replies
    10
    Views
    1,445

    Re: DEFINE RESET_ORG and DT Instant Interrupt

    Code for bootloader, generally need to be very basic. Then there is little space to make mistake.
    My biggest bootloader is around 1,2K, smalest 278B.
    I usually use 64K+ to store received HEX. So...
  20. Replies
    10
    Views
    1,445

    Re: DEFINE RESET_ORG and DT Instant Interrupt

    Now I got it.
    I have done bootloaders on top of main program. At address 64000. So in main program i call bootloader with @ GOTO 64000. No need to remap anything.


    When you use reset org 3000h,...
  21. Replies
    10
    Views
    1,445

    Re: DEFINE RESET_ORG and DT Instant Interrupt

    Because, you need to reroute reset interrupt vectors.
    PIC always jump to 04 and 08 on hi/lo int.
    And you don't have anything there.
    Generally that is bad idea, because you hijack interrupts from...
  22. Replies
    7
    Views
    1,210

    Re: divide a 10 Mhz signal by 1000 ...

    Just cascade 3 times 4017. It cheapest and reliable way to do it.
    https://www.ti.com/lit/ds/schs027c/schs027c.pdf?ts=1612268431258&ref_url=https%253A%252F%252Fwww.google.com%252F
  23. Re: How to sort or list received "UNREAD" SMS messages

    Look at EDIT in prev. post.
    But I prefer described way, to list index one by one, and when pic receive MSG delete.
    Do this one per second, and I cant have more than 1 or 2 unread msg. And then it...
  24. Re: How to sort or list received "UNREAD" SMS messages

    Oh, I see now...

    Use AT+CMGR=<index>, and just list all indexes.
    And delete that index as soon as PIC receive whole MSG.
    Also you can use AT+CMGL="ALL",1 to not change status...
    EDIT:
    ...
  25. Re: How to sort or list received "UNREAD" SMS messages

    Read one by one UNREAD MSG. And let modem take care of rest. So there is a lot advantage, letting modem change status to read.
    If you read all unread msg, you wont miss any.
    And if you do it...
Results 1 to 25 of 100
Page 1 of 4 1 2 3 4