PSoC™ Creator & Designer Forum Discussions
I've over-ridden the _write() function so that printf output is directed to a device (one of several UARTs) of my choosing. The _write() method takes a file descriptor int which is used to specific which device the output is bound for.
However, I have several 'devices' that I'd like to send output to with fprintf, thus think I need to create a FILE object and set the file descriptor. Unfortunately, calling fprintf with my own FILE objects is resulting in a call to _write(). I've even tried to copy stderr as follows without success.
Any ideas?
Thanks,
Chris
main() {
FILE fobj;
memcpy(&fobj, stderr, sizeof(FILE))
fobj._file = FD_UART_2;
fprintf(&fobj,"something\n");
} // main
int _write(int file, char *ptr, int len) {
LED_Y_Write(~LED_Y_Read()); // how I know its not getting called w/fprintf
switch(file) {
case stdout:
case stderr :
UART_1_PutArray(ptr, len);
break;
case FD_UART_2 :
UART_2_PutArray(ptr, len);
break;
} // switch
} // _write
Show LessHello all,
Greetings for the day.
I am just starting to understand the PSoC Creator, for that I had it downloaded from the Cypress's site & now it's showing me this message as in screenshot.
Guide me with it.
Also I tried to configure the Matrix kepad with it but as it just showed Capsense_CSD block, I was unable to get the designing or visual interface as I used to get with the PSoC 1 in PSoC designer 5.4.
Where can I see that matrix pattern configured & where can I define the specific pins for the each row/column?
In an overall I want to have basic idea about configuring the components, having them visualized, & help on how to check or interface them with Pioneer kit? As in PSoC 1 i had a ref board for checkong BTNs & Sliders, but here i wish to configure a Matrix Keypad how should I proceed? Please give me guidelines to work with PSoC Creator & PSoC 4 (CY8CKIT042 Pioneer kit).
Please mind I'm switching from PSoC 1 to PSoC 4, directly.
Thanks & Regards-
Amit
Show LessIn the interest of using a UART without the overhead of a fully-featured SCB component, may I present the Simple_UART component?
Feedback is appreciated. What features do you like? What do you miss from the SCB?
This is a zipped archive. To add it to your project, first extract the CYWA_Simple_UART_v1_0.cycomp. Then, in PSoC Creator, go to the Workspace Explorer
dock and click the vertical Components
tab. Right click your Project '<myProj>'
->, Import Component...
. Select Import from archive:
radio button. Press...
button to do a file search for the archive.
Now the component will be on your Component Catalog
dock, on the Community
tab.
By default, Creator doesn't trust Customizers that don't come from Cypress, so you may have to add the component directory to a whitelist. Titlebar menu Tools
-> Options...
-> Design Entry
-> Component Security
There is a new update for Creator 3.1 which corrects some errors in components. Very useful.
But one question remains: How can I get the update into Creator 3.2 early access?
Bob
Show LessI am trying to create a component with a variable width, similar to the 'Basic Counter' in the Utility subfolder of the Cypress library. This component allows one to change the counter width by changing the 'Widch' parameter of the component instance. When this parameter value is changed the corresponding counter ouput bus on the schematic symbol is updated to reflect the new bus size.
How can I implement this functionality on a symbol that I create? I tried using the following steps.
1. Add Component Item using Symbol Wizard
2. Create a symbol named 'Foo' and add an input terminal named 'clock' and an output terminal named 'count'
3. Right-click on blank part of symbol Foo sheet, then select 'Symbol Parameters...'
4. Add parameter 'Size' of type int and set value to 4. Close Parameters Definition dialog.
5. Double-click 'count' terminal to edit.
6. This is where I want to set the range of the 'count' symbol terminal to be 'Size-1:0'. However, I have no way to use an expression to set either the left or right index.
The Warp verilog reference gives the following example. I tried to generate a symbol from the following code but was not successful.
Does anyone know how to create symbols with terminals who's width changes with a parameter value???
Hello all,
I have implemented the Capsense slider as a fan regulator; while doing that I have used capacitors to control the fans speed.
The problem I am facing is While 1st 3 (1=C1, 2=C2, 3=C1||C2) stages work fine (no spark in relay); but @ final stage when no capacitor is implemented there is a Spark inside the relay employed to run the fan @ max. speed.
Why would it happen? what should I do to correct it? Do I need to add another small Capacitor in parallel to final stage as the load driven is Inductive?
Please guide.
Thanks & Regards-
Amit
Show LessI am trying to create a UDB element with the UDB Editor, but I can't figure out how to bring P0 and P1 in and out. I don't see how that is done and those ports don't show up on the component symbol.
I looked through the UDB Editor Guide and poked around in the Editor, but couldn't find anything.
Has someone else figured out how that works?
thanks,
Doug
Show Less