I could be wrong but when I first power the G120 board the I/O pins all appear to pull high until my code is loading into the processor. Is there anyway to change this. I have several devices that have enable (high) that I don’t want powered until all my code has finished loading. Any thoughts?
Add pull-down resistors.
PIN High Assignment not 1 nor 0. it is High impedance, so that pulling up with improve a 1 (resistor to Vcc), or pulling down will be 0 ! (Resistor to Vss)
We use 1 pulled down port as indicator for the host PCB that main app is starting and communication and devices are initialized. As long as this pin is low floating pin’s and other ghost data is ignored.
Sorry about this newbie question, could you explain how add this resistor to an output?
I have tried adding a 10K Ohm between the output and ground, but it does nothing.
I have a LED (Grn 3v) and a 33 Ohm resistor connected to the output also.
The LED always turn on for a while when reset unit.
Can you draw a schematics of your setup?
@ Mogollon -
2 configurations are possible :
- Output as Pull-Up, that means when set to 0, the output is open, and when set to 1, it is grounded, so that you need a resistor between VDD and the output pin (Pull-up resistor) to avoid Vdd and GND to create shortcut,
- Output as Pull-down, means when set to 0, the output is open, and when set to 1, it is Vdd, so that you need a resistor between the output pin and GND (Puul-down) to avoid as well Vdd and GND to create a shortcut.
VDD => Rohm => Led => OUTPUT PIN
OUTPUT PIN => Led => Rohm => GND
Very texutal yes, but representative of what it could be…
It’s what I got, maybe I need a bigger resistor?
RA is 33Ohm
RD is my PullDown resistor 10KOhm
When the main function executes the led goes off, I think at that point the MCU set this port as an output. On reset or power on, the LED light up for a while.
I see my mistake now, the pulldown resistor must be in series with the LED not parallel
And calculate a new value for it, it doesn’t light up very well.
Thanks so much!
@ Mogollon -
Why do you use and RD + and RA ?
To calculate the right RA value, apply this :
LED voltage : Vled
LED nominal current : Iled
VDD : Vdd
RA = (Vdd - Vled) / Iled
Vled = 1.8V
ILed = 5 mA
Vdd = 3.3V
RA = (3.3 - 1.8) / 0.005 = 1.5 / 0.005 = 300 ohm
No RD needed I think…
I was thinking that the pull down has to be in parallel that is why I have that one there, now I now that is wrong.
If I use just a 300Ohm resistor I get the LED on between resets, the pulldown has to be bigger than that.
I used the 10KOhm, it keeps the LED off between resets but when I turn the output on it doesn’t light to much just a little, so maybe I need to calculate the sweet spot for the pulldown resistor.
What I don’t understand is why some ports has this behavior when I power on or reset the device, others ports seems to work fine on power cycles with the same LED and resistor.
I was wondering if there is a workaround to make all the ports work in the same way (0v when cycling power).
So far P2.5, P2.3 P2.2 have the issue on power cycle.
P1.10 doesn’t have this issue.
I’m using G120HDR
I think you are right, it has nothing to do with the pull down resistor.
Seem like those three pins (P2.2,P2.3,P2.5) has shared functions of CLK, or HSync or VSync, and those functions doesn’t overwrite on startup or shutdown.
The other pin P1.10 (and almost all), after I set it the first time as an output it seems to remember that is an output between resets or power up (doesn’t show any voltage).
@ brice_chart - Adding a pullup or pulldown resistor will only work if the chip I/O is not active (being driven). Some FPGA devices have a pin that you can pull high or pull low (tie to VCC or tie to GND) to force the unprogrammed default for all I/O to either come up all high or all low. Some chips automatically come up at tristate.
You will need to refer to the chip datasheet in order to find the status.