PSoC™ 5, 3 & 1 Forum Discussions
Hello everybody!
I found a strange behaviour of the SAR ADC in PSoC 5LP: I feed a GND-referred pulse over an opamp configured as a follower into a SAR ADC. The follower is in high power mode, the ADC in 12bit, 100kS/s and 0..Vdda with internal ref (2.5V) without bypass C. I can observe the input to the ADC at the ouput-pin of the opamp. As long, as the pulse keeps below 1V, everything is ok. When it starts to be higher, the ADC forces a delay of 1µs of the rising edge of the pulse. Despite there is the follower. The falling edge is ok. At all amplitudes of the pulse. Please find the attached pictures of the page in my project and of the oscilloscope screen (LabNation). The ADC_SAR2_in, which goes to another page, doesn't affect the delay. It's really the ADC. If I choose the bipolar ADC range 0..+-Vdda, everything is fine.
Any explanation?
Thanks!
Andreas
Show LessHello smart people
I am trying to make an mp3 player work, called dfplayer FN-M16P. This is the datasheet: http://www.flyrontech.com/uploadfile/download/20184121510393726.pdf
So I am not working with electronics and programming so often sadly. I have a hard time making it work. It seems that I should send information to it via UART, so I does this with a PSOC microprocessor (like arduino).
Apparently I have to send a serial command 7E FF 06 09 00 00 02 FF F0 EF that all refers to hexidecimal.
Can anyone tell me how do I send this through the UART? How would you write it?
I tried with something like this with each number refers to the decimal in the ASCII table:
string[0]=126;
string[1]=255;
string[2]=6;
string[3]=18;
string[4]=0;
string[5]=0;
string[6]=1;
string[7]=254;
string[8]=240;
string[9]=239;
UART_PutString(string);
Thanks in advance on helping me with the advanced project.
Best regards Simon
We use the CY8C29866 in our system, and we want to know the MTBF of it.
Where I can find it?
Hello,
I have been working on the PSoC 5LP SAR ADCs. In my current project, I am driving an Analog mux with a single input from an IDAC and the outputs of the MUX is given alternatively to the SAR ADC. If I am sampling at 50K SPS, I have been told to acquire all the output data from the SAR that can be sampled within 0.1s/100ms and store all of these values in a buffer. I wanted to know a couple of things.
1. I am running in software trigger-mode. As per my understanding, the EOC pin output from the ADC is an output pin from the ADC that gives a rising edge when one conversion per channel is sampled. However, when I connect a GPIO input pin to the EOC pin it gives an error "Too many drivers present on this pin", but it does not give me an error when I connect a digital output pin. Is my understanding wrong?
2. Since there is a status register (ADC_SAR_SEQ_STATUS_REG ) with the EOC bit, I want to use this status bit as a counter to acquire data, ie, I want to get result from ADC, everytime this bit is set. Will this be a good way to store all samples? Also in the datasheet there is a mention of a global variable - ADC_SAR_Seq_finalArray. Instead of using EOC and get result, does this array already have all the 50K samples every second stored in it and can I use it directly?
Thanks in advance.
Show LessTeam,
For PSOC5LP controller programmer kit (Miniprog 4), provision for program loading and debugging using JTAG port.
the above mentioned operations are feasible or not using JTAG in programmer kit.
Kindly confirm.
Regards,
SNSDS
Show Less
I am using PSoC 5LP. I built a project to extract strain gauge values from an ATV front suspension. Now I would like to import that data to an excel sheet. I have done this before with Arduino, but I am new to PSoCs. I dont know whether I have to initially take that data to a Serial monitor or directly I can get it on excel sheet...
The data thus obtained in .csv file I can use it to compare with my simulated values.
Could you please help?
Show Less
Has anyone managed to use Creator running under Windows 10 to programme PSoC with a Bluetooth connection linked to say the programming header of a USB kit programmer.
I have already had two laptop USB ports go down from to many connections and disconnections while programming , to want to do this again.
Using the laptops Bluetooth transmitter would make life a lot safer for the computer when working on a live test kit board.
Any suggestions welcome
Show LessHi all,
Is it possible to read negative values with the ADC on the PSoC5 LP. If so how should it be configured?
I need to read values from -10mV to -1.5V.
Show LessHi,
I need to share an external analog port to ADC and to IDAC. I try to do this via two analog mux so I can control the purpose of the port (read analog voltage or write current to the port). Cascading of two mux give me an error :
Error: apr.M0032: Net "Net_12212" is connected to an analog mux but is not connected to another component. (App=cydsfit)
How can I solve the issue of sharing the analog port?
Thanks,
Dima
Show LessHi everyone,
I tried replicating "https://jimmyutterstrom.com/blog/2015/07/12/psoc-tutorial-adafruit-lsm303-magnetometer-compass-module/" onto PSoC5LP.
I got readings from the compass module, but it is always the same value and does not change while the PSoC plugged in.
When i remove and plug in the PSoC again, the heading value changes to what is expected but it does not update when i move the compass along. I feel like there's something wrong with the I2C communication, that the value is not being updated. Any help / guidance on how to solve this issue is greatly appreciated.
#include <project.h> #include <math.h> #include <stdio.h> #define LSM303_ADDRESS_ACCEL (0x32 >> 1) #define LSM303_ADDRESS_MAG (0x3C >> 1) #define LSM303_REGISTER_ACCEL_CTRL_REG1_A 0x20 #define LSM303_REGISTER_MAG_MR_REG_M 0x02 #define LSM303_REGISTER_MAG_OUT_X_H_M 0x03 #define LSM303_REGISTER_ACCEL_OUT_X_L_A 0x28 typedef struct Vector3{ int x; int y; int z; } Vector3; void LSM303_Init() { //Start the I2C component. LSM303_I2C_Start(); /*------------ Accelerometer ------------*/ //Send start command for write mode. LSM303_I2C_MasterSendStart(LSM303_ADDRESS_ACCEL, LSM303_I2C_WRITE_XFER_MODE); //Specify which register we want to write to. //This register is written to for enabling x, y and z //output as well as setting datarate and powermode. LSM303_I2C_MasterWriteByte(LSM303_REGISTER_ACCEL_CTRL_REG1_A); //Set the required bits in the register. LSM303_I2C_MasterWriteByte(0x27u); /*------------ Magnetometer ------------*/ //This register is written to for setting data output rates //and controlling measurement flow. LSM303_I2C_MasterWriteByte(LSM303_REGISTER_MAG_MR_REG_M); LSM303_I2C_MasterWriteByte(0x00u); LSM303_I2C_MasterSendStop(); } void LSM303_ReadMag(Vector3 *magData) { uint8 data[6]; //Prepare the module for magnetometer output. LSM303_I2C_MasterSendStart(LSM303_ADDRESS_MAG, LSM303_I2C_WRITE_XFER_MODE); LSM303_I2C_MasterWriteByte(LSM303_REGISTER_MAG_OUT_X_H_M); LSM303_I2C_MasterSendStop(); //-- //Start the communication in read mode. LSM303_I2C_MasterSendStart(LSM303_ADDRESS_MAG, LSM303_I2C_READ_XFER_MODE); //Read databytes. data[0] = LSM303_I2C_MasterReadByte(LSM303_I2C_ACK_DATA); data[1] = LSM303_I2C_MasterReadByte(LSM303_I2C_ACK_DATA); data[2] = LSM303_I2C_MasterReadByte(LSM303_I2C_ACK_DATA); data[3] = LSM303_I2C_MasterReadByte(LSM303_I2C_ACK_DATA); data[4] = LSM303_I2C_MasterReadByte(LSM303_I2C_ACK_DATA); //Notice that we are here using "NAK_DATA". It's to tell the //LSM303 that we're done and don't want to read anymore data. data[5] = LSM303_I2C_MasterReadByte(LSM303_I2C_NAK_DATA); //Put together the different data bytes to form complete //integers for storing the output values. magData->x = (int16_t)(data[1] | (data[0] << 8)); magData->y = (int16_t)(data[5] | (data[4] << 8)); magData->z = (int16_t)(data[3] | (data[2] << 8)); LSM303_I2C_MasterSendStop(); } int main() { Vector3 magData; char output[4]; //String for storing uart output. PC_UART_Start(); LSM303_Init(); for(;;) { LSM303_ReadMag(&magData); //Calculate heading using arctan on the Y and X vectors. //And convert from radians to degrees. float h = (atan2(magData.y, magData.x) * 180.0) / 3.14159265359; //Map the value to comply with the standard system where the heading //is specified as an angle between 0 - 360 degrees. if(h < 0) { h = 360 + h; } //Output the heading through our UART component. sprintf(output, "%i\r\n", (int)(h+0.5)); PC_UART_PutString(output); //Update heading at 1 Hz CyDelay(1000); } } /* [] END OF FILE */Show Less