Hi,
I've recently been writing a program using quite complex, high resolution mathematics (preview here) and as hippy indicated some weeks ago, it's much easier to write neat and reliable program code for this using Macros in PE6. So I compiled a test version for the 20M2 (as on my breadboard) which was reported as 1450 bytes (and runs and simulates correctly). However, I always like to check if my code can run on an 08M2 (only two pins are required for SDA and SCL in this application) so I compiled again, to be told the program size is 1632 bytes.
Now I know that some of the Program/EEPROM space in an 08M2 is "shared" (and in some configurations I am using the EEPROM), but I can't find any correlation between the "missing" 182 bytes and my use (if any) of the EEPROM space. So I put that aspect "on the back burner" for a rainy day.
However, I've now found the PE6 Simulator interminably slow (at least on my PC, for Simulations rather than debugging) so I copied the pre-processor output file back into PE5 (whose simulator runs about 6 times faster on my PC). The Pre-processor "REM"s out the #picaxe type, but if I reinstate that, PE5 produces very similar sizes of 1632 and 1641 bytes for the 08M2 and 20M2 respectively (which is what I would expect since the internal address space and pinning are quite similar). So that figure of 1450 bytes for the 20M2 in PE6 is looking rather "suspicious", is there something I should be looking out for?
Eventually I will post the full program code, and it's quite likely to get close to completely filling a single slot of a 14/20M2, so I'm rather concerned about that discrepancy of nearly 200 bytes. Any ideas?
Cheers, Alan.
I've recently been writing a program using quite complex, high resolution mathematics (preview here) and as hippy indicated some weeks ago, it's much easier to write neat and reliable program code for this using Macros in PE6. So I compiled a test version for the 20M2 (as on my breadboard) which was reported as 1450 bytes (and runs and simulates correctly). However, I always like to check if my code can run on an 08M2 (only two pins are required for SDA and SCL in this application) so I compiled again, to be told the program size is 1632 bytes.
Now I know that some of the Program/EEPROM space in an 08M2 is "shared" (and in some configurations I am using the EEPROM), but I can't find any correlation between the "missing" 182 bytes and my use (if any) of the EEPROM space. So I put that aspect "on the back burner" for a rainy day.
However, I've now found the PE6 Simulator interminably slow (at least on my PC, for Simulations rather than debugging) so I copied the pre-processor output file back into PE5 (whose simulator runs about 6 times faster on my PC). The Pre-processor "REM"s out the #picaxe type, but if I reinstate that, PE5 produces very similar sizes of 1632 and 1641 bytes for the 08M2 and 20M2 respectively (which is what I would expect since the internal address space and pinning are quite similar). So that figure of 1450 bytes for the 20M2 in PE6 is looking rather "suspicious", is there something I should be looking out for?
Eventually I will post the full program code, and it's quite likely to get close to completely filling a single slot of a 14/20M2, so I'm rather concerned about that discrepancy of nearly 200 bytes. Any ideas?
Cheers, Alan.