UEXT connector & bank/pin numbers

Started by Thomas, November 21, 2012, 09:31:04 pm

Previous topic - Next topic


I'm trying to understand how to guess bank/pin numbers of the UEXT connector (olinuxino-maxi).

Here is the MAXI UEXT connector details from the User Manual :

Here a part of the C code using this connector for MOD-LCD3310 :

//MOSI -> bank[0], pin[20]
//MISO -> bank[0], pin[0]
//SCK -> bank[0], pin[24]
//cs - bank[0], pin[3]
//res - bank[1], pin[23]
//dc  - bank[1], ping[24]

#define LCD_CS_MAKE_OUT() gpio_output(0, 3)
#define LCD_CS_HIGH()  GPIO_WRITE(0, 3, 1)
#define LCD_CS_LOW()  GPIO_WRITE(0, 3, 0)

#define LCD_RES_MAKE_OUT() gpio_output(0, 23);
#define LCD_RES_HIGH() GPIO_WRITE(0, 23, 1);
#define LCD_RES_LOW() GPIO_WRITE(0, 23, 0);

#define LCD_DC_MAKE_OUT() gpio_output(0, 25);
#define LCD_DC_HIGH() GPIO_WRITE(0, 25, 1);
#define LCD_DC_LOW() GPIO_WRITE(0, 25, 0);

How do you guess for example SCK is bank0/pin24 ?
The same for MOSI : on the picture it's number 21, and the C comment indicates bank0/pin20.

Thank you for helping me :)



Hey ! You ! Looking at this line ! I'm sure you can help me ! :)


Fadil Berisha

Quote from: Thomas on November 22, 2012, 09:39:43 pm
Hey ! You ! Looking at this line ! I'm sure you can help me ! :)


Hi Thomas,
This question is answered in this forum. Point in search window and write > bank pin <

Fadil Berisha


November 23, 2012, 01:58:39 pm #3 Last Edit: November 23, 2012, 02:06:54 pm by Thomas
Thank you for your reply.

Indeed I found it already, and tried to apply it on A13 without success.
I'm trying to switch on the LED on A13 with the following C code :

#include "gpio-mmap.h"

int main() {
gpio_output(0,10); //bank0, pin10

We can see in A13 manual that LED1=GPIO Pin#10. (so it's bank0,pin10 I suppose ?)
I am using this gpio-mmap.h file : https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/iMX233/gpio-mmap.h
Looking at its code, I do not see anything iMX233-specific so I use it for A13.

What am I doing wrong ?

Thank you.

PS :
Shell command to switch on the LED :
echo 1 > /sys/devices/virtual/misc/sun4i-gpio/pin/pg9

A13 GPIO User Manual :