PSoC™ 4 Forum Discussions
I am trying to use the quad decoder as a simple up/down counter. I have a question on how the triggercommand should be configered.
I have tried the example and it works. I do have a encoder hooked up and have verified the both signals A & B are correct as in phase, amplitude, etc.
I am not using the interrupt but trying to read the counter with QuadDec_ReadCounter();. But it is not changing.
I have set the decoder as below.
QuadDec_Stop();
QuadDec_Init();
QuadDec_SetMode(QuadDec_MODE_QUAD);
QuadDec_SetQDMode(QuadDec_MODE_X4);
QuadDec_SetOneShot(0);
QuadDec_SetCounterMode(QuadDec_COUNT_UPDOWN0);
QuadDec_TriggerCommand(QuadDec_MASK, QuadDec_CMD_CAPTURE);
//Read count
EncoderCount = QuadDec_ReadCounter();
printf("Encoder Couunter = %lu\r\n",EncoderCount);
Thanks
Mark
Show LessHi,
In my project I am using the CY8CKIT-049-42XX prototype kit, my program consists of three UART blocks, one timer block, and one bootloader blocks.
One UART block connects to a RN171 wifi module, while the other to a serial TTL camera, the third block connects to PC (programmer USB port).
When building I get these error...
"Resource limit: Maximum number of UDB Macrocells exceeded (max=32, needed=43)."
"Resource limit: Maximum number of UDB Unique Pterms exceeded (max=64, needed=87)."
"Resource limit: Maximum number of UDB Datapath Cells exceeded (max=4, needed=5)."
"Resource limit: Maximum number of UDB Status Cells exceeded (max=4, needed=6)."
Please can anyone tell me how I can solve this...I hope the hardware does not need to be changed.
Please see attached workspace bundle.
thanks
a
Show LessHello Cypress World:
I would like to know why the CYBLE-022001 UART does not transfer data properly.
For example, when the UART function SCB_1_UartPutString("Test\r\n"); is called periodically (e.g. every 50 milliseconds), the data transferred from the UART is often erroneous with only a few characters (e.g. Te) transferred. Depending on how often the data is transferred, the UART will often only set the Tx line low for about 500 microseconds and then back high. The UART settings are: Mode=Standard, Direction=TX+RX, Baud rate=115200 (actual 115385), Data bits=8, Parity=None, Stop bits=1, Oversampling=16.
Thank you in advance for your response,
Tim Ball
TDB Consulting
Show LessHi,
I am using the CY8CKIT-049-42XX PSOC 4 prototyping kit to develop a program to control a RN171 wifi module (http://www.microchip.com/wwwproducts/Devices.aspx?product=RN171), the program uses the following interrupts.
1. Timer 1
2. USART (USB -Serial )
3. USART (Tx-P1.3,Rx-P1.4)
The program works very well as expected when programmed from the host bootloader , all the interrupts are received correctly.
However when the prototype kit is powered up from an external power supply, the program just hangs up, and does to come to the for(;;) loop, this I know because pressing the push button does not bring the kit into program mode (LED does not flash), but when the same is done after programming from the host bootloader the kit comes into program mode when the push button is pressed.
Please see the attached workspace bundle for reference.
The main file code and the timer1 interrupt handler is given below,
int main()
{
int a;
/* Enable the global interrupt */
CyGlobalIntEnable;
//TimerISR_Start();
TimerISR_StartEx(InterruptHandler);
//TimerISR_Enable();
Timer_1_Start();
PCUART_Start();
HC05UART_Start();
LED_Write(0);
//configure as web clientInitNetworkProfiles();
RN171IdleTime=200;
//RN171WifiJoin.Task=RN171WIFIJOIN_INIT;
//transfer uart data to wifi
//RN171UARTMode=2;
Control.Task=1;
PCUART_UartPutString("started\n\r");
for(;;)
{
application();
if(!SW1_Read()) {
LED_Write(1);
CySoftwareReset();
}
}
}
/*******************************************************************************
* Define Interrupt service routine and allocate an vector to the Interrupt
********************************************************************************/
CY_ISR(InterruptHandler)
{
/* Read Status register in order to clear the sticky Terminal Count (TC) bit
* in the status register. Note that the function is not called, but rather
* the status is read directly.
*/
Timer_1_STATUS;
//Timer_1_ClearFIFO();
//TimerISR_ClearPending();
//timer interrupts at 2 msec ticks
//ThwScanTimeout++;
RN171WaitTimeout++;
RN171ScanTimeout++;
if (RN171RcvCntr!=0){
RN171RcvTimeout++;
if (RN171RcvTimeout>RN171IdleTime){
RN171RcvLen=RN171RcvCntr;
//clear timeout condition
RN171RcvCntr=0;
RN171RcvTimeout=0;
//set ready flag
RN171DataReadyFlg=1;
}
}
//timeout, also triggers data ready flag indicating packet is ready
if (UARTRcvCntr!=0){
UARTRcvTimeout++;
if (UARTRcvTimeout>BTH_IDLE_TIMEOUT){
rcvlen=UARTRcvCntr;
//clear timeout condition
UARTRcvCntr=0;
UARTRcvTimeout=0;
//set ready flag
UARTDataReadyFlg=1;
}
}
}
Could anyone help me please???, I am sure something basic is missing here...
thanks
a
Show Less
Hello,
We have been using PSOC ble custom profile to collect around 40 bytes of sensor data from micropython board using UART with psoc ble. We are sending the data using the psoc BLE to Cysmart windows app. However when we power the psoc with the usb cable we can receive the updated streaming data but not when batterey powered. We can only read data once when we batterey power it. Can you please help us resolve this problem.
Further we used ASUS dongle in raspberry pi and raspbian OS to receive the BLE data. We can receive not more than 20 bytes of data on raspberry pi. If the MTU is more than 23 bytes we cannot receive the data. However we can receive as much as 512 bytes on Cysmart. We tried to search for the reason and solution for it but we couldnot find any. Can you explain us about the situation we are facing?
Thanks in advance.
Suman
Show LessI cannot seem to find an example for serial in parallel out conversion. this is with respect to the prototyping kit platform. Any help is appreciated
Show LessHello all,
Greetings for the day.
I am trying to configure a 4x4 Matrix Keypad using PSoC Creator 3.2 with the help of PSoC 4 Pioneer kit (i. e. mentioned to ACK device used).
While doing that I have done some part, just wanted if I am on right track or not.
As of yet my test board with 4x4 Matrix Keys implemented hasn't arrived, I'm unable to check it's o/p to verify the program. That's why I wanted to check whether I'm going ok or not.
I'm attaching my project down here, please go through it & let me know my status; guide me if I'm going wrong.
If anyone have 4x4 board to test it, please do that & convey the results.
Waiting for your positive response & valuable guidance.
Thanks & Regards-
Amit
Show LessHi, i'm new on designing ble applications, so i'm going to explain as possible as i can what i want to do.
I got a CY8CKIT-042-BLE and did the laboratories from the kit webpage. I re-arranged pin out to turn the rgb led and i worked find. I created an application on windows phone to send data and turn rgb led on with a button but i doesn't work, I read many articles to realize how to do that but i can not still find the solution.
If any of you can share an example of iOS, Android or Windows Phone about how to send data (in this case like the Cypress iOS application) to turn the rgb led on, I appreciate so much.
Best regards,
Albert.
Show LessHello,
I am trying to use Cypress BLE as a master to connect with different devices such as Heartrate monitoring, blood pressure and so forth (all SIG approved profile), and I have some question:
Which profile do I have to use in central?
Do you have any example code for master which it can connect to different profile?
Where can I download source code for BLE Dongle CySmart 1.1.0.17.HEX?
Cheers
Show LessFirst post here,
We're trying to locate the SCB_Bootloader.cywrk project which is located on page 19 of the PSoC 4 Prototyping Kit Guide, Doc. #: 001-90711 Rev. *G. The project uses the PC's USB as a comm ports for downloading code and is also nice enough to flash a led.
http://www.cypress.com/file/141306/download
The problem is that PSoC Creater does not have this example listed and I can not find it on Cypress's web site. There are other boot-loaders examples for the PSoC 4, but they use the I2C. Were just trying to get the basics down of this kit and would appreciate any help.
Thanks,
John C.
Show Less