PSoC™ 5, 3 & 1 Forum Discussions
Greetings, my name is Ara and i'm new here
so i am currently running a project of simple audio processor for educational standard which simply used to show colleagues example of how audio signal transformed with simple customizable algorithm. I was looking for possible hardware development and came across conclusions that several common microcontrollers only capable of doing analog output with either PWM or DAC, i wish i could find simple microcontroller that doesnt need any external add-on on it and came upon on PSoC. so is it true i can accomplish my hardware development with PSoC?
I've embedded simple diagram to show exactly what my intentions here, i hope you guys can help and guide me till i could walk by my own legs with PSoC. I'm just starting to dwell in hardware programming and only got dummies level of C programming, but i could at least say i'm familiar with the field.
By the way on my college i've already got PSoC 5 on my hand which is the reason i post this here, i hope i weren't on wrong place and if it is could you kindly guide my where should i go. Sorry for any mistake or misunderstanding i might have caused as english is not my main language
Thank you sincerely
Show Less
I am considering a design of a system that involves several hundred identical data acquisition units based on a PSoC5 (PSoC4 is an option). We are talking about up to 2000 units. They all run same code, or nearly the same code, which could be different in unit identification codes. Working and developing software for a single unit is a no-brainer but distributing it to a large number of units looks like a serious scalability problem. Uploading software by changing units and plugging them into a PC is not a viable option based on the number of units. Is there a way to create a bus with addressable PSoC units and then use this bus to upload software? I'm afraid that USB, JTAG, or SWD solutions would not work. Radio-based solutions, like BlueTooth, would not work because of radio interference between units.
I'm looking for hints on the direction to solve the problem of mass upgrading software in PSoC.
I would know an acceptable solution for an Ethernet-enabled device but I am totally perplexed by a solution for PSoC4/5...
Regards,
/Sergey
Greetings;
I am using PSoC Creator 3.3 with the CY8CKIT-050. I am trying to communicate with a MPL115A1 Barometer via SPI 4-wire. I ran the example project of the SPI (Master, Slave) components and it worked just fine.
So I tried to make my own file using what I gleaned from the example project to perform SPI communication with the MPL115A1 barometer breakout board. I have been doing hardware design for awhile, but am new to embedded code writing, so I am not real strong in that area.
I have 4 components in this design (so far), SPI Master component (Ver 2_5) Tx and Rx Buffers set to 4, LCD component, and two control registers for debugging (because I have not learned the debugger yet). The LCD display works, the debug LED's work, but I have no data coming out of the MOSI pin, or any other SPI pin for that matter (Viewing pins with DSO). The hardware pins are set to strong drive, initial state low. I am not sure what the problem is as I am pretty much doing the same thing as in the example code. My code is below:
/* MPL115 Memory Map
Address Name Description Size (bits)
0x00 Padc_MSB 10-bit Pressure output value MSB 8
0x01 Padc_LSB 10-bit Pressure output value LSB 2
0x02 Tadc_MSB 10-bit Temperature output value MSB 8
0x03 Tadc_LSB 10-bit Temperature output value LSB 2
0x04 a0MSB a0 coefficient MSB 8
0x05 a0LSB a0 coefficient LSB 8
0x06 b1MSB b1 coefficient MSB 8
0x07 b1LSB b1 coefficient LSB 8
0x08 b2MSB b2 coefficient MSB 8
0x09 b2LSB b2 coefficient LSB 8
0x0A c12MSB c12 coefficient MSB 8
0x0B c12LSB c12 coefficient LSB 8
*/
#include <project.h>
#include <cylib.h>
#include <stdio.h>
//======================//
// Macros //
//======================//
//======================//
// Global Variables //
//======================//
/* *******************
MPL115A1 Functions
**********************/
/*******************************************************************************
* Function Name: ControlReg1_Write
********************************************************************************
* Function enables hardware to display value of register using two led's
* Parameters ledZ
********************************************************************************/
void ControlReg1_Write (uint8 ledZ); // declaring the function
void CyDelay(uint32 milliseconds);
int main()
{
// CyGlobalIntEnable; /* Enable global interrupts. */ Tried remarking out this as a test (no -effect)
//********************************************************************
// This section of code is just for debug, remove when not needed
//********************************************************************
uint8 ledZ = 0x01; //code debug
ControlReg1_Write(ledZ);
CyDelay(250);
ledZ = 0x00;
ControlReg1_Write(ledZ);
CyDelay(250);
ledZ = 0x01;
ControlReg1_Write(ledZ);
CyDelay(250);
ledZ = 0x00;
ControlReg1_Write(ledZ);
CyDelay(250);
//*******************************************************************
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
// Start the LCD and Display
LCD_Start ();
LCD_Position(0u,0u);
LCD_PrintString("Pressure->");
LCD_Position(1u,0u);
LCD_PrintString("Temp->");
CyDelay(2000);
ledZ = 0x01;
ControlReg1_Write(ledZ);
CyDelay(1000);
//Start the SPI master component
SPIM_Start();
for(;;) //This loops forever, part of design template
{
/* Place your application code here. */
SPIM_WriteTxData(0x24u);
SPIM_WriteTxData(0x00u);
SPIM_WriteTxData(0x00u);
SPIM_WriteTxData(0x00u);
ledZ = 0x02;
ControlReg1_Write(ledZ);
CyDelay (1000);
ledZ = 0x03;
ControlReg1_Write(ledZ);
CyDelay (1000);
}
}
// [] END OF FILE */
Well let me know if anything obvious pops out at you, and I appreciate any help offered, oh and if you know of a good debugger tutorial let me know.
Thanks
Show Lesswhen i create this loop
"
for(a = 0; a < samples; a++)
{
sprintf(buffer,"%4.2d\t %6.2ld \n", a,adcCounts);
FS_Write(pFile,buffer,sizeof(buffer));
CyDelay(1);
}
"
Build error: ERROR: L107: ADDRESS SPACE OVERFLOW XDATA ?XD?EMFILE_1_CONFIGMMC_SPI 001000H
is it normal to happen?
Regards,
Romil
Show Lesshi,
i configure PGA with this configuration : PGA_1_Start(); PGA_1_SetGain(PGA_1_GAIN_04);
And the schematic is attach.
I put in P60 a sinwave with 0.5 volt peak to peak(vpp) and the P62 i only have approximately 1.2 vpp.
If i set Gain=08 i get on P62 approximately 2.1 vpp,
is it normal?
Hi everyone,
I am using USBUARTwith PSoC 5LP. I would like to send "unsigned int" to my computer.
If I use
sprintf(buf, "%d\t%d\t%d\t%d\n\r",data[0],data[1],data[2],data[3],data[4]);
while(USBUART_1_CDCIsReady() == 0u);
USBUART_1_PutString(buf);
It works well if I use PutString, but i want to send my data into an interface so I have to use PutChar. But when try
for(j=0;j<4;j++){
while(USBUART_1_CDCIsReady() == 0u);
USBUART_1_PutChar((data
while(USBUART_1_CDCIsReady() == 0u);
USBUART_1_PutChar((data
}
Everytime there are datas missing. I don't understand why instead of receive 8 chars i receiv sometine 6, 7...
Thank you very much
btw I made the initialization of the USB like this:
USBUART_1_Start(0u, USBUART_1_3V_OPERATION);
while(!USBUART_1_GetConfiguration());
USBUART_1_CDC_Init();
while(USBUART_1_CDCIsReady() == 0u) ;
Show LessI'm using a pair of timer modules in one-shot mode to perform some frequency analysis. I've looked through the component datasheet, and I see no software API function to check if a hardware controlled timer has been triggered and is in the process of counting. There isn't much material in the datasheet covering the one-shot mode either, so it's possible that I'm simply unaware of an aspect of the one-shot mode functionality.
I've tried a few ISR and logic setups but so far I've been unable to successfully determine when a timer module is triggered.
Has anyone run into this same problem and found a hardware or software-based solution? Thanks in advance for any suggestions.
Show LessHi
How can I add a watch to a char variabel, when I debug, to read what I am getting. I am reading from a UART port.
char response[100] = {0};
do {
if(GPRS_1_GetRxBufferSize() != 0){
response[x++] = UART_1_GetChar();
}
Best regards
Show LessHi!
I wanted to send a matlab data file (.mat) to the psoc flash periodically via USB.
So i wanted to ask where to start? How would I convert the .mat file to an acceptable transfer file type?
Regards
Masab
Show Less