PSoC™ 4 Forum Discussions
Hello,
I use a CY3280MBR3 to rate the CY8CMBR3116,
I use an arduino as a host.
my sketch is very simple, for every touch detected I send MIDI notes
I have a very bad times responses: 78 - 80 ms.
If a try my timing test before I2C communication, I have 77 ms between the trig sensor and the interrupt pin signal.
In the software the initial response times says 80 ms and the subsequent response time 60 ms.
there is a way to have more fast responses, the datasheet say 20 ms scanning times; why the interrupt pin signal arrive 77ms after the trig ?
Thomas
Show LessI'm using a PSoC 4 and I want change the default place of my application in the microcontroller memory: I want to set the application at memory address 0x00001000.
I read I have to change the .ld file, by setting CY_APPL_ORIGIN to 0x00001000.
The firmware is correctly built but I Always have an error whenever I try to program the PSoC. I get this error:
Error: dbg.M0023: There was an error while programming the device: PSoC Programmer reported error (100 - FAILED! Hex File parsing failure. Checksum of Main Flash does not match Hex Checksum record)
It seems like I have to change something in the Hex file but I don't know how. Can anyone help please?
Thanks
Show LessHello every one, I am new to PSoC4 and I will try to use a sensor I found called ( Water Detection Sensor w/ Buzzer (PCA9536)). I wounder if it come with a water panel or not?. If anyone can help me with example in the API (.c file and .h file) will be thankful.
best regards.
Water Detection Sensor w/ Buzzer
Show LessI am trying to read a 1kHz PWM signal into the PSoC 4 and depending on the duty cycle I want to change state on two pins. (for now)
On the PSoC 5 Discussion I found a thread that seems to come close to that I wanted to do so I took the posted project and tried to port it to work with the PSoC 4.
Original thread.
I was able to modify the project that it satisfies the compiler and does not throw any errors, however I am missing something as it appears the counter is not counting.
I had to modify the design to use a UDP counter as FF is not supported. Also I had some trouble connecting a 100kHz clock directly to the count input, the compiler insisted I can not do that. Not sure why. So I added the DFF to satisfy the compiler.
When debugging with break points in the interrupt code, I can see the code is executed but the values from the counter seem constant.
counter settings.
Show Less
Hello, I am getting into using psoc 4100 cortex M0 line products. My clients requirements, regarding power consumption in idle state, allow me to just put the whole system in the lowest power possible(less or equal to deep sleep mode) when no task is at hand. Wake up process starts via either CAN wake up protocol or NFC.
I have no worries about NFC, which has a IRQ pin to wake the processor. My concerns reside in CAN. Deep sleep closes the interrupt channel by which CAN communication is able to initiate wakeup process. My viable option is GPIO. However, its not easy to find a CAN transceiver which signals out that wake up protocol is received.
Any suggestions? Thanks in advance.
Show LessBelow is my firmware, and it has watchdog and ADC interrupt. I have to add enter and exit critical section function so that the cap touch process will not be interrupted. Please tell me where can I insert at below code the enter and exit critical section function
while(1u)
{
ADCHandler();
CySysWdtResetCounters(CY_SYS_WDT_COUNTER1_RESET);
if(BatteryOutOfRange==0)
{
/* Do this only when a scan is done */
if(CapSense_NOT_BUSY == CapSense_IsBusy())
{
CapSense_ProcessAllWidgets(); /* Process all widgets */
#ifdef USER_CAP_SENSE_TUNE_ENABLE
CapSense_RunTuner(); /* To sync with Tuner application */
#endif // cap sense tune enable
CapSense_CheckState();
CapSense_ScanAllWidgets(); /* Start next scan */
}
/* Display CapSense state using LEDs */
}
else CapTouchOutput_Write(0u);
}
void CapSense_CheckState(void)
{
static uint16_t guardReleaseCount = 0, SensorTouchCount = 0,guardState = 1, sensorState=0;
static uint8_t press_print = 0;
if (CapSense_IsWidgetActive(CapSense_GUARD_WDGT_ID))
{
guardState=1;
guardReleaseCount = 0;
}
else
{
if(++guardReleaseCount >= GUARD_RELEASE_COUNT_TH)
{
guardState=0;
guardReleaseCount = 0;
}
}
if (CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID))
{
if(++SensorTouchCount>=SENSOR_TOUCH_COUNT_TH)
{
sensorState=1;
SensorTouchCount=0;
}
}
else
{
sensorState=0;
SensorTouchCount = 0;
}
if(guardState ==0 && sensorState==1)
{
if(press_print==0)
{
User_UART_UartPutString("Button Pressed\r\n");
press_print = 1;
}
CapTouchOutput_Write(1u);
}
else
{
CapTouchOutput_Write(0u);
press_print = 0;
}
}
void ADCHandler(void)
{
uint8 channel = CHANNEL_1;
int16 adcVal;
int32 mVolts;
int32 BatteryVolt;
static uint8 FirstBoot=1;
Vbat_EN_Write(1u);
if(ADCdataReady != 0u)
{
adcVal = ADC_GetResult16(CHANNEL_1);
/* Check for ADC window limit interrupt */
if(ADCwindowFlag != 0u)
{
BatteryOutOfRange = 1;
}
else
{
/* Convert the ADC counts of active channel to mVolts */
mVolts = (int32)ADC_CountsTo_mVolts(channel, adcVal);
BatteryVolt = mVolts * BATTERY_VOLTAGE_GAIN + BATTERY_OFFSET;
if(FirstBoot)
{
if(BatteryVolt>=BATTERY_VOLTAGE_LOWER_LIMIT && BatteryVolt <=BATTERY_VOLTAGE_UPPER_LIMIT)
BatteryOutOfRange = 0;
}
if(BatteryOutOfRange)
{
if(BatteryVolt>=BATTERY_VOLTAGE_LOWER_HYSTERESIS && BatteryVolt <=BATTERY_VOLTAGE_HIGHER_HYSTERESIS)
BatteryOutOfRange = 0;
}
else
{
if(BatteryVolt>=BATTERY_VOLTAGE_UPPER_LIMIT || BatteryVolt<=BATTERY_VOLTAGE_LOWER_LIMIT)
BatteryOutOfRange = 1;
}
}
FirstBoot = 0;
ADCdataReady = 0u;
}
}
Hi All,
I'm making small breakout board for PsoC4 42xx , And found these on schematic. can anyone explains the necessary of this capacitors.
Thanks,
Ashok r
Show LessHi,
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 Less