PSoC™ 4 Forum Discussions
Hi,
I just received a PSoC 4 unit to evaluate for a potential project/product. I installed creator 2.2 and I have been looking at videos and examples online.
I tried creating a simple rs232 comunication test. Receive something from an external source and then append a little string to it and send it back.
I must be missing something, bacause I can't get it to work. I assigned TX to P0.5 and RxP0.4.
The Rx input pin is set to High Impidance Digital [low(0)]
Tx is set to Resistive pull up. [I tried different options, not sure what to use].
I would appreciate any help I could get. Also any information about training resources.
The C code looks like this
#include <device.h>
void main()
{
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
uint8 ch;
UART_1_Start();
UART_1_PutString("Testing RS232 :");
/* CyGlobalIntEnable; */ /* Uncomment this line to enable global interrupts. */
for(;;)
{
/* Place your application code here. */
ch = UART_1_GetChar();//UartGetChar();
//printf("test %c \n",ch);
if (0u != ch)
{
UART_1_PutString("got this ="+ch);
}
}
}
Hi everybody,
in my psoc4 proj. template with PSOC 4 pioneer kit I'm trying to test the capability of get a external time base tick for RTC purpose, getting it from mains power zero cross (50 Hz, e.g.).
To scale it into seconds tick, I've routed the I/O with ext. freq. to a clock with design-wide clock editor :
.cydwr tab -> add design-wide clock -> clock type existing -> source pin -> select pin -> I/O pin.
and the new clock signal routed into a timer counter block, with a period equal the ext. freq. (e.g. 50), enabling the overflow interrupt, so I expect that interrupt comes every second (time for 50 pulses with 50 Hz is 1 second).
This approach doesn't works.
With some debug I/Os I've done some test :
- with a dig. output pin connected to Timer's overflow pin and a toggle I/O driven by Timer isr I've checked a ~ 5kHz freq. (not 1 Hz, as I expecetd).
- if I check through a flip-flop the freq. of clock generated by ext. I/O, this is 50 Hz.
- if I use an int. clock with 50 Hz freq. instead the ext. 50 Hz, Timer's OV interrupt is right and drives an isr every second.
There is someone with an idea where I was wrong or with any suggestion ?
Thanks in advance.
Fabio
Are someone with an idea where I woas wrong ?
Show LessHi All,
As you may know, PSoC 4 has limited flash when compared with PSoC 3 and PSoC 5LP. Using the GCC print and sprintf functions takes up ~30k of flash, which easily overflows PSoC 4’s flash space.To avoid this, we have developed the tinyprintf component and an example project showing its use.
The component supports d, u, c, x, X, and s formats. This component uses an open source printf solution created by Spare Time Labs 2.0. DRSW found this implementation on github. You can find the source at https://github.com/cjlano/tinyprintf. The solution is distributed under the BSD license. This basically means that the solution is to be taken as is and the author is not responsible under any circumstances for its use.
The project builds with 1656 bytes flash used with the UART and tinyprintf components initialized. With all the examples the project takes 3912 bytes of flash.
Regards,
Asha
Show Lesshi,
recently i bought a PSoC 4 Pioneer Kit (CY8CKIT-042) board and i want to communicate with ds2431 which is a one wire EEPROM chip which needs a one wire library.
is there a one wire soft ware library available with the psoc4 or hardware method?
Show Less
Does anyone know what this means, and how to solve it?
Hello folks,
some of you may have seen the "100 projects in 100 days" promotion that is currently ongoing on element14.com, where we are releasing 1 new example project daily, targetted to the PSoC 4 Pioneer Kit + arduino sheilds, adapter boards, sensors, etc...
We just reached the half-way point (first 50 projects) and I wanted to highlight those here.
Please goto
First-50 Summary
I wanted to recap and summarize what we have done so far. In our first 50 projects we’ve showcased the flexibility and mixed-signal interoperability of the PSoC 4. The projects have included:
- Starter Designs – simple projects to get you started with the PSoC 4 Pioneer Kit
- Digital Designs – Numerous digital designs across many applications
- LED Control
- Digital Sensors
- Motor control and Robotics
- PWMs
- Audio
- Analog Designs
- ADC examples showcasing the powerful SARADC on the PSoC 4
- Communication Designs, including
- Wired – SPI, UART, I2C, Ethernet
- Wireless – Xbee, Bluetooth, WiFi
- Display Designs, including
- 7 Segment display
- Graphics LCD display
- Character LCD display
- Touch Sensing Designs, including
- CapSense (capacitive touch)
- Proximity (capacitive proximity)
- Resistive touch
Whats in store for the Next-50?
Over the coming weeks we will be releasing even more projects detailing specific features of the PSoC 4 and providing more complex examples. The following list is an example of those projects:
- More LED Control designs (LED Blinky!)
- More digital and analog sensors
- More analog-heavy designs, using the OpAmps, Comparators and other on-chip Analog resources
- More complex designs – complete systems, similar to the ‘Android Phone Controlled Robot’
What would you like to see?
As we move through the last 50 project we would love to hear from the community on projects they would like to see, shields they would like to see used, and applications that we might have missed. Please post those comments below and we will look into scheduling those examples for the future.
Download all of the first-50 Projects
In the post below I’ve provided you two downloads. The first download includes the text from the forum post for each example (DOC and PDF), the example projects, and project images. The second download is simply the text for the forum post (DOC and PDF).
- Large Download (Dropbox Link)
Please feel free to download the first 50 examples, copy them to your computer, make a torrent and start seeding, make CDs and pass them out to your friends, or give them away as early Christmas gifts.
Show LessAn attempt has been made to implement an Incremental ADC on PSoC4, based on the Topology No. 3 provided by Dave Van Ess in the below article in EE Times:
http://electronicdesign.com/analog/my-favorite-modulator-only-needs-leftover-components
Attached is the PSoC Creator project demonstrating this. Though a 16-bit result is generated, the ADC result is reduced to 12-bit and displayed to reduce noise.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Steps to test this project on a PSoC4 Pioneer Kit (CY8CKIT-042):
1) Build this project and program it into the Pioneer kit.
2) As shown in the scehmatic, make the following connections to complete the Delta Sigma modulator: (a) Connect an external 100K resistor between P0[7] and P0[4]. (b) Connect a 0.1 nF capacitor between P0[4] and ground.
3) Connect an Analog Input to P0[5].
4) Connect P4[1](on J3) of PSoC4 to P12[6] of PSoC5LP(J8). This connection is for sending ADC result using PSoC4 UART through PSoC5LP(which acts as USBUART bridge) to PC.
5) Connect USBmini cable betwee the Pioneer kit and PC.
6) Open a terminal application on PC(such as Hyperterminal/Teraterm etc). In the terminal application, select the port corresponding to the name "KitProg USB-UART". Set Baud Rate = 115200, Data = 8 bit, Parity = None, Stop Bit =1, Flow Control = None.
7) Vary the Analog input between 0 - Vdd, and observe the 12-bit result on the terminal application
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Though 4 UDBs have been used in this project, it can be reduced to just 1 UDB/TCPWM block if the PWM is replaced using the clock dividers available in PSoC4 and just an 8-bit counter is used(the MSB 8-bits of the counter can be implemented as a firmware byte which is incremented on the 8-bit counter's interrupts).
Thanks & Regards,
Prem Sai