Search results

  1. A

    Picaxe Timing Accuracy

    Hi, Ah, beaten to the keyboard by hippy again. ;) At the "physical" level, it's done by the "address" of the Slave device*, sent in the first byte transmitted within each I2Cmessage. So there can be up to about 127 different slave addresses with the Slave only responding to messages...
  2. A

    external resonator on 28x2 chip

    Hi, The PICaxe's internal oscillator is accurate (factory calibrated) to better than +/-1% so to determine if the crystal is actually being used needs the frequency to be measured to much better than +/- 0.1% resolution.. If you don't have any suitable measurement tool (which itself would need...
  3. A

    Software for the MS5637-02BA03 Barometric Pressure Sensor

    Hi, So how do you want to use the data; just for detecting changes is altitude? Remember that atmospheric pressure can change enormously over a period of a few hours or days. Or a "barometer" will need the raw data to be calibrated. I note the chip is SMD with a maximum supply of 3.6...
  4. A

    Picaxe Timing Accuracy

    Hi, The (HC / HCT) 4053 is a "change-over" version (three to a package) of the 4016/66 "On/Off" analogue switches, but they're not as commonly available as they used to be. I've used many in the past and also the four-way (2 per package) version (4051 IIRC) but "analogue" components are...
  5. A

    08M2 - Minimum current

    Hi, Welcome to the forum. A "quiescent" (unloaded) 7805 (or even a 78L05) draws much more current (several mA) than a PICaxe (which draws about 600uA at 4 MHz, excluding any external loads). A few "Ultra Low Quiescent current" regulators do exist (do not confuse with Low Dropout types) but a...
  6. A

    time measurement between two pulses

    Hi, The "Timer 1 Gate" hardware (at least in all M2 chips) is designed for exactly that purpose. But it's not supported directly by the PICaxe Operating System, so you would need to use PEEKSFR and POKESFR commands and "work around" that Timer 1 is used by the Operating System (as a 20ms timer...
  7. A

    Interrupt on timer

    Hi, It still seems that you need to measure the period between the first time that the contacts close (if you want the "bounce" time and not just the total operating time to a "clean" signal) until the last time that they close, which IMHO is not a simple (single) timing function. However, if...
  8. A

    need help about pwm

    Hi, Yes, using lookup tables is an alternative solution, but IMHO a full "mathematical" method will probably take less Program memory and maybe less programming effort. Various "tricks" are possible in PICaxe Basic because many of the keywords actually represent numbers (bytes), so LOOKUP b2 ...
  9. A

    need help about pwm

    Hi again, You can't store a value as high as 150000 in the word variable w2, but that can be solved easily by dividing by 10 and embedding the 0 in the display string, e.g. SEROUT ....(#w2,"0 Hz"....) or more elegantly by showing kHz with two decimal places, i.e. xxx.xx kHz. Conversely, to...
  10. A

    need help about pwm

    Hi, Frequency is the inverse of period so you need to divide a (large) constant by the period to get the frequency, i.e. frequency = A_BIG_NUMBER / period. Unfortunately, PICaxe Basic is very limited in its division capabilities, but several of us have written higher resolution division...
  11. A

    Interrupt on timer

    Hi, Isn't that 4 ms (for a 16-bit counter) ? But bear in mind that "contact bounce" is a mechanical phenomenon which will vary considerably with physical parameters such as the relay coil voltage, current and temperature etc., so I don't see any need for great absolute timing precision...
  12. A

    Interrupt on timer

    Hi, I think you may be misunderstanding the PULSIN command. It is a piece of embedded "machine code" (assembler) which polls the specified input pin in a tight loop of 10 instruction cycles (= 40 clock cycles). Thus its timing resolution (at 64 MHz) is about 625 ns. If the input level does...
  13. A

    Interrupt on timer

    Hi, You cannot make a "direct" measurement of the bounce time, because you don't know when the bouncing has actually finished until some time later (i.e. when the contacts have not opened again). Thus you basically need a background timer/counter, preferably started (or read) when the relay...
  14. A

    6 outputs, random sequence random times

    Hi, Yes, there are quite a lot of "gotchas" with the RANDOM function. I've explained a few in a detailed Code Snippet thread. The need for a word variable is explained in the second paragraph of the Conclusion. Ah, the WHILE B2 = B3 loop may prevent the same bell being rung twice...
  15. A

    Need help identifying two 20 pin Picaxes

    Hi, Yes 20X2 as indicated by the PICaxe Chip Labels page. If these are "old stock", you might want to check the "Revision History" Tab on the relevant PICaxe Store page. Once the chips are running, you can check the version number in the Programme Editor. Cheers, Alan..
  16. A

    6 outputs, random sequence random times

    Hi, IMHO it would be better if the OP had posted his own program code. The description in #1 seems well thought-out, so there might be just a simple coding error. The PULSOUT driving of the pins could be quite important to give a clean and efficient bell strike; I wonder if you might need to...
  17. A

    Simulation Bug?: Timer interrupt does not wake 20X2 simulation from the "DOZE 0" command.

    Hi, The Command Description says that "'doze 0' puts the microcontroller into permanent doze..". Isn't that what's happening? EDIT: I will concede that it goes on to say "The microcontroller is only woken by a hardware interrupt (e.g. .. timer tick)" but remember that it is a "Program Code...
  18. A

    calibadc10

    Hi, The PICaxe ADC should be quite linear, but it seems that you are trying to measure the "resistance" of water between two conductors and that is probably not at all linear (or constant). Firstly, pure water has a very high resistance, so you are mainly measuring the effects of impurities in...
  19. A

    Maths

    Hi, Yes, as Pongo says: if b1 <= b3 - 1 then is not a valid syntax in PICaxe Basic (although it is in many other languages). The command reference defines only the conditions variable comparison value and variable comparison variable , but NOT variable comparison expression. Cheers, Alan..
  20. A

    Wireless Remote Question

    Hi, Reading your original post again, I think the issue might be more fundamental: Are you sure they're actually transmitting at the same frequency? The "nominal" frequency for this ISM band is usually 433.92 MHz, but the cheaper (most) systems can be off by hundreds of kHz. So the receivers...
Top