- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi PSoCkes,
A Strange Problem is happening.
I/O port is breakdown slowly, one by one, a little by little.
I have been design the control board for measurement device now.
It's using Cy8C24794, first time it's been working.
When some change was adding, a port become not make output value.
It's not only one, 2 or 3, a few out port become does not work.
It's a Strong drive and StdCPU.
I wonder what's happend? And test by other board.
Both was programed a same test design, It's lit LED at first of main()
One is working, the other is not working.
What a possible causes was happend, Let me know.
Solved! Go to Solution.
- Labels:
-
PSoC 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is the LED connected to the pin and how are you setting the LED?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How is the LED connected to the pin and how are you setting the LED?
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You might consider posting your project for forum to look at.
If you have a port with mixed I/O in it, and are doing read modify writes
on the port, you need to use shadow registers. If you use the LED module
to control the :LED it handles that for you, otherwise you have to place and
use the shadow resgisters.
www.planetpsoc.com/psoc1-articles-digital/13-basics-of-psoc-gpio.html
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Unfortunately, I had mistaken with the previous post.
The port I/O was NOT mixed.
Input is assigned to port-2, Output is assigned to port-3 and 4.
There are no conflict of input and output.
I wonder the the shadow-register is not useful for this.
This is a fact.
At first, CS was broken and I was replace to P4-7.
Next, SCLK was broken.,
Port and Photocoupler Assignments
PORT No. | Usage | I/O | Remarks |
P2-0 | RDY | i | ADC Ready (fast change) |
P2-2 | MISO | i | ADC Data Out to MCU (fast change) |
P3-0 | INS-A0 | O | Slow Switch |
P3-2 | INS-A1 | O | Slow Switch |
P3-4 | ZERO SW | O | Slow Switch |
P3-6 | EXT SW | O | Slow Switch |
P4-0 | DC SW | O | Slow Switch |
P4-2 | Ex CS | O | ADC Chip Select (broken) |
P4-4 | SCLK | O | SPI SCLK 2KHz bit clock (broken) |
P4-6 | MOSI | O | ADC Data In from MCU |
P4-5 | MCLK | O | ADC Clock (2MHz) |
P4-7 | New CS | O | ADC Chip Select (replaced to here) |
Other pins of Port-4 are not use.>
http://skory.gylcomp.hu/alkatresz/P521.pdf
Using TLP521 for photocoupler
The LED has driving through resistor of 510 ohm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When strolling through your code I stumbled over your LED_ON / LED_Off macros. You are using read - modify - write to set the appropiate bits which might lead to problems. I strongly suggest you to use the LED-usermodule (to be found under the "Misc Digital" tab. The LED usermodule uses a shadow register internally and is quite useful to drive a oin under program control, not even LEDs.
Have a look here for read-modify-write http://www.cypress.com/?rID=39496
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll summarize present state and problem here.
There are 8 output pin and 2 input pin connected to the photocoupler.
Each output is driving current of 7mA.
Output pins and input pins are not mixed into a port.
No conflict will not be occur.
Total current consumption of PSoC board is around 100mA.
Now I would trying all output drive to be parse through digital-transister.
It's looks working well, but I'll have to watch for a while.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The input soide of the photo coupler, the LED, I assume you are driving from
an poutput, set to a "1", and that you have a current limiting R in series with
pin to LED in the photo coupler ? The R needs to be calculated such that if
all photo coupler LEDs are on the sum total of all the drive current meets
the specs -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
At a Vdd = 5, Iol = 10 mA, Voh = Vdd - 1.0 = 4.0
So Iled = 4.0 / 510 =~ 7.8 mA. Thats sort of a nominal number as you do not
have worst case Vled, Vdd, temperature, etc....
The port specs are
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This might be the problem.
On products, It be make pile of claims.
Even if small number, will be waste the PCB board and Chips.
I had review a book of PSoC1 then find a description like this.
Output current ability of GPIO is IOH= 40mA but it using by Analog-output.
Besides, On digital-output is IOH=10mA. What is the truth?
If so, 7.3mA might marginal value in my case.
Because have to consider over-shoot or under-shoot.
Next point is characteristics of Photocoupler LED.
Every diode has a reverse current characteristic.
I had checking it.
When the falling edge,
The difference of forward voltage with reverse voltage is 3.88+1.64=5.52v.
Can it calculated as 10.38mA? (as 7.3mA for forward)
Is it one possibility of this ploblem? I don't know.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The analog output buffer can drive a 32 ohm load to Vdd/2 + 1.3V, for 5V Vdd
thats 3.8 / 32 =~ 100 mA. The 40 mA I think is related to Ioh spec, 8 loads,
2 ports, 4 loads/port max.
The Ioh spec is total of 8 loads, 4 loads per port max, for a total of 80 mA.
The reverse current is irrelative unless you have very large undershoot, and then
you would treat it not as a summation of currents, but another case.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure I understand source of 750 nS of undershoot in first scope picture,
that cannot be carrier recombination lifetime in LED, way too long I
would think.
2'ond picture undershoot looks like "normal" parasitic LC effects.
I think I will take a look at that first case myself. Curious.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats what took me by surprise, the last pic shows a Trr of ~ 80 nS, whereas
the LED ~ 750 nS, I just did not imagine an LED could be that bad in carrier
recombination.
Regards, Dana.