1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2025-04-20 20:21:18 +02:00
Asbelos 0be25f6e7f Squashed commit of the following:
commit e06668f042e4b4646f6eab298374fd8f062c7a7f
Author: Asbelos <asbelos@btinternet.com>
Date:   Mon Dec 26 10:09:34 2022 +0000

    speedup

commit 3e5d3b1caaac79757262ebb05d0d31ac0d2c9c7b
Author: Asbelos <asbelos@btinternet.com>
Date:   Sun Dec 25 22:11:56 2022 +0000

    Rename

commit 81099af42b9a4f977232595aaddcafa72e34158d
Author: Asbelos <asbelos@btinternet.com>
Date:   Sun Dec 25 21:35:38 2022 +0000

    spelling and polling

commit 9240e7c6bab74dfead59c5d12da29cf31518d98f
Author: Asbelos <asbelos@btinternet.com>
Date:   Sun Dec 25 20:52:07 2022 +0000

    input working

commit 6c1c681a26987a4cac6a49dd82f7e9974b58c9ad
Author: Asbelos <asbelos@btinternet.com>
Date:   Wed Dec 21 11:18:39 2022 +0000

    input working

    1 board, no kit map, output untested

commit 5ce67fac972dc864cec4c930361a2ab9f12449c8
Author: Asbelos <asbelos@btinternet.com>
Date:   Sun Dec 18 15:32:37 2022 +0000

    Include IO_DNU08 automatically

commit ac8d453d2c1877c5372b406dd10e6e03a2969e5f
Author: Asbelos <asbelos@btinternet.com>
Date:   Sun Dec 18 12:28:13 2022 +0000

    BNOU8 HAL driver
2022-12-26 10:41:15 +00:00

1.6 KiB

Using Lew's Duino Gear boards:

  1. DNIN8 Input This is a shift-register implementation of a digital input collector. Multiple DNIN8 may be connected in sequence but it is IMPORTANT that the software configuratuion correctly represents the number of boards connected otherwise the results will be meaningless.

    Use in myAnimation.h

    HAL(IO_DNIN8, firstVpin, numPins, clockPin, latchPin, dataPin) e.g. HAL(IO_DNIN8, 400, 16, 40, 42, 44)

    OR Use in myHal.cpp IO_DNIN8::create( firstVpin, numPins, clockPin, latchPin, dataPin)

    This will create virtaul pins 400-415 using two DNIN8 boards connected in sequence. Vpins 400-407 will be on the first board (closest to the CS) and 408-415 on the second.

    Note: 16 pins uses two boards. You may specify a non-multiple-of-8 pins but this will be rounded up to a multiple of 8 and you must connect ONLY the number of boards that this takes.

    This example uses Arduino GPIO pins 40,42,44 as these are conveniently side-by-side on a Mega which is easier when you are using a 3 strand cable.

The DNIN8K module works the same but you must use DNIN8K in the HAL setup instead of DNIN8. NO you cant mix 8 and 8k versions in the same string of boards but you can create another string of boards.

DNOU8 works the same way, Use in myAnimation.h

HAL(IO_DNOU8, firstVpin, numPins, clockPin, latchPin, dataPin) e.g. HAL(IO_DNIN8, 450, 16, 45, 47, 49)

OR Use in myHal.cpp IO_DNIN8::create( firstVpin, numPins, clockPin, latchPin, dataPin)

This creates a string of input pins 450-465. Note the clock/latch/data pins must be different to any DNIN8/k pins.