Yesterday 18:57
Forum: Proton Plus Compiler v3
Starter: bradysmall
Views: 0
Replies: 7
Yesterday 13:29
Forum: Proton Plus Compiler v3
Starter: mjturner
Views: 0
Replies: 12
Yesterday 13:15
Forum: Proton Plus Compiler v3
Starter: Dave-S
Views: 0
Replies: 2
Go to last post By: Lester
Yesterday 11:22
Forum: The Lounge
Starter: Mellbreak
Views: 0
Replies: 36
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Junior Member kbaykar's Avatar
    Join Date
    Feb 2014
    Posts
    14
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    791.68 MB

    0 Not allowed!

    Default Fault in bit wise comparisons on release 3.6.1.2.

    Hi Les,

    I just downloaded the release 3.6.1.2 today and seeing that it supports 18F47K40.
    I am trying to port my code from 18F4685 to 18F47K40.

    In my code there are many bit wise comparisons like the following:

    Code:
        '
        If ActiveSensorUnits.0=1 Then
           I = SEN1_DevType_LotSerNum: J = SEN1_Production_Date      'first sensor unit!
           GoSub SNPD_Extract_Format_Prod_Info
           Print At SNPD_ROW1+4,SNPD_TAB1,HMM_String 
        Else
           Print At SNPD_ROW1+4,SNPD_TAB1,HMM_String1    
        EndIf
        '
    This code produces faulty result. Previously I was using 3.6.0.3 and there was no such fault at all.

    kbaykar

  2. #2
    Fanatical Contributor Les's Avatar
    Join Date
    Feb 2002
    Posts
    2,963
    Thumbs Up
    Received: 296
    Given: 109
    Total Downloaded
    1.50 GB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    I need more than just a snippet of code kbaykar, before I can find any, possible, anomaly.

    I need the variable types and their location in the program. i.e. the complete Dim list.

    This is because the compiler is dynamic, and it does not produce the same underlying code regardlessly. It depends on a whole bunch of stuff in the complete program.

    Are you sure it is the comparison that is, possibly, faulty? What is, and where is, ActiveSensorUnits?

    In the underlying asm code, the comparison line produces:

    btfss ActiveSensorUnits,0,0
    bra _lbl__3

    Which is correct. It will skip into the the code if bit 0 is 1, or jump over it to the "Else" if it is 0.
    Last edited by Les; 25th May 2018 at 16:30.
    For more example programs for Proton and Proton24 or updates, please visit: Proton WIKI or Proton Files

  3. #3
    Prolific Poster hadv215's Avatar
    Join Date
    Sep 2009
    Posts
    1,069
    Thumbs Up
    Received: 98
    Given: 23
    Total Downloaded
    1.35 GB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    It may be me of course, but I don't see any bitwise stuff apart from the varx.0 = 1 You may use varx = varx and $01 and then test varx to be 1 or not
    Last edited by hadv215; 25th May 2018 at 16:29.

  4. #4
    Junior Member kbaykar's Avatar
    Join Date
    Feb 2014
    Posts
    14
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    791.68 MB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi Les,

    I have just reverted back to version 3.6.0.9 (actually downloaded and repleced App.exe) than the fault dissappeared.
    My Dim list is a bit long one. I would like to send it directly to your email, if you provide me with your email address.

    Regards.
    kbaykar

  5. #5
    Administrator John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,501
    Thumbs Up
    Received: 99
    Given: 29
    Total Downloaded
    2.25 GB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi Kbaykar ,
    Did you try using 3.6.1.4?
    It is available from the Files menu.
    John

  6. #6
    Junior Member kbaykar's Avatar
    Join Date
    Feb 2014
    Posts
    14
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    791.68 MB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi John,
    I just tried using 3.6.1.4. Behaves same as 3.6.1.2. Fault continues.

    I am having also some problems with EEPROM stored strings. I have strings stored in on-chip EEPROM to save room from program store, like the following:
    ALM_DESC1 EData "DOOR AJAR ALARM ",0

    Then I get the content back using the following line:
    HMM_String = EStr ALM_DESC1

    Not all of them, but some string content is not returned back from the on-chip EEPROM. This happens on all 3.6.0.9, 3.6.1.2 and 3.6.1.4 versions.
    As a work-around, I will try moving them to program store using CDATA. 47K40 has larger program store than 4685.

    Regards.
    kbaykar

  7. #7
    Administrator John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,501
    Thumbs Up
    Received: 99
    Given: 29
    Total Downloaded
    2.25 GB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi kbaykar
    Funny you should mention the eedata issue.
    I use strings in eedata for the same reason but in a 18f4685.
    One of the strings is not displaying the correct one in a print statement. The strings have the 0 ending.
    I thought it was me. I'll have a further look too. It only showed up on an old program yesterday.
    I'll see if I can explore further.
    John
    Last edited by John Drew; 28th May 2018 at 08:29. Reason: Phone changes words, thinks it knows better.

  8. #8
    Junior Member kbaykar's Avatar
    Join Date
    Feb 2014
    Posts
    14
    Thumbs Up
    Received: 0
    Given: 0
    Total Downloaded
    791.68 MB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi John,

    I am using an old version 3.5.6.7 to compile my code for 4685, and no problem at all with null ending EData stored strings. But my code hits 98% of program store capacity of 4685. When I try to compile with 3.6.0.3 and further versions, then hex file overflows capacity.

    To be able to write more code, I am trying to port to 47K40. Regarding the bit comparison fault, I already turned back to version 3.6.0.9. And for EData string storage fault, as a work-around, I moved such string definitions to RAM, since I have enough room in RAM. In fact, I prefer to use on-chip EEPROM. I will move them back to EEPROM when I see the fault fixed.

    One point to mention, the EData string fault affects some string definitions, but not all of them.

    Kbaykar

  9. #9
    Administrator John Drew's Avatar
    Join Date
    Feb 2002
    Posts
    2,501
    Thumbs Up
    Received: 99
    Given: 29
    Total Downloaded
    2.25 GB

    0 Not allowed!

    Default Re: Fault in bit wise comparisons on release 3.6.1.2.

    Hi Kbaybar
    I can't get consistent results with the eedata strings. I've written to Les with an example see if he can spot the problem.
    John

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Weird interrupt behavior...need wise advise
    By jncortes in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 29th October 2009, 07:30
  2. Problems with DWords and Comparisons
    By Paul Shepard in forum Proton Plus Compiler v3
    Replies: 4
    Last Post: 9th June 2005, 09:42

Members who have read this thread since 11th August 2018, 17:32 : 0

Actions :  (Set Date)  (Clear Date)

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts