Closed xross closed 6 years ago
Correct me if I'm wrong but I think.. Reading the multi-bit port will make it an input so the other bits on the port would float. Also, since the library is not in control of port allocation it could incorrectly be used with an output that actively pulls high as well as low and the tx8 function could end up writing the other pins in the port both high and low. If this is correct, we should be advising that all other pins in the multi-bit port be pulled low through a resistor if this option is used. Tying high/low or leaving the pin open could cause excessive pin driver current flow.
This commit was not intended to add full-multi-bit port support.
Reading the multi-bit port will make it an input so the other bits on the port would float
Correct
high as well as low and the tx8 function could end up writing the other pins in the port both high and low. If this is correct, we should be advising that all other pins in the multi-bit port be pulled low through a resistor if this option is used.
No, the port drives low and high-z (internal pull up enabled) so you would. Adding a pull down against this would not be a good idea. The board in question (xmos originated) leaves them disconnected
Regarding SDA, if you want to use a multi-bit port for SDA there is a pinseq() that would require a change (either with pulls or a poll and mask). Since this would effect power I suppose the code could check the resource ID and use the relevant code. Incidentally, we do have a board that requires this change (again, xmos originated) - the Audio8 slice.
Mask off all but lowest bit of input from SDA port - allows use of bit[0] of multibit port