PSoC™ 4 Forum Discussions
Hi,
I am trying to connect a 7 segment 4-digit LCD display to the CY8CKIT-042-BLE-A kit which uses the CY8C4248LQI-BL583 module. The LCD has 4 common signals and 8 signals for the segments. The display is from LUMEX, part number LCD-S401M16KR, Mouser part 696-LCD- S401M16KR. I am using PSOC Creator 4.2.0.641 and have instanced a segment LCD component (V1.30) to drive the LCD and used the Display Helper tool to configure the pixel mapping At present I have wired up two of the segments plus all 4 common pins to the following pins on the kit
LCD_SEG:Com[0] - P3.2
LCD_SEG:Com[1] - P3.3
LCD_SEG:Com[2] - P34
LCD_SEG:Com[3] – P2.3
LCD_SEG:Seg[0] – P1.2
LCD_SEG:Seg[1] – P1.3
LCD_SEG:Seg[2] – P1.0
LCD_SEG:Seg[3] – P1.1
In the code I call the LCD_Seg_Start function to initialise the display and then try to write a value to one of the display digits using the LCD_Seg_Write7SegDigit_0 function. Both digits on the LCD have all their segments turned on (display numeral 8 plus decimal point). I am not able to change this value using the LCD_Seg_Write7SegDigit_0 function. I have put a scope on the pins and all the common signals are switching from high to low but the segment pins are stuck at logic high. Could anyone suggest why I can’t get the LCD segments to display the correct values.
Thank you
Show LessEverything you Need to Know about the Structure and Functionality of a PCAP Touch Sensor StackUp.
1) Common electrode patterns
2) Relevant to touch sensor design abbreviations/acronyms
3) Examples of the most common stackup configurations
Each touch sensor features 2 sets of electrodes: the Transmitting ones (also known as Tx, or the driving electrodes, or simply X electrodes) and the Receiving ones (also known as Rx, or the sensing electrodes or simply Y electrodes).
Electrodes are usually made of Indium Tin Oxide, also known as ITO. However, during the last years, ITO alternatives have gained momentum and this trend is expected to continue in the years to come.
The most popular ITO alternative is Metal Mesh. Carbon nanotubes, PEDOT, copper mesh and silver nanowires are promising technologies that have emerged recently and
show potential in replacing ITO too.
When selecting electrode material, there are 3 major things to consider:
Resistance of the material: ITO has a resistance of about 100 ohms/square, while metal mesh has 10-30 ohms/ square.
Optical transmission of the material: Non index-matched ΙΤΟ has a 90-95% light transmittance rate, while silver nanowires more than 94%.
Design of the sensor itself: If it’s a large or a bent sensor, then ITO might not be preferred. These two design trends are those that have paved the way for ITO
alternatives.
ITO has high sheet resistance.The sheet resistance affects the charge time of the sensor and it’s proportional to its size. That’s why ITO is not favored in large touch sensors.
Bent touch sensors require the electrodes to be bent too (not just the cover glass). That’s where another drawback of ITO is evident: ITO breaks easily when bent, while its alternatives, e.g. metal mesh can be bent to a radius of up to 4mm without breaking.
You can read more here.
Show LessI have implemented the OTA fixed stack in my project, in the bootloader component I've checked the wait for command options and right now if no command is sent at initial startup, it exits the bootloader after the time out, but if I enter to the bootloader in a second time it stuck there until OTA is executed.
In my understanding it is necessary to change the following command : Bootloader_HostLink(Bootloader_WAIT_FOR_COMMAND_FOREVER); in the function Bootloader_Start() but because it is a generated source file then it can not be changed in the code.
What needs to be done that every time I enter to the bootloader and no command is sent, it will wait for time out and exits to the bootloadeble project??
Show LessHello,
I am trying to put my CYBLE222014-01 into DFU mode via ez-serial software command, ezs_cmd_dfu_reboot(1). I am able to do it on three of my devices, however on one of them when I execute this command, it doesn't seem to work. The devices seems to just reboot, and I receive a boot up event from the CYBLE222014-01 module with a cause of 0x01 meaning hardware/power triggered the boot. Any ideas why this might be happening on my one device?
Perhaps more strange is that I'm successfully able to read and write to it normally, such as writing characteristics, and reading responses. But for some reason it just won't boot into DFU mode.
Show LessHI everyone, I have some questions on using AMUX,
My design is a bidirectional controllable current source, so I use two IDAC in design, and one for source and one for sink(bidirectional), then using a AMUX to connect this two IDAC to one analog output pin. and also I need the PWM signal to control the AMUX, for forming the relaative waveform.
My initial concept is using the AMUXHW, cuz the AMUXHW has the hardware connection, it is easy to directly connect the PWM signals to its control pins, like the following design, but i know that AMUXHW can only be used to connect GPIOs, so this design has errors.
So i want to know is there any solutions instead, cuz in PSoC BLE only has this type of AMUXHW which can be controlled using HW connections.
Appreciation for help:)
HAN
Show LessDear all,
we are experimenting some issues while scanning our devices with CYBLE-222014-01. In fact, when we are running few dozens of devices (e.g. 20ish), they take some time to appear in scannings. The time that those devices take to appear in scannings do not depend majorly by scanning time, but it seems to depend majorly by the time that those devices have been running (e.g. 30 minutes). What are we missing?
We are using CYBLE-222014-01 on our devices with last application and stack. These devices are used as peripheral nodes with advertisement parameters as: "general discovery", "connectable undirected", advertisement interval as random from 30ms to 100ms, all channels, "scan request and connect request from any", timeout disabled, and advertisement behavior as "factory default".
We are currently using a custom android app, an android app from play store (i.e. Bluetooth LE Scanner), and cysmart to do our scannings. In cysmart we also tried several combination of scan window (i.e. from 10ms to 500ms) and scan interval (i.e from 500ms to 1000ms).
Anyone can point us what were are doing wrong, please?
All the best,
Lorenzo
Show LessHi,
I am working on CY8CKIT-142 and I created one custom profile BLE application with reference to CAPSENSE_RGB_LED_SENSOR application.Now my queries are
1.How to receive the string sent from BLE Android Application to PSOC BLE.
2.In the same way how to send the string from PSOC to Android App.
3.While sending and receiving the data the data should be of length 20????
As the test application was not ready I didn't test the below code which I wrote,so please can anyone suggest whether I am following correct way of coding:
For the first query the code as follows which I was trying:
uint8 *Transfer_Data;
case CYBLE_EVT_GATTS_WRITE_REQ:
/* This event is received when Central device sends a Write command on an Attribute */
wrReqParam = (CYBLE_GATTS_WRITE_REQ_PARAM_T *) event Param
Receive_Data = &wrReqParam->handleValPair.value.val[0]; //Will this assaignment will work for receiving string.
uart_write(Receive_Data,len); //Fuction created to write to UART
For the Second query the code as follows which I was trying:
case CYBLE_EVT_GATTS_WRITE_REQ:
for(;i>0;i--)
{
/* Save character received by UARTx device into the receive buffer */
while(!(*(uint8_t*)Transfer_Data = (unsigned char)UART_1_UartGetChar()));
/* Stop reading if CR (Ox0D) character is received */
if (*(uint8_t*)Transfer_Data == '\0') { /* New line character (CR) received ? */
*(uint8_t*)Transfer_Data = '\n'; /* Yes, convert LF to '\n' char. */
break; /* Stop loop and return received char(s) */
}
Transfer_Data++; /* Increase buffer pointer */
}
BLENotificationCCCDhandle.attrHandle = CYBLE_TRANSFER_DATA_CONTROL_CLIENT_CHARACTERISTIC_CONFIGURATION_DESC_HANDLE;
BLENotificationCCCDhandle.value.val = Transfer_Data;
BLENotificationCCCDhandle.value.len = 20;
CyBle_GattsWriteAttributeValue(&BLENotificationCCCDhandle,FALSE, &connectionHandle, CYBLE_GATT_DB_PEER_INITIATED);
For the Third query does below code is enough:
BLENotificationCCCDhandle.value.len = 20;
Show LessFor power consumption i added the ADC_SAR_Seq_1_StopConvert after i am done reading the current.
Unfortunately i have discovered that this function is causing a major issue in the device i am working on.
On first run when no current is consumed i get a bunch of correct readings all zero as expected.
But, after that when i do turn on a high consuming peripheral, the first reading that i get is zero as well.
I tried adding delays up to 100 ms between activation of peripheral and the current read - the first reading remains always zero.
The other way around produces same issue, when i take a bunch of high current samples, than turn off peripheral, the first sample produced is of a very high value.
The only thing that solved the issue is masking ADC_SAR_Seq_1_StopConvert at the end of conversion function.
my function:
uint16_t MOTOR_GetCurrent(void)
{
uint16_t motor_current;
int16 result; // this is what the Cypress function returns, and not uint16_t
// Start A/D conversion
ADC_SAR_Seq_1_StartConvert(); // D.S. this does appear in Cypress Example (but only once!,on boot, before the main loop function, in our code there are multiple uses.)
ADC_SAR_Seq_1_IsEndConversion(ADC_SAR_Seq_1_WAIT_FOR_RESULT); // D.S. 29.11.2018 was recommneded by Cypress to add this function.
// Read result from channel 0
result = ADC_SAR_Seq_1_GetResult16(CHANNEL_0);
int16 cypress_result = ADC_SAR_Seq_1_CountsTo_mVolts(CHANNEL_0, result);
ADC_SAR_Seq_1_StopConvert();
return (uint16_t)cypress_result ;
}
Show LessI would like to be able to send a command to the psoc that will switch the SWD pins back from GPIO mode to SWD mode. I know there is a setting for this in the system tab but I do not see any obvious way to set this during runtime. Is it possible?
Show Less