mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 16:16:13 +01:00
0be25f6e7f
commite06668f042
Author: Asbelos <asbelos@btinternet.com> Date: Mon Dec 26 10:09:34 2022 +0000 speedup commit3e5d3b1caa
Author: Asbelos <asbelos@btinternet.com> Date: Sun Dec 25 22:11:56 2022 +0000 Rename commit81099af42b
Author: Asbelos <asbelos@btinternet.com> Date: Sun Dec 25 21:35:38 2022 +0000 spelling and polling commit9240e7c6ba
Author: Asbelos <asbelos@btinternet.com> Date: Sun Dec 25 20:52:07 2022 +0000 input working commit6c1c681a26
Author: Asbelos <asbelos@btinternet.com> Date: Wed Dec 21 11:18:39 2022 +0000 input working 1 board, no kit map, output untested commit5ce67fac97
Author: Asbelos <asbelos@btinternet.com> Date: Sun Dec 18 15:32:37 2022 +0000 Include IO_DNU08 automatically commitac8d453d2c
Author: Asbelos <asbelos@btinternet.com> Date: Sun Dec 18 12:28:13 2022 +0000 BNOU8 HAL driver
40 lines
1.6 KiB
Markdown
40 lines
1.6 KiB
Markdown
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.
|