PSoC™ 5, 3 & 1 Forum Discussions
Hello all,
I have a question regarding the ultrasonic HC-SR04 sensors and PSoC.
What I did until now:
I followed up the example from here: Intro to Cypress (Part 2): 3 Steps . It lights up an LED when the sensor detects an object at a specific distance. It's really simple to implement (for me because I'm a newbie to PSoC) and it works fine with one sensor. After this I tried to add one more sensor to work in the same time with the first one. What I did was to create 2 different functions with the same instructions but with different names that I tried to call them from the main function. The problem I encountered is that just one of the LED's is blinking. If I call both functions(for example): sensor1(); and after sensor2(); the PSoC seems to execute just the first one called.
My question would be: How can I attach 2 or more sensors to the PSoC to work all in the same time ?
P.S. When I put the instrunctions for both of the sensors in the same function, they work both without a problem.
Thank you in advance. Have a nice day!
Show Less
I have 2 PSOC5LP DVKs with 10 pin JTAG headers on each. I have wired them into a bread board connecting them via JTAG daisy chain schematic using the TDO of one DVK into the other DVK's TDI. I cannot get them appear in Psoc Programmer. I clicked the JTAG tab and 'Scan bus' and nothing happens, it says it detected 100 devices but that obviously is wrong. If there are any guides or how-tos on this is done that would be great. I will unhook everything and retry in the meantime.
Show LessHi everybody.i want to run zigbee module(MRF24J40) with psoc5 and in spi mode.now i can initial module but i have some problem.
MRF24j40 has a int pin that i connected it to psoc5 to detect recive message and read own register.bet i cant do it?
another question is there anybody that have a good library to use MRF24j40?
please help me it is very important for me...
my project is attached...
Show LessAN72845 Design Guidelines For Cypress Quad Flat No-Lead (QFN) Packaged Devices makes the following statement on page 16:
Typically, QFN-packaged devices are highly reliable when assembled on rigid PCBs when the bottom thermal pad of the QFN package is soldered to the board. When the thermal pad is soldered onto the PCB, the life of the solder joint is extended by 60 percent. For this reason, soldering the thermal pad onto the board is crucial to the reliability of the solder joints on PCBs.
Is there data available to show the 60% solder joint life improvement? If so can you share it? I need to show the reliability of the PSoC5 chip I am using and it would be really helpful.
Thanks,
Cyrus
Show LessHi all,
This is maybe more of an embedded C question than a PSoC specific question.
I've got something I'm working on where I'm using a single timer to count timeouts for 3 separate peripherals. A Keyboard, Keypad, and Mouse. Normally I would just make all the timeout counters and flags extern and just drop the counter code right into the ISR, however I've recently started to try and take an approach of minimizing my global variables/externs and I'm wondering how to go about maintaining 3 separate counters, in a single timer ISR, while limiting the scope of the counter variables and flags to their respective C files.
I would think I would do something like this:
In mouse.c:
#define MSE_TIMEOUT_COUNT 50
static volatile bool MSE_Timeout = false;
static volatile bool MSE_Timeout_En = false;
static volatile uint8_t MSE_Timeout_Counter = 0;
inline void Mouse_TimeoutTick (void){
if (MSE_Timeout_En){
if (++MSE_Timeout_Counter >= MSE_TIMEOUT_COUNT){
MSE_Timeout = true;
}
}
}
in keypad.c:
static volatile bool KP_Timeout = false;
static volatile bool KP_Timeout_En = false;
static volatile uint8_t KP_Timeout_Counter = 0;
#define KP_TIMEOUT_COUNT 50
inline void Keypad_TimeoutTick(void){
if (KP_Timeout_En){
if (++KP_Timeout_Counter >= KP_TIMEOUT_COUNT){
KP_Timeout = true;
}
}
}
in keyboard.c:
volatile bool KBD_Timeout = false;
volatile bool KBD_Timeout_En = false;
volatile uint8_t KBD_Timeout_Counter = 0;
#define KBD_TIMEOUT_COUNT 50
inline void Keyboard_TimeoutTick (void){
if (KBD_Timeout_En){
if (++KBD_Timeout_Counter >= KBD_TIMEOUT_COUNT){
KBD_Timeout = true;
}
}
}
in timers.c:
void ISR_100MS_Interrupt_InterruptCallback (void){
Keypad_TimeoutTick();
Keyboard_TimeoutTick();
Mouse_TimeoutTick();
}
My question here is basically: Is this "Safe?" and is this the best way to go about what I'm looking to do? I'd think declaring the functions inline as well as not having these "Tick" functions being called anywhere else but from inside the ISR Callback should do the trick right?
Thanks in advance for any input!
[EDIT] This code doesn't actually compile, "inline function is declared but never defined" for all 3 "Tick" functions. So I'm definitely missing something about how this is supposed to be done (if it's supposed to be done at all, that is). I don't use inline often, and I've never tried to do so in this fashion, so I'm probably misunderstanding it.
Show LessHi,
We are using an IDAC at constant current, while the output current is switced from load to load using analog multiplexer (internal).
In some cases the load is not connected.
Is there a spice model for the Psoc IDAC to enable us to simulate the response of the IDAC ?
Show LessI have a rf transceiver project. I'm using a total of 2 psoc kits. I use the first on the receiver side and the second on the transmitter side.send information by the transmitter. but I couldn't print the information I sent by the recipient.
I want to print the information to the 3 [0] pin of the PSoC 5LP on the lcd screen.
Show LessI have PSoc 5lp development kit. and I am studying segment lcd component.
for that if i try to debug the example code "SegLCD_LowPowerExample" I could not debug the code and showing the error (please refer attachment).
i am facing this issue perticularly with this example code only.
please guide me what to do?
Show LessI'm wondering why the psoc 5LP kit has two sets of dedicated I2c lines even though they are labeled I2C[0] . Can someone please clarify- see picture below:
Show Less