Hi my friends, for my project I need to use ADC and Digital input and digial outpins of the GPIO interface. I know that AIN0 to 4 are specified for ADC but I don't know which pins can be used for digital in and which pins can be used for digital out of the GPIO. I also have another question. What about Analoge out? If anyone live in the UK do u know from where I can buy 34pin GPIO cable and connectors. I would appreciate your help
GPIO input/output pins
To get access to AIN1, 2 and 3 will require patches to mainline kernels or use the Pengutronix BSP. All the GPIO pins can be used for input or output. The ones that are "free" to use on a mini2440 can be found on the schematic. For example, GPG1 (pin 17). For analogue out you need to drive a DAC from SPI or I2C. I have recently managed to talk to a 6 channel 8bit DAC via SPI (spidev). It has only taken me 3-4 weeks to sort it out :(
@davef.... Only 3-4 weeks!! You must be good? :o) I took about the same to get I2C working with 4 Microchip MCP3424 ADC's so I know your pain.... Most of the work was getting I2C to work under Android. :o) @ennh99. The easiest solution to analog out is get an I2C interfaced DAC from the likes of Maxim. There are also lots of SPI devices but as davef pointed out, getting this going is a lot harder. I2C just works I have found. In fact, once I got the drivers working in Android, my first code to talk to the ADC worked... SPI often needs a lot more work. As for the GPIO cable in the UK, you can get the connectors and cable from the likes of Farnell or RS Components. You can then make up the exact length you need. The connectors are 2mm pitch and not the same as a 3.5" IDE drive which is 2.54mm pitch. 2.5" drives with the older IDE interface are 2mm pitch. Just an idea to let you know what to look for. Dave...
Correction: All GPIO are input/output except GPA. All GPIO that go to the GPIO connector are input/output. 3-4 weeks . . . I don't think so! On the ATmega32 it was probably more like 3-4 hours. I was going to give up and talk via serial to the 8bit platform. The 8bit experience didn't give me much in the way of file handling capabilities.
Thanks Dave and davef I see most pins are named GPG, GPF and GPE . I can't find GPA pins but anywaye many thanks and how can I find out which pins are free ? I also use LabVIEW. using LabVIEW I can have acess to ADC,PWM and input and output pins but I am not sure whether it is possible to have access to I2C and SPI or not. Has anyone used LabVIEW with GPIO here? The biggest problem I have now to start my work is the female connectors and also the cable. I searched for them in Farnell or RS Components websites but I didn't find 34 pin (2mm pich spacing).What if I buy a 2.5" IDE cable (40 pin ) to 3.5" (44 pin) IDE cable connector and then cut the header and cable to make a 37 pin female connector?
I forgot something what should be the ribbon cable pitch spacing for 34pin connector(2mm)? 1.27 mm or 1mm . I think it should be 1mm. Am I correct?
Hi ennh99. I found the following 34 way 2mm pitch on the Farnell Singapore site. Nt checked the UK site but it might be on there. Stock code. 1435705 The cable you a correct with, it is 1mm pitch. The 1.27 is for the 2.54 (0.1") pitch connectors. If you check on the Andahammer.com website they have a kit for the some of the boards. Dave...
I bought cable kit with male/female connectors and cable on eBay. http://www.ebay.com/itm/Cable-Kit-for-Arm9-Mini2440-S3C2440-Development-...