Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #43527

    schoopy
    Participant

    Hello all,

    I am trying to run the OSPi board using a teensy 3.2 microcontroller. None of the code I tried seem to be able to set the shift register. So far I tried using hardware SPI, software shiftOut, converting the raspberry code found on GITHUB, still no success.
    The only thing that works is the OE enabling and disabling the shift register but programming it fails.
    Any help will be welcome to have it working!

    Is there any mysterious hardware modification to bring?
    I had the feeling that upon a correct pin connection this should work straight away as signals are similar (3.3v).

    Thanks in advance.

    Schoopy

    #43639

    Ray
    Keymaster

    Here is a simplified version of the shift out code in OpenSprinkler firmware:
    https://github.com/rayshobby/opensprinkler/blob/master/OpenSprinkler%20Controller/software/arduino-code/libraries/OpenSprinklerGen2/OpenSprinklerGen2.cpp#L543

    This pretty much follows Arduino’s shiftOut function. One thing to note is that the OE must be set to low to enable output. If OE pin is left high, the output is disabled. On OSPi, the OE pin is pulled high by default, and somewhere in the setup function, you must set OE pin to low so that the outputs are enabled. The reason to have an OE control is that at power-up the shift register outputs are random. Disabling output at power-up helps avoid the controller momentarily triggering some solenoids randomly.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.