Search Results - MEL PICBASIC Forum


Search:

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

Search: Search took 0.00 seconds.

  1. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    Ioannis gets it. You don't. That code doesn't "work just fine".

    Your array index statements are screwed up, so you're accessing who knows what in memory.
    That would explain the mysterious "I add...
  2. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    There are still places where things can go wrong, so until they're fixed all bets are off.

    For example in gcoder you have the following (I've removed some of the code for clarity)


    FOR X=0...
  3. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    They're used BEFORE the "last call", they're used on EVERY call to gcoder, and they're NOT assigned values.
    If that's how you think this all works you should give up now.
  4. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    The variables astart and aend are not assigned values until right before the last time gcoder is called.
    What do you expect them to be the first time the program runs since they are uninitialized?
  5. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    You just said...

    That's the code that's 700 lines?

    If you're having issues then continuing to add more code isn't going to help.
    You should stop, and start trimming things down bit by bit...
  6. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    just saying... "Problem is definitely in arrays... but as soon their total length exceeds 24 bytes, issues start to appear. " doesn't seem to pan out.

    The following reads three 16-byte arrays (48...
  7. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    I just did this with an 18F45K80


    ' device = 18F45K80

    topline var byte [16] 'top part of the screen array
    botline var byte [16] 'bottom part of screen

    ix var byte
    ct var byte
  8. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    You've been using x, y, and z to get values to set a and b.
    You've been shoving invalid data out to the lcd and wondering why the display is wrong.

    It's probably still wrong.
  9. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    Fair enough, but what about this when x >= 16


    if topline[x]=32 or botline[x]=32 then a=0
    if topline[x+1]=32 or botline[x+1]=32 then b=0 'blanker
  10. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    Your arrays are declared as 'var byte[16]'


    topline var byte [16]
    botline var byte [16]

    That means a valid array index is from 0-15

    This code here will fail when x=15
  11. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    It could be that the LCDOUT dominates the execution time, although I'd be surprised if it's "0 difference"

    Do you still have CONFIG FOSC = INTIO1?
    With that, you can measure the CLKOUT on the...
  12. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    XINST changes the way some instructions work, so unless you have a compiler that supports it (like almost none), always set it off.

    You're not missing out on anything.
  13. Replies
    68
    Views
    30,406

    Re: I2CWRITE not writing anything on PIC18F45K80

    Change CONFIG XINST setting to OFF.

    Very few compilers are compatible with ON
Results 1 to 13 of 13