wincd pinout c# mini2440

milans
Attachment: SmartDeviceProject1.7z (12.52 KB)
Hi everyone,

I just started with FreindlyARM (mini2440).
I try to ON some pin on GPIO. I need 6 pin to control (on/off). 

I write program in C#, but unfortunetly that didn't work. I found one
similar project and try to use it in my project. In attachment is whole
project in VS 2008 C#. Here is little preview of my code:

namespace SmartDeviceProject2
{
    public partial class Form1 : Form
    {

        private Pin _led1, _led2, _led3, _led4;
        private Pin _switch1, _switch2, _switch3, _switch4, _switch5,
_switch6;

        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
//this suppose to turn on one pin
            _led1 = new Pin(Port.PORT_B, 6, PinConfiguration.OUTPUT,
PinValue.HIGH);
        }

        private void button4_Click(object sender, EventArgs e)
        {
//this suppose to turn off one pin
            _led1 = new Pin(Port.PORT_B, 6, PinConfiguration.OUTPUT,
PinValue.LOW);
        }


       private void button2_Click(object sender, EventArgs e)
        {
//turn on second pin
            _led2 = new Pin(Port.PORT_B, 6, PinConfiguration.OUTPUT,
PinValue.HIGH);
        }

private void button5_Click(object sender, EventArgs e)
        {
//turn off second pin
            _led2 = new Pin(Port.PORT_B, 6, PinConfiguration.OUTPUT,
PinValue.LOW);
        }

//blow is some try

        private void button3_Click(object sender, EventArgs e)
        {
            _switch1 = new Pin(Port.PORT_G, 0,
PinConfiguration.INPUT_WITHOUT_PULLUP);
           
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            _switch1 = new Pin(Port.PORT_G, 0,
PinConfiguration.INPUT_WITHOUT_PULLUP);
            _switch2 = new Pin(Port.PORT_G, 3,
PinConfiguration.INPUT_WITHOUT_PULLUP);
            _switch3 = new Pin(Port.PORT_G, 5,
PinConfiguration.INPUT_WITHOUT_PULLUP);
            _switch4 = new Pin(Port.PORT_G, 6,
PinConfiguration.INPUT_WITHOUT_PULLUP);
            _switch5 = new Pin(Port.PORT_G, 7,
PinConfiguration.INPUT_WITHOUT_PULLUP);
            _switch6 = new Pin(Port.PORT_G, 11,
PinConfiguration.INPUT_WITHOUT_PULLUP);
        }

        private void button6_Click(object sender, EventArgs e)
        {
            checkBox1.Checked = ((_switch1.Value == PinValue.HIGH));
            checkBox1.Checked = ((_switch2.Value == PinValue.HIGH));
            checkBox1.Checked = ((_switch3.Value == PinValue.HIGH));
            checkBox1.Checked = ((_switch4.Value == PinValue.HIGH));
            checkBox1.Checked = ((_switch5.Value == PinValue.HIGH));
            checkBox1.Checked = ((_switch6.Value == PinValue.HIGH));
        }

       }
}


In the end, I need to control 6 pins on GPIO or SystemBus.

http://s29.postimg.org/gl5qswft3/mini2440.png
 
Maby this work but what is PORT A, B, G



If anyone can help me?


Thanks
Milan

domodom
What GPIO driver do you use ? (you can't use the GPIO pins without a
driver)

sundeep
hi Milans

Can help u out if u r interested to work on linux+Qt environment

milans
Sorry for diley I have some problem with my internet provider

I must use C#,

I fonund some GPIO library on internet.
I import them in project

using Mini2440.GPIO;
using System.IO.Ports;


 Where to download drivers, and how to include them in C# or Friendly?


If there some working example code, I need just to get HIGH and LOW on some
pinout!?
Two week can not to solve this. Help!

Sorry for stupid questions :-)

sundeep
Hi,

Can u help u out only in linux environment as per your app, as i dont have
experience in WinCE side.

milans
Hi, 


First I thing about Qt enviroment, I install qt on my laptop (using Linux
Mint), but I thing that is simplier with WinCe.

I have not expirience with Qt, so If you can help me that is also possible
solution.

Thanks

sundeep
Hi Milan

May i know exactly what your app want to develop?

milans
For start i need to get HIGH signal on 6 pins, and I must to be able to
controle then on/off. 

Second part is to turn it on /off in same time, to get some pulse or clock
signal. That signal control some other hardware part of project.

domodom
You should find everything you need on my website :
http://www.domodom.fr/spip/A-GPIO-driver-for-mini2440.html

Best regards

domdom

milans
Thank you Domdom,

I will try with this tutorial.