PSoC™ 5, 3 & 1 Forum Discussions
Hi guys,
Im just trying to familiarise with the wondeful world of PSoC,
I have the PSoC 3210 Eval1 board and ive written a little code that makes an output (connected to an led) go high when an input is low and the output will go low when the input is high (switching off the led)
basically i have an output configured which is driven "strong" all the time and its connected via cable to an input which if its high the led will be off and if its low the led will illuminate
my code looks a little like this:
void main(void)
{
PRT0DR |= 0X10; //makes P0.4 HIGH, this provides a high signal for the input P0.0
while(1)
{
if (PRT0Dr & 0x01) //checks
{
PRT1DR &= ~0X01; //toggles output 1.0 which has led connected to show result
}
else
{
PRT1DR |= 0X01;
}
when i power the psoc board up and the input is low the led is on but when i make the input high the output led goes off, the problem is if i make the input low again the led wont illuminate again. I want to be able to make the led go on and off an infinite number of time depending on whether the input is high or low,
any help would be appreciated
thank you
Show LessI using CY8CKIT-009 Kit with CY8CKIT-001, Psoc CY8C3866AXI-040.
I can not schedule with psoc programmer from version 4.0 to 5.1, and when I try to use the psoc creator 2.1, it's wrong. When I use version 3.13.4 psoc programmer, he can program, but when using the vo pcoc creator 2.1 it says the device is being used by another program, and only he is open.
Thanks,
David.
Show LessAll: perhaps it is my limited cranial capacity, but I am unable to understand exactly how the data is processed into the FIFOs by the UART component and subsequently read out by a DMA.
1) There are two 4 byte FIFOs in each UDB and the UART is (duh) UDB-based. I assume one FIFO is used for the Rx, the other for Tx. Now, do we have a static 4 FIFO elements only for 8 bits, or can they be concatentated/subdivided (2 FIFO elements for 16 bits, etc.)?
2) How do you point the DMA to the correct spot in the FIFO, or is that simply task handled autonomously by the FIFO control logic?
3) What happens if you're trying to read data while the FIFO overruns...it the incoming data simply pre-empted or is the read-out data now corrupted.
4) What is the correct address to use for setting up the DMA. Is the base address PERIPHERAL _BASE? Or should I use UART_($number)_RXDATA_PTR? I assume the upper 16 bits are the UART_RXDATA_PTR.
5) In the UART header file, I notice there is a pointer to the RX_DATA buffer (UART_RXDATA_PTR) and a pointer to a pointer to type reg associated with the buffer (UART_RXDATA_REG). What is the latter used for? Call me dumb by why do you need a pointer to a pointer to the register? Is it used as an argument to some function somewhere?
I tried to find this granularity of data in the TRM documents but thus far I've been unable, so pardon me if any of these questions seem ignorant but I just don't know where to find the detailed information.
Show LessWith a little time on the demo board, did a board design with the PSoc3 68pin version.
I've actually been amazed at quickly getting up the JTAG, USB, A/D, D/A's, SPI, filter, various control registers and the like.
But now with little more than test routines and demo code, used more than 32% of flash space.
And our programmer still has to add a user interface !
Yes when push comes to shove, we'll pull off the PSoc3 and go with the deeper PSoc5, but why not have a PSoc3 with more flash ?
Have already gone thru configuration and whittled down the obvious, saving about 1k, but doubt will be able to get any better.
Any suggestions ?
Thanks
Show LessHi Guys,
First time poster/noob,
Ive got a PSoC 1 eval kit and I am generally used to the MSP430 but I started using PSoC programs,
I was just wondering how to use the _Read() and _Write() API's correctly.
I have an LED on Port1.0 and normally I would use the following to set port to High: PRT1DR &= ~0x01;
I changed the name of Port1.0 in the PSoC pinout page to led,
Can i simply just use the following to make the port pin high?
led_write(1);
thanks
Show LessI have a project using the UM I2Cm to communicate with the other devices on the bus. On this bus there is an RTC DS1307. My project is also using the BootLoaderI2C UM. The chip used is CY8C29466.
To develop the code I removed the bootloader and replaced it with the UM I2CHW which I renamed the same as the bootloader to make it compile. Now the code is using 78% of the available space. The problem seems to be related to the space used.
Now the problem: If I use the UM I2CHW I can read the RTC without any problem. If I put back the UM BootLdrI2C I can read my RTC 3 times without any problem and the next time the value returned by the RTC don't make any sense. If I reboot the circuit I will be able to read the RTC for 3 times sometimes 4 and sometimes on power-up the RTC values are wrong.
I check using a scope the I2C frame, just to make sure there is not any glitch on the bus. My architecture has multiple devices connected to it, so I disable any code related to the other devices leaving only the RTC without success.
I also tried to remove known working pieces of code unrelated to this problem and the problem disappeared. As I said before It seems space related.
Does anyone already encountered a problem like this?
Show LessA couple of days ago I posted a short description about the WavDAC8 component and app note AN69133 on our PSoC Insiders Blog. Someone suggested I post a link in the PSoC 3/5 forums, just in case not everyone reads our blog. You can find the PSoC Insiders Blog at this link.
Thanks,
Mark
Show Less Whenever I try to set a breakpoint the system answer with following message:
dbg.M0019: The following breakpoint cannot be set: 'C:\Program Files\Cypress\PSoC 3 FirstTouch Starter Kit\1.0\Firmware\ProximitySense\ProximitySense.cydsn\main.c:110'. Encountered error (File C:\Program Files\Cypress\PSoC 3 FirstTouch Starter Kit\1.0\Firmware\ProximitySense\ProximitySense.cydsn\main.c is not cached in Address->Line map)
Debugging in disassembly window however is working.
It seems, that code is compiled as a release version although I'm trying to set it to debug.
(trying because reopening build settings keep it always in release mode)
Regards
Robert Seczkowksi