That is all working quite well for me.
How do I set a pin high or low? I have tried:
Pins[RED_LED_PIN].function(PINX_GPIO); // RED_LED_PIN = 3
Pins[RED_LED_PIN].drive();
Pins[RED_LED_PIN] = TRUE;
Pins[RED_LED_PIN] = 1;
Pins[RED_LED_PIN].set(true);
Dave
I/O pin interrupt
Re: I/O pin interrupt
uh... that's strange. Setting a pin is just
You sure you're working with the correct pin number?
Code: Select all
Pins[YOUR_PIN_NUMBER_HERE] = 0; // make pin go low
Pins[YOUR_PIN_NUMBER_HERE] = 1; // make pin go high
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: I/O pin interrupt
"You sure you're working with the correct pin number?"
Pretty sure, yeah... I am using pins 3 and 4 of J8 on a SLB2E Carrier Board and measuring the voltage against pin 11 of J8 (GND).
I am currently trying this code with all 4 possible combinations and then measuring the voltage between 3 & 11 and 4 & 11.
Pin 3 seems fine, pin 4 seems kinda wacky...
I have tried this with a couple of different SLB2E boards and gotten the same results.
Dave
Pretty sure, yeah... I am using pins 3 and 4 of J8 on a SLB2E Carrier Board and measuring the voltage against pin 11 of J8 (GND).
I am currently trying this code with all 4 possible combinations and then measuring the voltage between 3 & 11 and 4 & 11.
Code: Select all
Pins[3].function(PINX_GPIO);
Pins[4].function(PINX_GPIO);
Pins[3] = x;
Pins[4] = y;
Pin values | Pin Voltage (ref pin 11)
(x,y) | 3 | 4
-----------------------------
(0.0) | 0v | 0v
(0,1) | 0v | 0.58v
(1,0) | 3.3v | 1.5v
(1,1) | 3.3v | 3.3v
I have tried this with a couple of different SLB2E boards and gotten the same results.
Dave
Re: I/O pin interrupt
That worked... voltages on pin 4 are now the expected values for 0 and 1.
Dave
Dave
Re: I/O pin interrupt
Yea, pin 4 is tied to the CTS pins of the RS-232 buffer or the USB-serial bridge if that jumper is connected. Hence where your troubles came from. A'int hardware fun?
-Dan
-Dan
Dan Ciliske
Project Engineer
Netburner, Inc
Project Engineer
Netburner, Inc
Re: I/O pin interrupt
It is fun... but only when you get great support like you guys provide.
I be like'n da NetBurner. (And I let my bosses know that too
Dave
I be like'n da NetBurner. (And I let my bosses know that too
Dave