Conditions not being met - what's going on


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Conditions not being met - what's going on

    I added some diagnostics options to the LCD so I could see what's going on and displaying the decimal value for B_MAX Im getting 65535 which would explain the reason why it was ignoring the comparison as B_PWM would have to equal 65535, but why isn't B_MAX equalling 4095 when the value is set to 4095 in the first part of the code?
    B_MAX is being set somewhere else in your code? Or it would be 4095 surely.

  2. #2
    Join Date
    Jun 2009
    Location
    Sc*nthorpe, UK
    Posts
    333


    Did you find this post helpful? Yes | No

    Default Re: Conditions not being met - what's going on

    Quote Originally Posted by EarlyBird2 View Post
    B_MAX is being set somewhere else in your code? Or it would be 4095 surely.
    Have you solved this? If so I can stop thinking about it and move on. If not what have you found so far?

  3. #3
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Conditions not being met - what's going on

    Not had a chance yesterday to try and debug the code as I had to build a PC for my son. I hop to have a go at your suggestions later this evening

  4. #4
    Join Date
    Oct 2009
    Posts
    583


    Did you find this post helpful? Yes | No

    Default Re: Conditions not being met - what's going on

    Just had a look at the code and something jumped out at me. There was a line that read the data for the stored values from the chip, and this still has the structure for when I was using a Byte for the values. So this was corrupting the values for B_MAX and over-riding the manual values set. Commenting out the gosub read data line and the manual values I had set work. So I can set B_MAX to 3000, 4000 or 4095 and when it reaches these values it trips to the DAY case...

    Time to look at that data section later tonight I think

Similar Threads

  1. Matching time conditions
    By malc-c in forum mel PIC BASIC Pro
    Replies: 48
    Last Post: - 13th April 2010, 20:22
  2. 16LF88 conditions
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 30th March 2009, 07:56

Members who have read this thread : 0

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

Posting Permissions

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