PSoC™ 5, 3 & 1 Forum Discussions
I am using a PSoC 5 device to address up to 16 PSoC 4 devices through SPI but I need to have only one chip select and have them respond only when they are given and ID. Is this possible to do in a PSoC 5 to 16 PSoC 4 devices?
Show LessI'm trying to find the original sample projects for the bootloaders that used to be with the AN68272 application note but, maybe since Infineon took lover, this seems to have been taken down. Specifically looking for the UART Bootloader code for C# ideally or C if not.
I have found an executable version which works OK (Thanks PlusPlus!) but would like to integrate the functionality of the UART bootloader into our application.
Any ideas?
Thanks
Show LessHi Sir,
I am trying to install PSOC 4.4 in my system, but it is unable to install. I have tried to work on PSOC5LP. Modus toolbox is not supported for PSOC5LP.
Please help me to install PSOC4.4 in windows 11.
Thanking you,
Sreehari.
Show LessSo I'm running into a issue with PSoC pins that I didn't think would be a problem with how simple this should be.
I'm trying to program a set of pins on the PSoC5LP (in this case, my 050 kit) as GPIO accessible via serial command to be able to change the drive mode, read the status of the port pins, etc. What I'm seeing is that all my output functions seem to work properly when I switch the drive mode to Strong Drive, but reading the pins is not working if I return back to Digital Hi-Z from another drive mode.
My internal schematic is as follows on the PSoC:
The clock for GPIO_STAT is 100kHz (not shown), and the bank of GPIO pins are set for high impedance digital input by default on powerup.
Externally on the 050 breadboard I have some LEDs with current limiting resistors (1k) to show the state of the pin. The actual pins being used are P0[0]->P0[7] for GPIO[0]->GPIO[7] respectively
In my code, I have an array of the pins declared/defined as my GPIO:
/*Array of our GPIO pins, in order lsb to msb. Can pass these to CyPins functions)*/
const uint32_t GPIO_PinArray[NUM_GPIO] = { GPIO_0, GPIO_1, GPIO_2, GPIO_3, GPIO_4,
GPIO_5, GPIO_6, GPIO_7};
I wrote some functions to perform some GPIO tasks such as set drive mode, read/write the port, read/write per-pin, etc:
void GPIO_SetPortDrive (uint8_t mask, uint8_t mode){
mode = clamp_high(mode, 7);
for (uint8_t i = 0; i < NUM_GPIO; i++){
if ((mask >> i) & 0x01){
CyPins_SetPinDriveMode(GPIO_PinArray[i], mode);
}
}
}
void GPIO_WritePort (uint8_t io_byte){
for (uint8_t i = 0; i < NUM_GPIO; i++){
if ((io_byte >> i) & 0x01){
CyPins_SetPin(GPIO_PinArray[i]);
} else {
CyPins_ClearPin(GPIO_PinArray[i]);
}
}
}
void GPIO_WritePin (uint8_t gpio_num, uint8_t state){
gpio_num = clamp_high(gpio_num, NUM_GPIO-1);
if (state){
CyPins_SetPin(GPIO_PinArray[gpio_num]);
} else {
CyPins_ClearPin(GPIO_PinArray[gpio_num]);
}
}
uint8_t GPIO_ReadPort (void){
uint8_t gpiobyte = 0;
#ifdef PER_PIN_READ
for (uint8_t i = 0; i < NUM_GPIO; i++){
gpiobyte |= (CyPins_ReadPin(GPIO_PinArray[i]) << i);
}
#else
gpiobyte = GPIO_STAT_Read();
#endif
return gpiobyte;
}
What Works:
- I am able to set drive modes and that seems to work properly. I can set pins to from the default of Digital Hi-Z to Strong Drive and write to them and my external LEDs turn on properly.
- The status register GPIO_STAT properly reads the output state of the pins when they are set to Strong Drive. I.E. if I set the pins to strong drive and write 0xAA to the port, reading GPIO_STAT returns 0xAA.
- Reading the GPIO pins works properly if the drive mode is never switched from Digital Hi-Z.
What Does Not Work:
- Reading the port/pins does not seem to work if drive mode for a pin has been switched away from (for example to Resistive Pull-Up or Strong Drive), then back to, Digital Hi-Z. GPIO_STAT_Read() simply returns 0 for that bit/pin regardless of if the input signal is high. Reading Per-Pin via the CyPins API when PER_PIN_READ is defined gives the same result, so I don't think it's specifically a problem with how the Status Register is behaving.
Are there considerations when switching pin drive modes that I am missing or not considering?
Thanks!
Show Less
Buenas tardes, actualmente me encuentro trabajando con la Psoc 5LP, y estoy usando multiples PT100, usando 1 IDAC y un multiplexor para obtener las temperaturas de cada uno. SIn embargo, cuando utilizo solo una PT100 la medicion es estable, pero al usar dos o mas, la medida empieza a variar mucho. Cuando separo las mediciones con 2 IDAC vuelve a funcionar bien, pero apenas uso el multiplexor empieza a variar demasiado.
Quisiera saber si hay alguna manera de corregir este problema, o si debo tener alguna otra consideración en el código.
En la imagen 1, estan los bloques que utilizo para la multiplexación. En la imagen 2, el código utilizado, que es igual al ejemplo que proporciona Psoc para la lectura de RTD.
Gracias
Show Less
Hello,
We had encoders failed from our supplier, and they are using CY8C5888NI-LP210 microcontroller.
What is failed is quadrature outputs on P12[4], P12[5],P12[3],P12[2],P4[3] and so on.
Problem is that encoder dues seems to be working, it is indicating error and index values with LED correctly but quadrature is missing completely .
What I want to do is to reprogram this encoder so it would generate constant PWM signal on pins. If signal does not exist, that means we killed encoder, if signal does exist, it means that firmware was corrupted somehow and encoder producer should be at fault, not us.
I written application, but it could be uploaded only by I2C pins (P12[4] and P12[5]) since they are available at the connector. Problem is that compiler does not generate .cyacd file that is needed to flash this firmware (by using embedded I2C bootloader ? )
As far as I understand, I need to use bootloader host, but I cant find file to upload, since it is not generated, and I can't get to SWD ot JTAG pins, only XRES, and I2C.
What I need to do for compiler to generate this .cyacd file and does infineon bootloader is always present so I can re-flash it, like in STM32, or it could be deleted by encoder supplier when they uploaded their own firmware
Please advice how I proceed !
Show LessHi All,
I've got a question regarding floating point formatting for printf/sprintf on PSoC5LP when *not* using newlib nano.
I'm finding in my project for CY8C5468AXI-LP106 that, much like I've seen in the past, using newlib nano absolutely breaks strtok() in my code for some reason (and only on this specific part) As a result, I need to disable newlib nano in my code in order to be able to actually use strtok(). One thing this seems to do is remove float formatting functionality entirely, and enabling/disabling newlib nano float formatting (-u _printf_float)seems to have no effect. I simply get no characters where the formatted string should be.
So my question is this: Now that I'm using the C standard libraries, is there a flag or anything I need to provide in order to get float formatting working? Or should this simply "just work"? I should have plenty of stack/heap (0x1000/0x0800 bytes respectively) so that *shouldn't* be the issue.
Any thoughts?
Show Less
Hello .
I encounter the problem that the converter is only accurate in 8 bits.
If I choose 16 or 20 I start to see 5.112V on the screen but the input to the converter is equal to 4.8098.
Can anyone help?
Hello,
We are using PSoC LP5. There is one pin, which is set to digital input, Strong drive drive mode, Initial drive state 0. In the reset tab, Power-On reset is Don't care.
My questions are:
1. How does "Strong drive" drive mode work on an input pin? Does PSoC drive the pin to low(Initial drive state set to 0)? Or is it floating if there is no connection to any other components?
2. If all pins in this same port have power-on reset set to Don't care, the what is the value used?
Thanks,
Winston
Show LessI've built a super simple asyncronous 2-bit forward counter using two TFF. As per its datasheet the TFF is positive edge triggered so I built this circuit:
The NOT gate is there because the inverted output - needed in forward counters using rising edge triggered flip-flops - is missing in the TFF.
The behaviour is not as expected though because it counts backwards. This is a pretty simple circuit and I'm expecting this sequence:
LSB NOT_LSB MSB
0 1 0
1 0 0
0 1 1
1 0 1
Instead I get a backwards counting sequence. All is fine if I remove the NOT gate and wire Q to CLK as I would with a negative edge (falling) triggered device.
I'm testing the output using two LEDs with anode on the output pins followed by two 240 Ohm resistors and GND. If LED on is 1 and LED off is 0 the circuit counts backwards.
What am I doing wrong?
Show Less