Search results

  1. Aries

    spiin versus bit-banging

    I am trying to read my water meter using a CC1101 transceiver. The module I have uses (allegedly) spiin/spiout to communicate with its master. However, although spiout works, spiin seems not to. Bit-banging does. for b0 = 0 to 7 high SCK b1 = b1 * 2...
  2. Aries

    dirsC mystery

    I am baffled ... The following is a very much cut-down version of a multi-slot program on a 28x2, where the LED combinations indicate which slot is active. For some reason, the yellow LED (on pin C.1) never lights when the real program runs. The code below lights all three LEDs, but when the...
  3. Aries

    Skewness in random numbers

    I've seen many examples on the forum of using something like "random w0: w0 = w0 // n" to generate a random number in the range 0 to n-1. What I have recently realised is that while this does give a random number, it is not uniformly distributed - there is a greater likelihood of getting a...
  4. Aries

    #DEFINE warning

    I occasionally use #DEFINE where a value can change depending on what code is compiled - #UNDEFINE allows me to redefine it, whereas once a SYMBOL is set it (as far as I know) cannot be unset. I came across this oddity - the code is much simpler that what I was using, but it shows the problem...
  5. Aries

    SPIOUT vs HSPIOUT

    I'm baffled. I'm trying to use a Nokia 5110 with a 20x2 - many thanks to the posts on the forum which enabled me to see in general how to do it. I started with bit-banging - no problem - then moved to spiout for speed - again, no problem. However, I can't get hspiout to work. Obviously I'm...
Top