Author |
Message |
cmichaelcouch Newbie
Joined: 23/10/2011 Location: United StatesPosts: 16 |
Posted: 09:39pm 16 Dec 2011 |
Copy link to clipboard |
Print this post |
|
Help with LED Pin testing.
Hey, guys! I just got my duionmite-mini thanks Don for help with that.
Anyway, I want to test digital i/o with an LED. Looks like only a few pins can be used without some conflict maybe Pins 1-4 and 13-18 have no conflicts if used as a digital out.
My question is how do I connect the LED? Do I need a pull up resistor to 3.3V or 5V? Or not.
I am thoroughly confuse about which GPIO 26 pin represents which MMBasic Setpin and Pin() command pin number.
I'd like to use a digital output pin that was NOT shared with any other interface.
Looking at the charts I have the numbers seem all jumbled up between the charts.
I guess what I most need to know is...
Is the GPIO 26 pin header numbered like this...
25 23 21 19 17 15 13 11 9 7 5 3 1
26 24 22 20 18 16 14 12 10 8 6 4 2
Looking face on into the connector with the components on the up side?
Now, which pins 1-4 and pins 13-18 in MMBasic and are those really the non-shared pins?
According to one chart I get this...
Duinomite-mini
MMbasic GPIO 26pin Header
Pin(1) pin 21
Pin(2) pin 19
Pin(3) pin 17
Pin(4) pin 15
Pin(13) pin 8
Pin(14) pin 10
Pin(15) pin 12
Pin(16) pin 14
Pin(17) pin 16
Pin(18) pin 18
Is this correct?
Michael CouchEdited by cmichaelcouch 2011-12-18 |
|
Olimex Senior Member
Joined: 02/10/2011 Location: BulgariaPosts: 226 |
Posted: 10:00pm 16 Dec 2011 |
Copy link to clipboard |
Print this post |
|
connect LED anode (+) longer leg to PIN(1) GPIO.21 and LED cathode (-) shorter leg through 330 ohm to GND i.e. PIN.25 then write this code
10 SETPIN 1,8
20 PIN(1) = 1: PAUSE 500
30 PIN(1) = 0: PAUSE 500
40 GOTO 20
type RUN and the LED with blink
download the user manual there is picture of the GPIO connector layout
|
|
cmichaelcouch Newbie
Joined: 23/10/2011 Location: United StatesPosts: 16 |
Posted: 10:44pm 16 Dec 2011 |
Copy link to clipboard |
Print this post |
|
Thanks a bunch. This is the info I needed.
I downloaded the manual but I missed the numbers on the left and right of the connector, duh.
Michael Couch |
|
cmichaelcouch Newbie
Joined: 23/10/2011 Location: United StatesPosts: 16 |
Posted: 09:14pm 17 Dec 2011 |
Copy link to clipboard |
Print this post |
|
Thanks for the help with testing an LED on the pin output.
Now can someone point me to the proper circuitry for testing Digital, analog, interrupt and frequency input in similar fashion. The pin numbers were a great help too.
This would be a great addition to the manual. Or even just as a separate file download somewhere.
Michael Couch |
|
Keith @
Senior Member
Joined: 19/06/2011 Location: AustraliaPosts: 167 |
Posted: 04:09am 18 Dec 2011 |
Copy link to clipboard |
Print this post |
|
Michael
have a look at this previous topic (MM)Pin tester for Maximite, 9 Dec, page 3 of the forum
or search for it
Keith The more we know, the more we know we don't know !
|
|
Keith @
Senior Member
Joined: 19/06/2011 Location: AustraliaPosts: 167 |
Posted: 04:17am 18 Dec 2011 |
Copy link to clipboard |
Print this post |
|
and from Don's website
All MaxiMite GPIO pins go straight to PIC32 ports and you can access them with the PIN() command in Basic
In DuinoMite GPIO pins 1,2,3,4,13,14,15,16,17,18 also go directly to PIC32 ports and can be used without interference, so you have 10 of 20 GPIOs absolutely independent, which you could use for your GPIO boards
GPIO 5,6 also can be used without interference if you do not use UEXT connector nor Arduino shields
Oother GPIOs also could be used but with some precautions
GPIO 7,8,9,10 are shared with SD-CARD and UEXT this means if you use internal flash DISK in 2.7 firmware and do not use UEXT these are also free to use
GPIO11,12 are shared with the external RS232 driver and connector so you can use them only if you do not use the external RS232 connector
GPIO19 is used as CS for UEXT so you can't use it when UEXT module is connected, if you do not use UEXT module you can use GPIO19 but note that it is weak pulled up and if VGA is connected it will be pulled down with 10K to Ground.
GPIO20 can't be used if VGA signal is generating
Generally we can assume roughly that on the GPIO, you lose 10 out of 20 signals if you do not use the shared signals. The more we know, the more we know we don't know !
|
|