PSoC™ 4 Forum Discussions
I'm trying to make a QR Code Scanner & Decoder.
I referred some material on Atmel's "SAM4S PIR Camera Reference Design" which uses a combination of PIR sensor + CMOS sensor to detect motion & take a VGA-compatible snapshot respectively.
The CY8CKIT-048 also has a PIR sensor. I want to know if a CMOS sensor can be used to obtain a similar functionality.
My primary objective is a QR code scanner, so, higher resolution is not a necessity.
Also, please let me know if there are other ways to do so using the CY8CKIT-048 or any other PSoC.
====================================================================================
Links to files:
"AT01180: Barcode and QR code scanner User Guide" - http://www.atmel.com/tools/SAM4S-WPIR-RD.aspx?tab=documents
Show LessHello everyone: I am working on a project in which I want to use two accelerometers on a PSOC4 BLE. I worked with an example where an I2C is connected a single accelerometer. I want to add another accelerometer. Could anyone point to me a PSOC example that could help me understand how to connect multiple sensors on an I2C. I read about I2C bus and about master/slave concept, but did not understand a lot.
It would be great if you could also answer following question:
1. when should I use master I2C and when a slave I2C?
2. is it possible to have two I2C each with one accelerometer connected to four pins on PSOC? right now I have one I2C with SCL going in pin 3[5] and SDA going in pin 3[4].
Thanks you in advance:
Apoorva
Show LessDear all,
I noticed using the very useful code snippet WriteUserSFlash for writing data to user flash prevents SW TX UART from working.
I understood that writing to user flash requires changing the system clock and SW TX UART requires a call to CyDelayFreq after this clock modification. But I do not know what to provide as a parameter, I tried 0 as this is the original value but it did not solve the problem.
I also imagine that as the system clock is restored after writing, thus there might be no impact as long as one does not use the SW TX UART component when the system clock is changed.
I attached a sample test derived from the original code snippet to demonstrate the issue on BLE pioneer kit.
Is there some information I missed that helps getting those two fellows working together ?
Thanks a lot for your help,
Maximilien.
Show LessDear,
I was doing cy8c4125 the bootloader, did not use the official components, encountered some problems:
1, how to do address remapping in cy8c4125 chip, as if the official did not give specific registers;
2, how to do the address jump.
3, how to understand. Scat file。
Hi,
I have tried looking for documentation regarding what does the coloring of clock sources mean in PSoC Top Design.
See the image attached.
The new clock color is white but after compilation it changes to purple. What do these colors signify?
-Best Regards
Show LessIn order to reduce the interference, I try to control the channel mapping.
Once the device is connected, try to execute the following.
But sometime it will failed report HCI 0x28 instant change.
So how to improve this?
case CYBLE_EVT_GAP_DEVICE_CONNECTED:
DBG_PRINTF("CYBLE_EVT_GAP_DEVICE_CONNECTED: %x \r\n", cyBle_connHandle.bdHandle);
//CyBle_GapAddDeviceToWhiteList(&peerAddr[deviceN]);
if(channelMap==0){
uint8 b[]={0xffu,0xffu,0x0u,0x0u,0x10u};
CyBle_GapcSetHostChannelClassification(b);
}else{
uint8 b[]={0x1u,0x0u,0xffu,0xffu,0x10u};
CyBle_GapcSetHostChannelClassification(b);
}
Hello, I have noticed that a new release of BLE Component for PSoC has been documented at http://www.cypress.com/file/334116/download
but I am unable to upgrade my V3.20 component in PSoC.
I am interested in using the Software HCI mode, to create a small test application for radio type approval.
Can you tell me when this version will be released ?
I want to use CyBle_HciSendPacket() function to set the radio in modulated and unmodulated TX mode on a single frequency (Low,Medium,High channel) and in continuous receive modes.
Do you have a list of available HCI commands, an Application note that list the commands, or an existing example program ?
Thanks for your support.
Show LessWe are looking where to get best prices for moderate MoQ (1k-2k pieces per order) to buy Cypress' CYBLE-012011-00? We are now waiting for Mouser to get the stock and they offer best prices we have been able to find on the market (4.29EUR w/o VAT for MOQ=1k on date: 16.12.2016).
Have anyone spotted better prices from any other reseller? We prefer EU reseller/distributer.
Show LessI'm still learning the in's and out's of C programing so this maybe a very obvious question. I have a Timer that calls an ISR. In my ISR I have this code:
clockCounter++;
if (clockCounter == 1600) {
Increment_Quadrant_LED_OFF_Timer();
Increment_Quadrant_Reset_Timer();
Increment_Power_Off_Timer();
clockCounter = 0;
}
So that every second it calls those three methods to increment some other timer counters. My though process is that this is the cleanest way to handle keeping track of the timers in the appropriate other classes.
Here is what my Increment_Quadrant_LED_OFF_Timer()
function looks like:
void Increment_Quadrant_LED_OFF_Timer()
{
if (!quadrant_LED_OFF_timer_ENABLED) {
return;
}
quadrant_LED_OFF_timer_counter++;
if (quadrant_LED_OFF_timer_counter >= (QUADRANT_LED_OFF_TIMER_DURATION / DEBUG_DIVIDER)) {
Quadrant_LED_OFF_Timer_Did_Expire();
}
}
Where quadrant_LED_OFF_timer_ENABLED
variable and Quadrant_LED_OFF_Timer_Did_Expire()
are defined in a class call app_Timers
. So this works fine the first time that quadrant_LED_OFF_timer_ENABLED
is set to 1 from my main.c
.
Here is what my Quadrant_LED_OFF_Timer_Did_Expire()
method looks like:
void Quadrant_LED_OFF_Timer_Did_Expire()
{
UART_UartPutString("Quadrant_LED_OFF_Timer_Did_Expire \n\r ");
quadrant_LED_OFF_timer_ENABLED = 0;
quadrant_LED_OFF_timer_counter = 0;
}
So you can see that I set my quadrant_LED_OFF_timer_ENABLED
to 0 here.
If I debug and check quadrant_LED_OFF_timer_ENABLED
after it has been set it's correct at 0. However, continuing in debug if I check quadrant_LED_OFF_timer_ENABLED
in this function Increment_Quadrant_LED_OFF_Timer()
it's set back to 1.
So just to clarify:
void Increment_Quadrant_LED_OFF_Timer()
void Quadrant_LED_OFF_Timer_Did_Expire()
int quadrant_LED_OFF_timer_ENABLED
int quadrant_LED_OFF_timer_counter
Are all declared and defined in app_Timers.c
and Increment_Quadrant_LED_OFF_Timer()
is being called from Cook_Timer_ISR.c
My questions are:
- What my take away from the debugging and my other programming experience is that the ISR is calling
Increment_Quadrant_LED_OFF_Timer()
from a different thread? Which is guess it's not technically a different "thread" but some other location in memory? However if this was the case I'm not sure how I'm getting proper UART output. - Is calling external methods like this to increment other counters the proper way to do this from an ISR? Or should I have a separate ISR for each timer that I need? It seems logical to have one counter that counts every 1 second then just piggy back off that one. Maybe not.
Thanks for any help!
Show LessI have an application needs to measure the pulse width. I used the demo code PWMexample as a start. I added a TCPWM counter component to try to measure the pulse width of the PWM signal. Hope that the counter will start at the rising edge and capture at the falling edge so by reading the capture register I can get the pulse width. But the problem here is: whenever I added start or reload input to the component, the capture won't trigger the interrupt.
Does anyone knows what I missed?
Show Less