uflottery.blogg.se

Multisim arduino nano
Multisim arduino nano












GPIO (0x09) sets the OUTPUT value of the GPIO pins. You can have any combination of INPUTS and OUTPUTS you want.

multisim arduino nano

IODIR (0x00) tells the chip what direction the GPIO pins will have. There are 11 Registers in total, and when you get more advanced with this chip, using them should be easy. Each register is a byte of data that tells the chip how to operate. This is because the least significant bit in this byte is a R/W bit.Īll information in the MCP23S08 is stored in Registers. 4 LOW and 5 HIGH would give 0x43, for example.

multisim arduino nano

If you're using multiple chips, you could change the settings on 4 & 5 to give you a different address. The datasheet shows how this works out, but with both 4 & 5 LOW, the address is 0x40. In my diagram I have pulled them both LOW. Pins 4 & 5 on the MCP23S08 are the address lines.

multisim arduino nano

When you want to interact with the chip, you have to pull the chip select LOW, specify an Address, a Register and a Value, and then pull the chip select back to HIGH each time.














Multisim arduino nano