Search results

  1. F

    Serin Serout issue on 18M2

    You said "the debug is giving me random values" Post some example output from debug so we can see what the receiving chip is reporting. neiltechsp has already spotted one bug but other than that your code is pretty simple. When you switched from RF to wires, did you add a connection between the...
  2. F

    Off Topic (Sort of): 12V Battery backup for house systems

    Ibenson, Your research found "TheBackShed.com says that for longest life, you shouldn't keep lead acid batteries under continuous maintenance charge, but should let them drop to around 12V2 (self-discharging) and then recharge. " Lead acid batteries have been used as battery backups for...
  3. F

    Preprocessor

    Inglewoodpete, You are correct in that the preprocessor processes your .bas file but it only resolves/expands the preprocessor directives. These all start with the "#" character are documented in the manual 2 section "Pre-Processor and Directives". Spectrum, there are other directives that...
  4. F

    Symbols & Variables

    The page for SYMBOLS kn Manual 2 confirms that "The use of symbols does not increase program length".
  5. F

    Picaxe 6 editor and 20m picaxe

    The PICAXE type pull-down list only shows a subset of the chips by default. Go to File->Options->Compiler to add the older 20M chip to your pull down list in PE6.
  6. F

    Symbols & Variables

    Axeminster, After yesterday's post I realized that I was so focused on modifying my existing code to work with the readtemp12 raw values that the code I posted was more complicated than it needed to be and so it also uses more program space than necessary. Here is a simpler version of the...
  7. F

    Symbols & Variables

    Axminster, To help you in your attempt to fit your code into the 18X chip here is a subroutine OUTPUT_DECIMAL_VALUE that only needs two byte varariables to convert the raw binary value you get from READTEMP12 into a decimal number. In my code I've used w1 for the raw value from READTEMP12 and...
  8. F

    I'd like to buy PICAXE VSM but I'd like to find out about updates before I do.

    I've convinced myself that buying PICAXE VSM would be good value for me but the latest versons of the downloads for the VSM software and the Model Patch 4.05 are both pretty old. - The download page lists the Update Service Date for PICAXE VSM as being 1 November 2011. - The most recent dates on...
  9. F

    I2C inter-PICAXE smulation ?

    This is just a update for people who read this thread later on. In this post https://picaxeforum.co.uk/threads/using-define-in-a-program-while-trying-to-simulate-with-vsm.31627/post-328267 in the VSM forum Hippy confirms that: - the pre-processor directives are not supported in VSM - a...
  10. F

    X2 vs M2 Pause times

    matchbox, The PICAXE firmware does not adjust the value you pass to PAUSE as a parameter when you choose a different frequency from the default. You have to do this. e.g. M2 @4MHz a PAUSE 100 will delay 100ms <-- at the default freq the pause parameter equals the delay in ms M2 @8MHz a PAUSE...
  11. F

    X2 vs M2 Pause times

    Matchbox, Checkout the manual entry for PAUSE. The value you use as a parameter is calculated differently for the M2 & X2 chips: PAUSE milliseconds - Milliseconds is a variable/constant (0-65535) which specifies how many milliseconds to pause (at 8MHz on X2 parts, 4MHz on all other parts)
  12. F

    I2C inter-PICAXE smulation ?

    tmfkam, You make a very good point. I hadn't considered how old the current version of VSM is. I've just checked the contents of the vsm_models_405.zip update which adds "The latest X2 & M2 models" and the dates on the files range between 2012-05-01 and 2013-09-09 which is quite a long time...
  13. F

    I2C inter-PICAXE smulation ?

    PICAXE VSM a version of Proteus that supports the PICAXE chips and which from the RevEd page for VSM has: - latest X2 & M2 models - Support for multiple PICAXE chips on same design" I haven't tested that you can run I2C inter-PICAXE communication between two picaxe chips in simulation so you...
  14. F

    Verification error: 0x00 transmitted but nothing received.

    inglewoodpete, NiMH cells have a nominal voltage of 1.2 - 1.25v fully charged so reading 5 volts out of 4 x NiMH looks like they are fully charged. Alkaline have a nominal voltage of 1.5v so 3 x Alkaline will be around 4.5 volts with fresh batteries while 3 x NiMH wold only be around 3.6 - 3.75...
  15. F

    My Old-School Distraction

    WOW! Congratulations.
  16. F

    Maybe the Next Release

    Bill, I'm familiar with the technique of using a LED as a light sensor. You can use a normal input pin to do this. It does not need to be an ADC pin. I have posted a project with example code that does this: Using a LED as a Light Sensor - Example Program and I see now that a couple of other...
  17. F

    Problems with hserout/hserptr

    Friis, This code on my 20X2 with nothing connected to the hserin pin continually reports the value of "1" for hserptr because no characters are being received by the background receive function. #PICAXE 20x2 #Terminal 9600 hSerSetup B9600_8,%11 main: sertxd (#hserptr,cr,lf) goto main...
  18. F

    Problems with hserout/hserptr

    Friis, hserptr is not used with hserin. You either: a) set bit 0 of the mode to "1" in hsersetup to have the receiving done in the background by the PICAXE firmware where the firmware puts the received characters into the scratchpad and updates hserptr. When using background receive you do not...
  19. F

    Problems with hserout/hserptr

    Friis, Your comment "actually, the pgm was not supposed to receive anything (into the scratchpad memory" indicates to me that you may still misunderstand how the hserptr and the scratchpad memory are used. When you specified a "1" for bit 0 of the mode in the command "hSerSetup B9600_8,%11"...
  20. F

    Problems with hserout/hserptr

    Friis, You said said about your simpler example in post #1 "The last [00] indicates that hserptr does not work - it should be 2." The only thing in your simple example that appears to match this value of 2 is the number of characters sent by hserout 0,(b0,b1) so we are assuming that you expect...
Top