- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi everyone, I have been working with psoc for a while (5 years), and with psoc 1 I changed once a PWM output through software dinamically, I mean, in the block diagram I set the output to a certain pin and then in the code I changed it to another pin when I needed it. But rigth now I am working with a Psoc 4 kit wich has the CY8C4125AXI483 and I cannot find how to do the same thing with this psoc, I have read the GPIO manuals and the TRM and I cannot find it. It is possible to do it??? Thanks in advace.
Ale
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried following schematics
Rev.2 using output enable
This seemed to be almost OK, but time to time I observed following symptom
Rev.3 using AND gates
The wave form was as clear as the MUX version.
So I suppose using AND and Control_Reg seems to be a recommended method, so far.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried this with CY8CKIT-044.
schematic
pin
main.c
====================
#include "project.h"
int main(void)
{
int i = 0 ;
CyGlobalIntEnable; /* Enable global interrupts. */
PWM_Start() ;
for(;;) {
Control_Reg_Write(i) ;
i = (i + 1) % 3 ; /* 0, 1, 2, 0, ... */
CyDelay(10) ;
}
}
====================
the oscilloscope screen
attached is the test project.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks I thought in that too, but I have read in the multiplexer (MUX) datasheet that it makes certain delay (microseconds) for the signals passing through it and for my application that is not an option. Don't you have any other idea. The pulse I want to generate is a 100 kHz pulse but with a Ton=50ns, that is why the MUX is not an option. Thank you!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I tried following schematics
Rev.2 using output enable
This seemed to be almost OK, but time to time I observed following symptom
Rev.3 using AND gates
The wave form was as clear as the MUX version.
So I suppose using AND and Control_Reg seems to be a recommended method, so far.
moto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks moto, I will try tomorrow and let you know how it went!!! Thanks!!!!