PSoC™ 5, 3 & 1 Forum Discussions
In the PSoC1 example project CE82235 is hidden an ugly programming error.
The project reads an ADC voltage, converts it to a float number and displays the result on the LCD. Part of this conversion is ussing ftoa(). The declarations are as follows:
int*status;
LCD_PrString(ftoa(Voltage,status));
Though this is syntactically correct, the author did not follow the usual C-linkage needed. Sinc C only knows "reference by value" for parameters, it is required to specify the address for a parameter that is used to give back a value (like the staus).
Since the *status" is not initialized within the project it is pointing into electronic nirwana giving unpredictable results (modifying memory address zero and one(1)).
What should have been written was:
int status;
LCD_PrString(ftoa(Voltage,&status));
I did not check for similarities in other projects that used ftoa yet, but it may be worth checking for.
Happy coding
Bob
Show LessI have loaded the PWM PRS example and added an LCD to display the CompareValue as a percentage as well as show the CompareValue as a bar graph. The 0 bargraph appears to be all partially on without the hexbyte displayed.
Archive attached
Any suggestions?
Chris
Show LessHello. I would like to hear your opinion on this version of data acquisition module:
ADS7818x8_DIG16_USBUART.zip
I used the ADS7818 as an external ADC.
Short description:
Number of analog channels - 8.
Number of digital channels - 16 (there is the possibility of increasing to 32)
Frequency of data collection - 20 kHz
Transmission channel - USBUART.
It is possible to simulate the ADC data for debugging (in the absence of ADC chips)
To test the project there is a simple program - an oscilloscope (Win32 only).
Program features:
- View up to 8 ADC channels in real time on the screen of the oscilloscope.
- The ability to synchronize on any analog channel.
- View 16 channels of digital data on the other screen.
some day ago, I post a problem of 3280 kit on the USB controller item. I copy the post here:
We just use the 3280 kit to develop a kind of new HID device, which is very interesting(we can introduce the HID device in other post, if someone interest with it).
In the 3280 kit, the explanation in datasheet for CapSecce Wizard is quite perfect, so we can use the CapSence of the kit easily.
In other hand, we also want to use USB interface in the kit for communiction with a host. We find, ther are also "HID Report Temlate Editor" and " USB setup wizard". However, when we open the datasheet for the USB, we can not find appropriate instructions for the " USB setup wizard".
We are raw hands to use USB, and hope to get expert advice.
the platform we use is psoc designer 5.4.
i used the example project to write and read from eeprom. but on reading i am getting 0xff only.
The flash reading will takes some time that cuases the TX8 delay.Time taken by the user module should be (x*9/19200)+ (11*x/24M).When the CPU clock is 24MHz.Note: The ROMX is used read the flash and please refer the assembly guide for the time required to execute the ROMX instruction.
Thanks,
Achuth
Show LessHi!
I managed to get the EZI2Cs(lave) to work. However I need it to be configured in a way which allows me to store more than 1 byte in a I2C Ram Adress.
For example something like this would be neat (modified from the EZI2Cs data sheet):
<p>struct I2C_Regs { // Example I2C interface structure
int status1;
int status2;
} MyI2C_Regs;</p>
with status1 fitting entirely into adress 0x00 and status2 entirely fitting into 0x01.
But instead it will be status1.MSB in 0x00, status1.LSB in 0x01, status2.MSB in 0x02 and status2.LSB in 0x03...
Is there any way to change it and make a multibyte Variable fit into 1 I2C Ram Adress?
Thanks in advance and best regards
Show LessThere is a new PSoC 5 LP board from Embedit Electronics - two new grads from RPI. They launched it on kickstarter earlier this week. It interfaces with Raspberry Pi, Arduino Shields, and Digilent Pmods.
Check it out!
Show LessHello
I have a one shot timer that I want to start multiple times on my demands in software. I have the following setup
For TopDesign see attach picture.
The isr code:
Timer_1_ReadStatusRegister();
/* Set the flag variable */
toggle_flag = 1;
the main code:
CyGlobalIntEnable; /* Uncomment this line to enable global interrupts. */
isr_1_Start();
Timer_1_Start();
for(;;)
{
if(toggle_flag == 1)
{
toggle_flag = 0;
Timer_1_Start();
}
}
But it will only goes into the isr once (because it is a one shot timer). How do I get it to go into the isr multiple time? what did I do wrong?
An other thing in the datasheet for the timer it state the following but it does make complete sence to me can anyone explain?
"Note In order to be sure that One Shot mode does not start prematurely, you should use a
Trigger Mode to control the start time, or use some form of software enable mode (Software
Only or Software and Hardware)."
Martin
Show Less