Announcement

Collapse
No announcement yet.

10F222 Unable to fit variable T2

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 10F222 Unable to fit variable T2

    Oops. I didn't define a variable T2, is it something to do with the compiler?

  • #2
    How large is your program. You only have 512 words of flash and 23 bytes of ram. Look at the ,LST file and see what you have left.
    Dave Purola,
    N8NTA
    EN82fn

    Comment


    • #3
      T2 is a PBP temp variable. Temp variables are generated as needed to accommodate complex conditionals or calculations. To over simplify, temp variables hold the contents of parentheses.

      To help reduce temp variables, split long calculations and conditionals into shorter terms.

      result = (A+B) * (C+D)

      can be written:

      result = A+B
      result = result * (C+D)

      IF (PORTB.0 = 1) AND (PORTB.2 = 1) THEN

      can be written:

      IF PORTB.0 = 1 THEN
      IF PORTB.2 = 1 THEN

      RAM is the major limitation of the 10F2xx parts. They aren't capable of much.
      Charles Leo
      ME Labs, Inc.
      http://melabs.com

      Comment


      • #4
        Ys. It turns out that it was a two-condition if statement that was causing the problem, and the solution is as you prescribed. Thanks...

        Comment

        Working...
        X