Created
June 30, 2021 17:22
-
-
Save hekras/b10ba5181e97a88caa3b7e86e74f9126 to your computer and use it in GitHub Desktop.
Testing 2 modules on the PS Labs CMM2 Expansion cards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SETPIN 31, DOUT 'set pin 31 to latch the relay card | |
SETPIN 33, DOUT 'set pin 33 to latch the shift register card | |
SPI OPEN 195315, 0, 16 'mode 0, data size is 16 bits | |
LED2 = 1 | |
LED1 = 1 | |
do | |
if LED1 = &B0100000 then LED1 = 1 | |
if LED2 = &B1000000000000000 then LED2 = 1 | |
PIN(31) = 0 | |
junk = SPI(LED1) | |
PIN(31) = 1 | |
pin(33) = 0 | |
junk = SPI(LED2) | |
PIN(33) = 1 | |
pause(2000) | |
LED1 = LED1<<1 | |
LED2 = LED2<<1 | |
loop | |
SPI CLOSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment