CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 42 matches
CCS Forum Index
Author Message
  Topic: Problem with calculate PWM PIC18F2480
ntrungtruc2003

Replies: 2
Views: 8226

PostForum: General CCS C Discussion   Posted: Thu Oct 26, 2017 5:47 pm   Subject: Problem with calculate PWM PIC18F2480
Thanks temtronic

The prolem has solved,

Because PC817 connect to Resistor 220 Ohm, therefore I have changed to 10K,
It's run.

Best regards
  Topic: Problem with calculate PWM PIC18F2480
ntrungtruc2003

Replies: 2
Views: 8226

PostForum: General CCS C Discussion   Posted: Tue Oct 24, 2017 8:54 pm   Subject: Problem with calculate PWM PIC18F2480
Dear Sir

I have a problem with output PWM PIC18F2480 (PIN RC2).
I want to use AD0 to output PWM CCP1 from 0-100%.


PWM Period = (PR2) + 1] • 4 • T OSC •(TMR2 Prescale Va ...
  Topic: problem with input(PIN_B1) PIC18F2480
ntrungtruc2003

Replies: 5
Views: 12824

PostForum: General CCS C Discussion   Posted: Thu Oct 12, 2017 7:47 am   Subject: The problem is solved
Thanks everybody in here.

- The problem is PIC18F2480 have Analog input PIN_B0, PIN_B1, therefore just config: setup_adc_ports(AN0_TO_AN2); the problem is solved.
- I have also modified ...
  Topic: problem with input(PIN_B1) PIC18F2480
ntrungtruc2003

Replies: 5
Views: 12824

PostForum: General CCS C Discussion   Posted: Wed Oct 11, 2017 9:42 am   Subject: problem with input(PIN_B1) PIC18F2480
Dear Sir.

I want to test a simple command input(PIN_B1) from PIC18F2480, but I can not change the state input PIN_B1.

I have already configured fast_io(b), set_tris(0x03) // B0, B1 is input ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Sun Sep 17, 2017 9:00 pm   Subject: The problem is solved
Thanks Ttelmah in this forum.

For a long time, I known why the result from ADC returned not true.

The key is TI recommends always sending a START/SYNC command
immediately after the CM bit is se ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Fri Aug 18, 2017 5:48 am   Subject: Read RSC pressure sensor honeywell
Thanks Sir

I know my problem is convert ADC Pressure,

I go back to ADC pressure again. Because the temperature is true with temp[3] = MSB, temp[2] = , temp[1] = LSB, this result after convert t ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Thu Aug 17, 2017 5:04 am   Subject: Read RSC pressure sensor honeywell
Thanks for your response

- EPROM parameters are IEEEE
-ADC is signed int32
-When calculate ADC convert to float.


float Pressure(void)
{
float Pint1, Pint2, Pcom_fs, Pcomp;
f ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Wed Aug 16, 2017 1:18 am   Subject: Read RSC pressure sensor honeywell
Thanks for your response.

Next step is calculate press compensated.


The value adc pressure return press2 byte press
int32 p = make32(0,press

float Pressure(void)
{

float ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Tue Aug 15, 2017 3:50 am   Subject: Read RSC pressure sensor honeywell
Thanks Ttelmah very much.
After copy all parameters 61, 63, 65, 67 from eprom into register 0, 1,2,3 ADC
the MSB ADC press return a value non-zero, still using single mode in ADS220.

address 61 ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Mon Aug 14, 2017 6:29 am   Subject: Read RSC pressure sensor honeywell
Thanks for your response

After make a excel calculate i recognized the MSB data of press ADC = 0 will be not true in Pcom result.

All parameters for calculate P read from EPROM SPI mode 0

Off ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Sun Aug 13, 2017 8:00 am   Subject: Read RSC pressure sensor honeywell
Hi, after read AD1220 datasheet again, I know the time conversation is tclk * 204850 = 0.8 ms with clk =256khz.

But the adc press return press

void ReadADCTemperature()
{
ou ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Sat Aug 12, 2017 8:39 am   Subject: Read RSC pressure sensor honeywell
Thanks Sir

I will try to solve my problem
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Sat Aug 12, 2017 2:53 am   Subject: Read RSC pressure sensor honeywell
Thanks Sir

After checked with datasheet, the calculated temperature is true. I just read the positive temperature therefore don't need to process sign bit, the full function to calculate temperatu ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Fri Aug 11, 2017 7:17 am   Subject: Read RSC pressure sensor honeywell
case 1:

float Temperature(void)
{
int32 a;
a = make32(temp[3], temp[2], temp[1],temp[0]);
a>>=10;
//float b = f_IEEEtoPIC( a) ...
  Topic: Read RSC pressure sensor honeywell
ntrungtruc2003

Replies: 28
Views: 52458

PostForum: General CCS C Discussion   Posted: Fri Aug 11, 2017 7:05 am   Subject: Read RSC pressure sensor honeywell
Thank Sir for Texas ADS1220 in this sensor.

The adc temperature read back, but i have a problem with calculate

temp
void ReadADCTemperature()
{
output_high(CS_EE); ...
 
Page 1 of 3 Goto page 1, 2, 3  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group