PSoC™ 4 Forum Discussions
Hi,
I'm working in a project where I need to connect sensors with diferent interfaces, but I would like to use the same connector for all of them with the minimum number of pins possible. So what I thought of doing is to have the ADC, SPI, and I2C sharing some pins. To do that I think the only option that might work is using an analog MUX and then dynamically choose which of the outputs connect and also change the pin configuration from analog to digital and vice versa.
I haven't test it yet because I found a problem with the I2C component. The only master I2C component that creator gives you is one that uses SBC and you don't have the pins available to do what I want.
Anyone have any idea of how I could do what I want witout using more components?
I've attached an image of how I'm trying to do it.
Thanks in advance.
Show LessHello,
I'm trying to blink an LED to learn about PSoC, using Pioneer Kit, and Creator 3.0.
I know there are easier ways to do this...
I'm using a Counter component.
Clock_1, 12 MHz, connected to Counter_1 clock input
Clock_2, 128 Hz, connected to Counter_1 count input
Counter_1 comp output connected to Digital Ouput pin Pin_Green (P0[2])
When I attempt to 'Generate Application' I get the following errors:
mpr.M0119:Invalid connection for clock "Clock_2" connected to "\Counter_1:CounterUDB:count_enable\:main"
mpr.M0119:Invalid connection for clock "Clock_2" connected to "\Counter_1:CounterUDB:count_stored_i\:main"
The datasheet for the Counter_v2_40 states that "You can connect any digital signal from any source to the clock/count input.
Are there some other rules about signal connections between components that I need to refer too?
Any help would be appreciated.
Thanks,
Jeff
Show LessHi dear PSOC Communutity 😃
I tested CapSense Buttons and got interesting result.
First, I tested one CapSense Button. It worked good. Smart Tuner it's exelent module. But then I added new button and here started troubles.
If touch new button all good, but if touch first button, capsense recive signal from both buttons. I attached a file, here it look better.
May be anybody had same, problem or any ideas(I tryed change sensetive, but it didn't good result)?
Regards.
Show LessHello.
I'm trying launch my PSOC4 CY8C4245AXI-483, with simple programm blink LED. It's working but bad and very wierd.
Video here https://www.youtube.com/watch?v=_1OWf3EIq4M
Also I attached scheme.
Power is 3.3V. I tested fiew controllers, and they work same.
I tried use program from example, and have same problem. Voltage on the pin don't go down to GND.
May be, anybody know where I should look troubles?
Regards.
Show LessSorry, I just solved my problem while gathering the data to get support but the solution creates another question for me, why does what I explain below happen when I use a buffer superior to 4 bytes? I know the SPIM have a 4byte hardware buffer but why it doesn't work when using software buffer? I had the SPIM configured for 28 bytes.
Thank you.
My post:
Hi,
I'm interfacing the PSOC 4 with an ADS1298. I'm trying to get some that out of the ADS1298 so I only have to provide clock to it to receive some of the data.
I do that correctly and it sends data since I can see it in the scope. The problem is that I can't read any data with the SPIM.
This is the loop where I keep receiving data.
SPIM_1_Start();
for(;;)
{
if(DRDY_Read()==0){
for(i=0; i<27;i++){
SPIM_1_WriteByte(0);
while(!(SPIM_1_ReadTxStatus() & SPIM_1_STS_SPI_DONE));
// CyDelayUs(10);
while(!(SPIM_1_ReadRxStatus() & SPIM_1_STS_RX_FIFO_NOT_EMPTY));
if(SPIM_1_GetRxBufferSize()>0)
payload = SPIM_1_ReadRxData();
//UART_UartPutChar(payload );
}
}
}
If tried commeting the first while and the second or adding the delay with no luck. If I don't comment the if(SPIM_1_GetRxBufferSize()>0) it gets stuck there because it is not reading anything but it is receiving data since I can see it with my scope.
The solution was to change the RX buffer size to 4.
Show LessHello All,
I am tring to create a signal generator that produces a 80kHz square wave that I can adjust +/- 1.5kHz in 1 to 2 Hz steps using a potentiometer that I am sampling. Ideally I could also vary the duty cycle of said waveform also.
I tried using a 24MHz clock into a PWM and that gave me the ability to set the period and the compare that gave me control over the freq and duty cycle. But the steps are 240Hz.
Any input/ideas would be greatly appreciated.
Sean
Show LessI have encountered some puzzling behavior of my CY8C4125. The situation is this. Sometimes I need I2C, sometimes I need to bit-bang the output. This functionality is mutually exclusive, so they never overlap. As mentioned in a previous post, I have to enable then disable I2C because something about it modifies the program space, which would corrupt a continuously running program CRC check. I2C then remains inactive until I need it. I2C is on SCB 1. This places SCL on P0[4] and SDA on P0[5].
With the I2C disabled, I should be able to take control of the pins and manually bit bang them for whatever I want. Unfortunately that does not appear to be the case. I have verified that when the program is running and I2C is disabled that register HSIOSEL4 is correctly set up to 0x0. This means the pins are not connected to any internal peripheral but are firmware controlled. I then manually force the pin configuration to output but calling the Pin_SetDriveMode() function and setting it to OD_LOW. Finally, I write to the data register by calling Pin_Write(). I have inspected memory and verified that the data registers (0x40040000) are set correctly. I cannot verify the drive mode registers because, while I know where the register is (0x40040008), there is no information in the TRM about the register. But let's assume it is correct if the Pin_SetDriveMode() function works. If I set the pin high, I see the bits in the DR change. Same for low. But the output does not change at all.
So I tried another experiment. I removed all I2C functionality and simply placed two firmware controlled pins called I2C_scl and I2C_sda with drive modes set at OD_LOW. All code is the same. Now I can bit bang them without any problem.
I then looked closely at the registers in memory view. I have attached an image of those registers in both cases. As best I can tell, the registers are set up exactly as they should be, but the outputs do not work. Am I halucinating? Reading the TRM wrong? Reading the memory watch wrong?
Any thoughts would be appreciated.
Show LessThe error that I am getting is the following:
ERROR: M0145 '(the pin)' P4 cannot be used for routed connections.
We are trying to use the entire port four to run our SPI on the PSoC 4. In the datasheet it says that SPI works for this port but when we try to implement it in PSoC creator, it is giving us that error.
Any suggestions? Ideas?
Show LessHi,
I'm trying to implement a slave board with CY8C4125 (so, without UDB) that comunicate with a master board trough SPI. Obviously the PSoC4 is SPI slave. The master doesn't manage the SS signal ('cause it's a point-to-point connection with only one slave). The SCB block configured as SPI Slave needs it so I've tryed the Unconfigured mode with routed only MISO, MOSI and SCLK signals but it seems doesn't receive any packet from master.
Is the SS signal fundamental so I must manage it or there are any workaround ?
Thanks for replies
Fabio
I cannot find on psoc 4 datasheet info about power consumption when in deep-sleep mode and there's just a comparator active with voltage reference (either internal, IDAC... or external voltage) used to wakeup CPU. I can find just such info when in sleep mode (1200uA). On Psoc5LP there's such information (reported as 3uA): since I suppose the same manufacturing technology, is correct to assume a similar current? thanks
Show Less