Search results

  1. C

    Working with Named Constants

    There are 2 features of named (symbol) constants that I find annoying. First, it's not possible to define them using more than one arithmetic operation. So I have to use several extra to achieve a fairly straightforward objective. In the snippet blow, numc1, numc2 and numc3 are parameters that...
  2. C

    Very low power operation

    I'm trying to implement a very low power 08M (solar powered PIR activated garden light). I have taken my lead from this old thread in the main but also using SLEEP. I'm unclear on a couple of points: 1. I'm using ADC so I'm switching off the ADC module when not in use (poke ADCON0 register...
  3. C

    Graphic OLED demonstration

    I was inspired by Hippy's thermometer and used it as the basis of this sine wave plot which was an exercise to familiarise myself with the graphic possibilities of an OLED. This uses the built-in 18M2 of an AXE131Y (8x5 characters) to draw a sine wave that gradually proceeds across the display...
  4. C

    Confused by MIN

    It checks out OK in the simulator, thanks.
  5. C

    Confused by MIN

    I hadn't thought of using a Word but that works. I need the variables though so I'll stick with my scheme. Putting Min before the Maths goes ... 64,128,0,2,4 ... which is near but not what I want. @Aries "temp min 1 (= smaller of temp and 1)" Surely that's the Larger of temp and 1? Derek
  6. C

    Confused by MIN

    I want a byte variable to follow the sequence 1,2,4,8,16,32,64,128,1,2 ... so I wrote the code symbol temp = b2 temp = 1 DO 'Operations temp = temp*2 min 1 LOOP but that took temp from 128 to 0 not 1. Replacing temp = temp*2 min 1 by temp = temp*2 temp = temp min 1...
  7. C

    I feel like a fraud!

    I found the All About Circuits tutorials very helpful. They also have a Forum for electronic problems. There's also quite a bit about Picaxe in there. Derek
  8. C

    NMEA 0183 mux

    Thanks Hippy. I'm sure you are right that the hybrid system is more robust but is it possible to explain, in simple terms, why it's more robust? Another less important question: if I wanted to expand to more channels would the hybrid scheme adapt easily? I don't understand how the outputs can...
  9. C

    A gap in the 08M2 documentation?

    I was trying to find how many ordinary RAM (peek/poke) locations there are in an 08M2. Manual 2 under peek & poke gives "The M2 parts have up to 512 bytes of user RAM " but the next sentence "The peek and poke commands are used to read and write to all 256 bytes of the user RAM " seems not...
  10. C

    NMEA 0183 mux

    I would like to build a multiplexer to combine 2 NMEA 0183 streams (I understand that NMEA is essentially RS422). One of the streams runs at 4800 baud (standard for NMEA) and the other is high speed, 38400. The multiplexed output is to be at 38400. I have sketched the attached concept...
  11. C

    Setint OR

    That's fantastic thanks. I did try the Select Case route but the way I code, it was messy and obscure. Yours is neat (but a bit obscure to me!). Derek
  12. C

    Setint OR

    I tried to use variables in SETINT OR ... on a 14M2 but the compiler says setint 'OR' only supports constants. The manual says variable/constant for mask and input. I guess the compiler wins, which is a pity. Derek
  13. C

    I2C addressing several adjacent memory locations

    I need to transfer several adjacent bytes between a 14M2 and a DS3231 clock via I2c. The twist is that the top end in the 14M2 memory is the bottom end in the DS3231 Are these bits of code going to work as I'd like? bptr=Axestart HI2CIN Clockstart,(@bptrdec, @bptrdec, @bptrdec ) bptr=Axestart...
  14. C

    MSF reception question

    I'm content for wideranging discussion to flow from my initial post. A major attraction for me of MSF is the auto Summer Time adjustment. [Caution possible political content] Now the EU is talking about dispensing with Daylight Saving, that becomes less significant but with Brexit, who knows...
  15. C

    MSF reception question

    I'm hoping to develop an MSF-based clock. Using a receiver from Canada, and a modified version of Hippy's code from post 36 here I...
  16. C

    hi2csetup command description

    The online version , Example 1 uses hi2csetup followed by writei2c. Can the 2 types of i2c work together? Derek
  17. C

    DIRS and I2C

    Thanks for that advice. I didn't find the fault but built a new board and programmed a new 14M2 without any DIRS and caused no damage so far. It isn't doing all that it should yet but fixing that is what a wet and windy day is for. Derek
  18. C

    DIRS and I2C

    Having let the magic smoke out of 2 14M2s, (I suspect an unused output got accidentally attached to 5V or 0V) I thought it would be safer to specify all pins as inputs except for the intended outputs. But I'm using I2C as well. Will the chip work out what to do about the I2C pins even if I've...
  19. C


    I just reread this carefully. Does it mean that TOGGLE can be used for indirect addressing of output ports?
  20. C

    PICAXE Forum Maintenance/Upgrade

    I like the new look but I've encountered 2 snags: Links to the forum in old posts don't work any more and Google searches return old forum addresses that don't work either. I guess the Google problem will be self-solving in time? Can the old links problem be easily resolved? Derek