Recent content by AllyCat

  1. A

    Picaxe 20x2 and Adafruit TCS34725 Color Sensor

    Hi, After nearly 10 years, here is an "update" to this thread, almost the only "hit" on the forum for the TCS34725 colour sensor, which is surprising as it seems quite a useful device. The particular features that I have added are an "On Demand" (or Single-Shot) measurement capability, and...
  2. A

    My Pot Position LED patterns not quite right ????

    Hi, You haven't listed the code which doesn't work, but my guess is that you've overlooked that each sector/zone for 20 is only 12.8 units wide. So you need to divide the ADC value (strictly maximum 255) by 13 or 12. If you divide by 13, the last sector will be slightly small (247 - 255) or...
  3. A

    6174-Kaprekar's Constant

    Hi, The reason that the digits must not all be the same is that the sorted "high" and "low" numbers would both be the same, so the subtraction produces zero. I just allowed the basic program to run, trapped the zero and printed an "Error Message" in place of the zero. :) I think I created a...
  4. A

    Serin Qualifiers

    Hi, PICaxe commands work almost entirely from Left to Right, so the program would look for "XYZ" before reading a value into b8. As hippy said, just looking for "X" should work and then it should skip over the other non-digit characters to load b10 and b12 (but note that the # qualifier...
  5. A

    Different serial in speed and out speed possible?

    Hi, If the input is just single (isolated) ASCII characters then yes I think it should be possible with a single 08M2. It depends what the "translation" involves but I guess the 08M2 has sufficient memory (it doesn't have the 512 bytes of Table Memory of other M2s). The SERIN will need a...
  6. A

    Different serial in speed and out speed possible?

    Hi, 31250 baud is not a "standard" PICaxe Baud rate (i.e. it's not a "power of two" multiple of 2400 baud, etc.) so it can't be used with the SEROUT/IN commands. However, the "HSEROUT" (Hardware) can be set to any (reasonable) baud rate, if you do a few calculations (I didn't find a "Wizard"...
  7. A

    Parallel Tasks

    Hi, There are several Microchip Applications Notes describing how the Touch Pads are intended to be used. Typically a flat plate (e.g. a few square cms of PCB area) totally insulated from the user by a thin layer of insulating film. The on-chip circuit for each pin is basically a configurable...
  8. A

    ADC Channel Numbers

    Hi, With M2 chips, only registers b0 to b3 are directly bit-addressable. Personally, in my programs I nearly always reserve b0 for "Global Flags" (8 off = bit0 to bit7), b1 as a "Temporary/Local Byte" and b2 - b3 (w1) as a "Temporary/Local Word", for when bit-addressing is required or to pass...
  9. A

    ADC Channel Numbers

    Hi, Is it? I thought that the IF bn bitn CLEAR ... etc. is an X2 construct only? For M2s it's for example: IF bit9 = 0 ...... for variables b0 to b3 only (bit0 to bit23) which you can print with SERTXD(#bit9,.....) etc. Cheers, Alan.
  10. A

    Parallel Tasks

    Hi, Perhaps I'm being pedantic, but initially I was confused, because shouldn't that say "Task 1" (or perhaps "Start 1") ? "Slot 1" is a completely different area of program memory executed by the RUN n command, now available with all current PICaxe chips except the 08M2 and 20X2 ...
  11. A

    Electronics Help Needed Please (for a very special project)

    Hi, A very thought-provoking project on which a (large) book could be written, to cover all the technical aspects alone. So I'll start with just a few "bullet points" (or Chapter headings) and you can ask for further details on any particular features of interest. No, an operational lifetime...
  12. A

    The Pulsin command takes too much time - in search of ideas

    Hi, I haven't examined your code in detail, and for now just a few quick answers, because I am currently "traveling". It's usually hippy who recommends using two (PICaxe) chips in multi-tasking type applications, where I normally like to (try to) do it with one. :) Most of the "Port C"...
  13. A

    The Pulsin command takes too much time - in search of ideas

    Hi, Welcome to the forum. Actually, an 08M2 has 3 inputs and 3 outputs, or 2 x08M2 will fit in a 16-pin socket for true multi-tasking (two cores), but you are correct that a single 14M2 is probably the most suitable PICaxe to use here. :) Note that many of PICaxe's timing parameters change...
  14. A

    Best way to generate an accurate 1Hz signal?

    Hi, Often those clock movements reverse the drive polarity each second, so you might need to be a little creative. ;) Cheers, Alan.
  15. A

    PWMOUT on 18M2 with 50 percent duty

    Hi, Yes, but when you are ONLY changing the Duty Cycle. It's to avoid "updating" the period register when it's not required to change. However, there are indications that the modern chips' (hardware) sychronise the updating of the period register to the end of a full cycle anyway. I think...
Top