Recent content by inglewoodpete

  1. I

    Making a block of code inactive like with this";"

    ...and yet another way: blocks of code scattered throughout your program can be included or excluded by using the complier directives #Define/#IfDef/#IfNDef/#Else/#EndIf. You just use or disable (comment out) the #Define directive. Refer to "Pre-Processor and Directives" in Manual 2...
  2. I

    DO...WHILE/UNTIL Loops???

    There are subtle differences when you start using DO and LOOP in more complicated programs. The following two lines come from a programme that I have open in my PE at the moment: Do Until @Ptr = "*" Or bPktLen > 82 -and- Do Until Ptr = hSerPtr The difference between having a DO <condition>...
  3. I

    Question à propos du 8M2

    While it is feasible to use the pullup command to utilise the 08M's C.3 pin as an output, it takes several additional components to function that way. Using a 14M2 would actually reduce the pin count (when taking the MOSFET and resistor legs into account) and probably the PCB space required.
  4. I

    Hippy Version 3.0

    I am also at that stage of life, although I believe I'm a little older than you, hippy. Regardless of age, when you think you have enough resources to live a comfortable life with those most important to you, and you want to fill your time with other things, it is time to make changes. After a...
  5. I

    How do i create a HOLD-in button function?

    Nope, that idea is not mine!
  6. I

    How do i create a HOLD-in button function?

    I wrote the following program several years ago as an exercise to demonstrate what can be done with a single momentary switch, three LEDs and a piezo sounder. The originally hardware was the AXE092 Schools Experimenter board made by RevEd. I believe the AXE092 kit has been discontinued but the...
  7. I

    28X2 turning off PWM when using pwmout and hpwm and invoking an interrupt with hintsetup and setintflags

    I successfully used all 4 available PWM modules on a 28X2 in a project back in 2020. The related code is as follows: Symbol oRedLED = B.0 '21 PWM Out to Red LED *** *** *** *** Red PWM *** *** Symbol oWhiteLED = B.5 '26 PWM Out to White LED *** ***...
  8. I

    Parallel Tasks

    100mS proved to be adequate for this application. In practice, it was difficult for the touch to be less than 100mS I checked the code file - it was actually a 28X2 running at 8MHz, with Timer interrupts every 100mS. The client originally supplied a 20M2 but it was unsuitable due to its...
  9. I

    Parallel Tasks

    I have used a 20M2's 28X2's Touch or Touch16 feature (this characteristic I describe below is probably typical of all PIC and PICAXE chips) for a project that had 9 touch inputs, along with 9 outputs that were used to drive 9 LEDs. I found three unexpected characteristics during the project...
  10. I

    Windows 11 update

    Have to agree with you on that point. You'll never find me queuing for 72 hours outside an Apple store for the latest iPhone 27. Nor, for that matter, will I buy a newly released model of car. As for replacing Windows 10 - I still have to run Windows XP under Oracle's VirtualBox for one...
  11. I

    Using motor with 014M and Darlington driver buffer chip

    "It works fine with LEDs." Do you mean when you download code to the 14M2 on the AXE004 board, it works when it is wired to some LEDs? It will help members if you tell us what the error message is. Otherwise, we'll just be guessing.
  12. I

    8 bit binary output from 14M2 - a binary timer??

    As mentioned previously, the "dirsB" and "dirsC" could be moved to the line just before the "sense:" label, since it only needs to execute once, at start up. For clarity "symbol out = b0", being a definition and non-executable, is best moved to just before the "setfreq m32" line.
  13. I

    Simple program problem

    A couple of optional code simplifications Do and Loop commands can be used instead of GoTo <label> Two or more outputs can be listed after the High and Low commands. #picaxe 08m2 Do if pin3 = 1 then low 0, 4: high 1, 2 else low 1, 2: high 0, 4 ' does all this if pin3 is...
  14. I

    Millivolt level spikes when toggling an output pin

    I second Buzby's message. Microcontrollers (and relays, even with protection diodes) create a lot of electrical noise on their supply lines, which can be harmful is not absorbed by capacitor/s. Refer to Manual 1 "Getting Started", from page 26 onwards - capacitors around the voltage regulator...
Top