PSoC™ 5, 3 & 1 Forum Discussions
my basic aim is to interface thermocouple with psoc. I have accomplished the reference junction temp measuring using temp sensor which is working perfectly but regarding the measuring jn, i have used the INSAMP along with ADCINCVR and m trying to display the adc counts on lcd. The latter part is nt being implemented. Below is my source c file and the design file view is also attached:
#include <m8c.h> // part specific constants and macros
#include "PSoCAPI.h" // PSoC API definitions for all User Modules
void main(void)
{
int a,b,c,d,e,f,i,g,h,sum,sum1,p,q;
double display,reading;
double volt,temp;
M8C_EnableGInt; // Enable global interrupts
PGA_SetGain(PGA_G8_00);
PGA_Start(PGA_HIGHPOWER);
INSAMP_Start(INSAMP_HIGHPOWER);
INSAMP_SetGain(INSAMP_G16_0);
ADCINCVR_Start(ADCINC_HIGHPOWER);
ADCINC_GetSamples(0);
ADCINCVR_SetResolution(10);
LCD_Init();
LCD_Start(); // Initialize LCD
LCD_Position(0,2); // Place LCD cursor at row 0, col 2.
LCD_PrCString("Temparature");
ADCINCVR_1_Start(ADCINCVR_HIGHPOWER); // Turn on Analog section
ADCINCVR_1_SetResolution(10); // Set resolution to 10 Bits
ADCINCVR_1_GetSamples(0); // Start ADC to read continuously
for(;;)
{
sum=0;
for(i=0;i<10;i++)
{
while(ADCINCVR_fIsDataAvailable() == 0); // Wait for data to
// be ready.
a = (ADCINCVR_iGetData()+512); // Get Data
sum=sum+a;
ADCINCVR_ClearFlag();
}
display=sum/10;
f=display*(.033)+13.2325;
g=f/1000;
b=(f/100)%10;
c=(f/10)%10;
d=(f%100)%10;
e=sum%10;
LCD_Position(1,2);
LCD_PrHexByte(16*g+g);
LCD_Position(1,3);
LCD_PrHexByte(16*b+b);
LCD_Position(1,4);
LCD_PrHexByte(16*c+c);
LCD_Position(1,5);
LCD_PrHexByte(16*d+d);
LCD_Position(1,6);
LCD_PrCString(".");
LCD_PrHexByte(16*e+e);
LCD_Position(1,8);
LCD_PrCString("C ");
sum1=0;
for(i=0;i<10;i++)
{
while(ADCINCVR_1_fIsDataAvailable() == 0); // Wait for data to be ready.
p= (ADCINCVR_iGetData()+ 512 ); // Get Data
sum1=sum1+p;
ADCINCVR_1_ClearFlag();
}
reading=sum1/10;
q=reading;
LCD_Position(0,2);
LCD_PrHexInt(q);
}
}
Show Less
I'm not sure if the PWM and the Timer Status Register is the same.
There's some information in the Thecnical Reference Manual pag (286)
And looking into the Register TRM I only found the Timer Status Register on page
310.
http://www.cypress.com/?app=search&searchType=keyword&keyword=Document No. 001-50235 Rev. *D
But , even so, Its don't look like to be th same fields described into the 29 page PWM datasheet
http://www.cypress.com/?docID=20787
Are the same or not?
I want to handle the PWM tc bit.
Regards
Show Less
I have a problem with conversion rate in ADC_DelSig.
My config is:
* High Power
* Continuous Mode
* Resolution: 12b
* Conversion Rate: 50000 SPS
* Clock frequency: 1600 KHz
* Input Range: Input+/- Vref/4
* Buffer Gain: 8
The datasheet states: (See screenshot attached).
I'm interested in the Continuous mode column.
The program put's you an error message if you exceeds the 600KHz datasheet of clock frequency, but
the datasheets don't sais that.
I tried to put a external source clk with higher freq. The error message still apearing.
What I'm doing wrong?
How I could reach higher samples rates arround 50000 or 100000 SPS?
Thanks.
Show LessHello,
I got the PSoC FirstTouch Starter Kit with cyfi Low-Power RF (CY3271) and have a problem to run the RC Bridge Wireless Hub firmware. I followed the description of the cy3271 Kit Guide manual.
My Problem is that I can't change the IRQ_Pin to Port_2_6 of the RF-CYFISNP Module. It is also not possible to change the nSS_Pin to Port_2_7. I get only the following choices:
IRQ_Pin: None, Port_2_1, Port_2_2, Port_2_4
nSS_Pin: None, Port_2_1, Port_2_2, Port_2_4
I have already taken note of this page, and made the changes:
http://www.cypress.com/?rID=39430
I use the PSoC Designer 5.0
does anyone know how to fix the problem?
Best regards, Nico
H. Peter
Show LessHi, I'm trying to use the ActiveX control in C# to create the bridge between the app and programmer. I imported the control and pasted this code in from the document: http://www.cypress.com/?docID=22268
It's giving me a warning about the namespace "USB2IICcom_EXEClass" and saying it cannot be found. Any ideas on why this won't work?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using USB2IIC;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
USB2IICcom_EXEClass Bridge;
public Form1()
{
InitializeComponent();
}
private void buttonConnect_Click(object sender, EventArgs e)
{
if (Bridge != null) return; // Bridge is already connected
// Create Bridge Instance
Bridge = new USB2IICcom_EXEClass();
// Connect Events
Bridge.BridgeConnected = OnBridgeConnect;
Bridge.BridgeDisconnected = OnBridgeDisconnect;
// Start USB Communication
Bridge.InitUSB2IIC(Process.GetCurrentProcess().Id);
}
private void buttonDisconnect_Click(object sender, EventArgs e)
{
Bridge = null;
GC.GetTotalMemory(true);
}
private void OnBridgeConnect(string BridgeID, string str)
{
MessageBox.Show("Connected: " BridgeID);
}
private void OnBridgeDisconnect(string BridgeID)
{
MessageBox.Show("Disconnected: " BridgeID);
}
}
}
Show Less
I try to initializate the PWM reset by means an interruption.
There's a User Module called Interrupt v 1.20 in the resorces catalog.
The problem is I get the next error:
" No drivers on signal "Net_184", bit(s) "0".Every signal bit must have exactly one driver (e.g., connected to one schematic input terminal or one instance output terminal). The given bits do not have any drivers. Add drivers for the indicated signal bits. "
But I still need to feed the PWM reset with a pulse to initiate the period counter.
What I'm doing wrong?
Thanks
Show Lessint hdata,hdataprev;
char factor = 0x03
if(hdata > (hdataprev + (int)factor)){
do A
}else{
do B
}
if hdata is like 0xFF0A and hdataprev like 0xFF00 , then everything is OK - code A is executed
BUT
when hdata is 0x00AA and hdataprev like above(0xFF00) then code B is executed instead of code A (Positive 0x00AA is greater than negative 0xFF00).
Isn't it?
Robert
I’m in the final stages of selecting a PSoC for my design. I would like to select a model, which offers best flexibility and scalability, and be available for the next 5 to 10 years. I would like to make sure that our hardware design platform will be supported for the next 5 to 10 years without a need for a major re-design, provides enough flexibility to add additional features if needed (firmware/software updates), and provides an easy migration path from PSoC3 to PSoC5, and future PSoC generations.
-- Repost from sibling forum...
I have been using the PSoC 3 successfully for a couple of months, but now have a linker problem after upgrading to Beta 5.
I get this error message: L220: INVALID INPUT MODULE
It is referring to a file named CBC_Slave.LIB. This is my project name, but I can't find any reference to a "LIB" file in the project settings, so I don't know where this file is supposed to come from...
Has anyone else had this problem? Any ideas how to fix?
Thanks, Jim
Show Less