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 44 matches
CCS Forum Index
Author Message
  Topic: How to use setup_wdt(mode) in PIC12F1840
cchappyboy

Replies: 0
Views: 2834

PostForum: General CCS C Discussion   Posted: Wed Jan 25, 2012 11:50 am   Subject: How to use setup_wdt(mode) in PIC12F1840
I used PIC12f1840 in my project.

How do i use setup_wdt() to setup expired time. It looks it only work with setup_wdt(WDT_ON). It doesn't work with setup_wdt(WDT_TIMES_1024) or setup_wdt(WDT_2304MS ...
  Topic: Use timer interrupts to start transmitting interrupts
cchappyboy

Replies: 1
Views: 3943

PostForum: General CCS C Discussion   Posted: Tue Jan 10, 2012 4:05 pm   Subject: Use timer interrupts to start transmitting interrupts
Is that possible to start a transmitting interrupts in a timer interrupt for sending out data once in certain time period.

#int_timer1
void time1_isr()
{
set_timer1(0xbf5); ...
  Topic: PIC12F1840 INT_RDA & INT_TBE
cchappyboy

Replies: 7
Views: 15781

PostForum: General CCS C Discussion   Posted: Tue Jan 10, 2012 11:38 am   Subject: PIC12F1840 INT_RDA & INT_TBE
No I didn't do that because the hardware pins set should be pin_a4 is TX and pin_a5 is RX.

I add some code to my program and now it works with #int_ and #int_tbe

#bit RXDTSEL=APFCON.7//if =1 pi ...
  Topic: PIC12F1840 INT_RDA & INT_TBE
cchappyboy

Replies: 7
Views: 15781

PostForum: General CCS C Discussion   Posted: Mon Jan 09, 2012 11:31 am   Subject: PIC12F1840 INT_RDA & INT_TBE
Thanks Ttelmah.

It looks it 's not in this case.
I put there whatever it is

#pin_selects tx=pin_a4
#pin_selects rx=pin_a5
or

#pin_selects tx1=pin_a4
#pin_selects rx1=pin_a5
or

#pin_s ...
  Topic: PIC12F1840 INT_RDA & INT_TBE
cchappyboy

Replies: 7
Views: 15781

PostForum: General CCS C Discussion   Posted: Mon Jan 09, 2012 10:20 am   Subject: PIC12F1840 INT_RDA & INT_TBE
Hi Ttelmah, I tried EX_STISR.c

Please see below:

#include <12F1840.h>

#fuses INTRC_IO
#use delay(internal=4M)
#use rs232(baud=9600, xmit=pin_a4,rcv=pin_a5)

#define ...
  Topic: PIC12F1840 INT_RDA & INT_TBE
cchappyboy

Replies: 7
Views: 15781

PostForum: General CCS C Discussion   Posted: Sat Jan 07, 2012 11:24 am   Subject: PIC12F1840 INT_RDA & INT_TBE
I use 4 MHz INTRC working under baud 9600

#fuses INTRC_IO
#use delay(internal=4M)
#use 232(baud=9600,xmit=pin_a4,rcv=pin_a5)

#byte RCSTA=0x19D
#byte TXSTA=0x19e
#bit TXIE=0x ...
  Topic: How to use 'break' jump out of 3 nested loop?
cchappyboy

Replies: 2
Views: 4946

PostForum: General CCS C Discussion   Posted: Wed Jun 01, 2011 9:28 am   Subject: How to use 'break' jump out of 3 nested loop?
Hi

I want to use 'break' jump out of loops. The code in below.

while(condition1)
{
while(condition2)
{
while(condition3)
{
...
  Topic: Is there any way to output floating number.
cchappyboy

Replies: 1
Views: 3250

PostForum: General CCS C Discussion   Posted: Wed Mar 02, 2011 6:52 pm   Subject: Is there any way to output floating number.
Hi

I want to output floating number like x=0.0176,
how can i make it?\

if i use
printf("x=%f",x);

it is going to output x=0.17 other then 0.0176

what should i do if i want get ...
  Topic: There is not clock output from SPI!
cchappyboy

Replies: 0
Views: 2844

PostForum: General CCS C Discussion   Posted: Thu Feb 10, 2011 12:46 pm   Subject: There is not clock output from SPI!
I used dspic33fj32mc, ccs compiler 4.118
The code is like this,

#use delay(clock=8M)
#pin_select SDI1=pin_b3
#pin_select SDO1=pin_c1
#pin_select SCK1OUT=pin_c2
#use spi(spi1,mast ...
  Topic: Something About #word
cchappyboy

Replies: 3
Views: 5005

PostForum: General CCS C Discussion   Posted: Wed Jan 26, 2011 9:58 am   Subject: Something About #word
yes. you are right. but actually in my program file there isn't this ";" , it is a mistake when i post in here.
So the problem is still there. Please give me a help!
  Topic: Something About #word
cchappyboy

Replies: 3
Views: 5005

PostForum: General CCS C Discussion   Posted: Tue Jan 25, 2011 5:40 pm   Subject: Something About #word
I use 33fj128MC804, I met a problem here.
Please see the code below.

struct rp
{
int8 lowByte;
int8 upperByte;
};
struct rp rp1;
#word rp1=0x06a4;
rp1.lowByte=0x17;//<----- ...
  Topic: Printf used in dsPIC33f
cchappyboy

Replies: 9
Views: 14377

PostForum: General CCS C Discussion   Posted: Thu Nov 18, 2010 12:02 pm   Subject: Printf used in dsPIC33f
Thanks JDS-PIC
  Topic: Printf used in dsPIC33f
cchappyboy

Replies: 9
Views: 14377

PostForum: General CCS C Discussion   Posted: Thu Nov 18, 2010 10:51 am   Subject: Printf used in dsPIC33f
Thanks you guys.

According your guys analysis, I try so many way to find out what is going on there. Finally I make a 1 second led flash program as Ttelmah said. I found it was 1.07 seconds other ...
  Topic: Printf used in dsPIC33f
cchappyboy

Replies: 9
Views: 14377

PostForum: General CCS C Discussion   Posted: Wed Nov 17, 2010 4:52 pm   Subject: Printf used in dsPIC33f
Thanks for your response.
I did some changes:

#use rs232(baud=9600,xmit=pin_f5,rcv=pin_f4,bits=8,stop=1,parity=n)
unsigned int8 i=0;
for(i=0;i<5;i++)
{

printf&# ...
  Topic: Printf used in dsPIC33f
cchappyboy

Replies: 9
Views: 14377

PostForum: General CCS C Discussion   Posted: Wed Nov 17, 2010 3:07 pm   Subject: Printf used in dsPIC33f
I used dsPIC33F want to print out:

0 CrLf
1 CrLf
2 CrLf
3 CrLf
4 CrLf
A CrLf

The program like this

for(i=0;i<5;i++)
{
printf("%2x",i);
printf(& ...
 
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