Search results

  1. hippy

    relay testing circuit

    I was visualising something like below; coil and drive not shown. All three relay contacts go to PICAXE ADC pins - V+ -.---.---. .|. .|. .|. Relay |_| |_| |_| .-------. | | | .--|--O | <>--^-.-|---|-----(O--' | \O--|--...
  2. hippy

    relay testing circuit

    For a comprehensive test, I would probably connect all three contacts ( Common, N/O, N/C ) to ADC pins with a pull-up and pull-down. Then you can put out a digital high and low to each of those and measure the voltage on the others, for High - .-----.-----.-----.----...
  3. hippy

    Control a PCA9633 with I2C

    Excellent news. Glad it worked and thanks for letting us know. With 'single function' devices they are often pre-configured and power-up 'ready to use' so it's just a matter of setting output data or reading input data. For devices which are more 'multi-function', can be configured in different...
  4. hippy

    code for reading a single i2c device

    That should be relatively easy and you can probably just use the Ph word value. The challenge is going to be in determining what Ph values you can expect, what tone you should generate depending on the difference. That's probably going to require some experimentation.
  5. hippy

    Control a PCA9633 with I2C

    This would be my first atte,pt - #Picaxe 20X2 #No_Data Symbol MODE1 = $00 Symbol MODE2 = $01 Symbol LED0 = $02 Symbol LED1 = $03 Symbol LED2 = $04 Symbol LED3 = $05 Symbol GRPPWM = $06 Symbol GRPFREQ = $07 Symbol LEDOUT = $08 Init: HI2cSetup I2CMASTER, %11000000, I2CSLOW...
  6. hippy

    code for reading a single i2c device

    No. The PROM holds configuration constants, not the actual sensor data. CMD_PROM_7 reads the CRC for the configuration which my code doesn't use so I did not bother reading it. That is entirely separate from reading the raw pressure data. The pressure reading is three bytes, not four, which...
  7. hippy

    Using the serrxd command.

    Perhaps post your full code. This works for me when I test it in the simulator - symbol X1 = b0 symbol X10 = b1 symbol X100 = b2 symbol K = b3 symbol K10 = b4 symbol K100 = b5 symbol M = b6 symbol M10 = b7 symbol M100 = b8 symbol G = b9 symbol G10 = b10 symbol MHz = b11 main: SERRXD...
  8. hippy

    Using the serrxd command.

    You don't want those # symbols there if receiving ASCII digits into each. and you will have to subtract "0" or $30 to get those ASCII characters to be numeric 0-9 after reception. "FA" and "F","A" are interpreted the same way, so it doesn't matter how you specify them. Try a simple Proof of...
  9. hippy

    code for reading a single i2c device

    HI2cIn ( Ph.msb, Ph.lsb, Pl.msb ) : Pl.lsb = 0 b18=Ph.msb b19=Ph.lsb b20=Pl.msb sertxd(#b18," ",#b19," ",#w9," ",#b20,lf,cr) I think you have confused yourself by including #w9. I would remove that or, more preferable, just use - sertxd(#ph.msb," ",#ph.lsb,"...
  10. hippy

    Control a PCA9633 with I2C

    I am not familiar with that chip and couldn't find anything on the forum but there's a datasheet here - https://www.nxp.com/docs/en/data-sheet/PCA9633.pdf It might be worth letting us know which size chip you are using so the Device Address can be figured out, and a link to the product if you...
  11. hippy

    Please point me to some step by step basics to code the PICAXE using Blockly.

    Will the serial terminal in the Editor read an input device? Not sure exactly how you mean but a PICAXE program can take input from the Terminal window, input state can be reported to the Terminal. Is poke 56 like a street address or perhaps an intersection in the chip? It's like a house...
  12. hippy

    I need help to connect this Chinese stearing wheel

    It easily gets confusing when we have both PS2 and PS/2 and a PS2 controller which appears to support PS/2 and PS2 interfaces.
  13. hippy

    I need help to connect this Chinese stearing wheel

    It would seem to be. The connector you are looking at in your photo has 11 connections, but as two are 3.5V that's really 10. A standard Playstation connector appears to have 9 connections, one of which is not used. There seems to be a good correlation if we take it that BL and BD is only for a...
  14. hippy

    I need help to connect this Chinese stearing wheel

    I am not familiar with the Playstation 2 or its controllers but I would guess - DI, DO, CLK and CS is an SPI connection for the Playstation BL and BD might be the clock and data connection for a PC That leaves ACK which I have no idea about but, if a signal from the controller, you might be...
  15. hippy

    Easy 4 digit LED display

    If you replace the opening [code] tag in post#1 with [code="rich"] That should do everything for you.
  16. hippy

    Forum code test

    ;TM1637_test.bas #picaxe 08m2 ;segment data for TM1637 ;( 0 1 2 3 4 5 6 7 8 9 A b C d E F dash blank) DATA 0,($3f,$06,$5b,$4f,$66,$6d,$7d,$07,$7f,$6f,$77,$7c,$39,$5e,$79,$71, $40, $00) ;for TM1637 symbol dio = C.1 ;TM1637 data pin...
  17. hippy

    MAX6675

    You could use - bit1 = pinC.1 or something similar. If you end up having bit0 through bit7 representing pinC.0 through C.7 you can do that in one hit - b0 = pinsC Individual bit assignments are convenient when the inputs come form all over the place, from non-consecutive pins. Bulk 'pins'...
  18. hippy

    MAX6675

    The bits in 'b0' are 'bit0' through 'bit7' and the bits in 'b1' are 'bit8' through 'bit15' So "If bit0 = 1" tests the lsb of 'b0' and "If bit8 = 1" tests the lsb of 'b1'. If you prefer using that style you can do something like it, such as this - Symbol b0.bit0 = bit0 Symbol b0.bit1 = bit1...
  19. hippy

    RGB LED control

    There are a fair few projects and discussions on the forum for driving single RGB LEDs which is probably the best way to start, including - https://picaxeforum.co.uk/threads/picaxe-rgb-controller.9747 Using a single 4-leg RGB LED, common cathode or common anode, and even with just one resistor...
  20. hippy

    Help with PIcaxe LCD

    You can use "PULSOUT <pin>, <N>" to generate a pulse where 'N' is in 10us units at 4MHz operating speed. So for a pot reading of 0 to 255 you want N to be 0 to 3000, because 3000 x 10us = 30000us, 30ms. In a perfect world - ReadAdc <adcPin>, b0 w1 = b0 * 3000 / 255 PulsOut <pin>, w1 But...
Top