Main Site Documentation

Question about IO11 and IO12 in EMX


#1

I use multi SPI and I have as follow configuration for SPI1:


        public static SPI.Configuration SPI_1_Config_DAC_CS0 = new SPI.Configuration(Cpu.Pin.GPIO_Pin2, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS1 = new SPI.Configuration(Cpu.Pin.GPIO_Pin3, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS2 = new SPI.Configuration(Cpu.Pin.GPIO_Pin6, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS3 = new SPI.Configuration(Cpu.Pin.GPIO_Pin7, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS4 = new SPI.Configuration(Cpu.Pin.GPIO_Pin9, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS5 = new SPI.Configuration(Cpu.Pin.GPIO_Pin10, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS6 = new SPI.Configuration(Cpu.Pin.GPIO_Pin11, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
public static SPI.Configuration SPI_1_Config_DAC_CS7 = new SPI.Configuration(Cpu.Pin.GPIO_Pin12, false, 0, 0, false, true, 200, SPI.SPI_module.SPI1);
       

I have checked SPI1 signal with oscilloscope, olny the chipselect Pin11 and Pin12 are very weak/bad.
I have read the User Manual of EMX, and find Pin11 and P12 are reserved pin for I2C, I guess that this is the problem, why the 2 pins are weak/bad.

how can I solve the problem?


#2

These pins are open drain (open collector) http://en.wikipedia.org/wiki/Open_collector


#3

@ workhard10 - Looking at the documentation you will see that IO11 and IO12 are marked as “open drain”. This means they you will need an external pull up resistor on these pins. They can not be used to drive an external device without a resistor.


#4

Yes, I forgot the "“open drain” problem.

ok, thank you very much!!

I have used 2.2K resistor, and it works well now!