PSoC™ 5, 3 & 1 Forum Discussions
Hello everyone,
I'm creating this topic because I'm having some difficulties on interfacing PSoC with Matlab. I've watched this tutorial (Graficar Datos De PSoC 4 En MATLAB - YouTube ) and the project compiles, but when run the Matlab side, it gives me an error that seems to say that nothing is passed from the UART to Matlab.
What I do is generate a wave with the WaveDAC component, which is the one that the ADC detects and then I want to be able to see the ADC output on Matlab (using the UART component).
Attached to this post are the PSoC project and the MATLAB script
Show Lesshello I want for my project to send from my board to out pin a serios of bits 1 or 0 meaning the i will get
and again i dont want to use wavedac i want to send signals of 1 or 0 manually
Show LessHi, I am using the psoc 5. I am trying to make an interrupt as soon as the voltage on one of my digital input pin gets to 0 or close to it (set to be Resisitive pull up). The problem is that I want the interrupt as soon as the voltage gets to 0.4V or lower and the interrupt is only initiated if the voltage on the pin is hard 0.
How can I solve this problem.
Thanks a lot for all the help
Show LessHi every body.I am using psoc5 lp prototype kit.I want to run camera with psoc5 and take a picture then save on sdcard.Could you help me to do it?
How can i run camera with usb interfacing with psoc5 usb port?is it possible?
please give me a sample code or any project to do it faster.
thank you for attention...
Show LessHi,
does anyone know a tool which generates an inf file automatically? The USB component customizer seems to generate a standard inf file for e.g. CDC implementation (which points to the Microsoft CDC driver, not the Cypress driver), but if an vendor specific interface is implemented, it seems that the inf file must be created manually. Any ideas?
Regards
Show Lesshello in my code there is an array and my question is how can i see the information of the array ?(meaning to see the data of each cell )
with out using debugger .
this is my code :
int main()
{
int32 output={0};
volatile int32 output_array[1000]={0}; // voltatile is used to avoid optimized out eror
int32 mVolts;
int i=0;
char displayStr[15] = {0}; /* Character array to hold the micro volts*/
/* Start the components */
LCD_Start();
ADC_DelSig_1_Start();
/* Start the ADC conversion */
ADC_DelSig_1_StartConvert();
/* Display the value of ADC output on LCD */
LCD_Position(0u, 0u);
LCD_PrintString("ADC_Output (Hex):");
ADC_DelSig_1_SetOffset(130);// -25
LCD_Position(2u, 0u);
LCD_PrintString("ADC-voltage:");
for(;;) // this for meanes that it will run forever
{
if(ADC_DelSig_1_IsEndConversion(ADC_DelSig_1_WAIT_FOR_RESULT))
{
output = ADC_DelSig_1_GetResult32();
mVolts = ADC_DelSig_1_CountsTo_uVolts(output);
for(i=0;i<=1000;i++)
{
output_array = ADC_DelSig_1_GetResult32();
}
LCD_Position(1u, 0u);
LCD_PrintInt32(output);
sprintf(displayStr,"%5ld",mVolts);
LCD_Position(3,0);
LCD_PrintString(displayStr);
CyDelay(500u);
}
}
}
Show LessI couldn't find a useful PS-2 keyboard routine that would produce ASCII codes. This project does that and it includes use of the Shift keys to get upper-and lower-case characters and symbols. Decoding works for only the main keyboard area and doesn't decode the Print Screen, Insert, Delete, and other keys on the right side of the main keys. You could add these as needed. You can add a value for the Fx keys, also. The example includes an array for upper-case and an array for lower-case values that have ASCII codes. Spaces are "saved" with 0x0 so you can insert a code for, say, the F4 key that generates the keyboard scan code of 0x0C. Find that location in the array and substitute the code you want the F4 key to provide. I have included a table of the keyboard-to-ASCII translations that lists all the bytes for both arrays with an index between 0 and 0x7F. This information helps you locate a keyboard scan code and insert the ASCII value you want to produce when pressed. I also include a flow chart that shows how the code operates.
When you press a key, a PS-2 keyboard sends information in an 11-bit serial stream that looks like a UART transmission (LSB first). Each key has an assigned non-ASCII code. This code remains the same when shifted or unshifted. The software looks for the shift key and handles data accordingly. When you release a key, the keyboard send a "key-release" byte (0xF0) followed by the code for the letter. Software handles this, too. A clock signal from the keyboard will strobe the bits into an SPI register. I used the LSB first and mode 1,1, as included in this project.
In typical use you would use the SPI port to generate an interrupt, but the example code simply runs an infinite "keyboard input" routine and echoes characters to a terminal program. This setup makes the software easy to test. I used a CY8CKIT-059 5LP Prototyping Kit. I monitored keyboard data with an Saleae Logic analyzer and ran the Parallax Serial Terminal on my Win-10 PC to check the ASCII output from the project. Have fun. Jon Titus, Herriman, UT
Show LessWe are sending data using MasterWriteBuf API of I2C.
Its API is defined below.
uint8 I2C_MasterWriteBuf(uint8 slaveAddress, uint8 * wrData, uint8 cnt, uint8 mode)
According to this API, since wrData is uint8, it is 256 pieces.
.
We would like to transmit more than 256 data.
Is it possible to realize it?
Show LessGood evening. I have a test project running on CY8CKIT_059 that uses both the USB UART and the UART (Kitprog port). The protocol used by both ports is configurable.
I am able to read data from PSOC on the two ports at the same time with two PUTTY sessions. Problem is that when I turn off the session reading from USB COM port, the other port will halt sending commands.
This is because I write to both ports, and on USB side there's the 'classic' cycle that waits the USB to be ready for transfer:
while (0u == USBCOM_CDCIsReady());
USBCOM_PutString(s);
This does not happen on the serial port.
What's the best strategy to detect full buffer (or better COM port not open by any program/not active)? Also is there a way to detect port reopening as to suspend send and clear the buffers befrore restarting the serial stream?
Thanks
Marco
Show Lesshello I am currently using PSoc5 LP-096 in my project and i have 2 questions
1)On the board I wanted to messure the voltage between the 5V and GND(ground) how ever when i messured it the voltage was 4.06V and not 5V why is that ?
2) I am using ADC block and my question is what is default Vref ? the reason i am asking is that if the Vref is 5 and in real messirment it gives me 4.06V it gives me wrong answer of the Output of the ADC
Show Less