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 18 matches
CCS Forum Index
Author Message
  Topic: Any ideas on technique?
gribas

Replies: 19
Views: 32972

PostForum: General CCS C Discussion   Posted: Thu Aug 30, 2012 3:37 pm   Subject: Any ideas on technique?
Hi Douglas,

see if this works for you:


#include <18F4525.h>
#device adc=16
#device PASS_STRINGS=IN_RAM
#FUSES NOWDT, WDT128, HS, NOPROTECT, NOIESO, NOBROWNOUT, BO ...
  Topic: Debug / trace macro
gribas

Replies: 2
Views: 8632

PostForum: General CCS C Discussion   Posted: Thu Aug 30, 2012 2:53 pm   Subject: Debug / trace macro
Thanks for the info! After reading that thread I came up with some alternatives that seem to work:


If you want to be able to switch to/from debug mode (debug will be present in production code) ...
  Topic: Debug / trace macro
gribas

Replies: 2
Views: 8632

PostForum: General CCS C Discussion   Posted: Thu Aug 30, 2012 11:20 am   Subject: Debug / trace macro
Hi,

Is there a better way to print debug info? I wasn't able to hide the stream information inside the macro (RS232_STREAM), so I end up with this:


#define DEBUG 1

#define TRACE(x&# ...
  Topic: The insidious abs() function
gribas

Replies: 9
Views: 17213

PostForum: General CCS C Discussion   Posted: Tue Aug 14, 2012 10:04 am   Subject: The insidious abs() function
Hi,

Thanks a lot for your remarks. Ttelmah, I could not find the original ccs macro definition so I modified your's a little:


#define abs2(x) (((signed)(x)&# ...
  Topic: The insidious abs() function
gribas

Replies: 9
Views: 17213

PostForum: General CCS C Discussion   Posted: Tue Aug 14, 2012 8:43 am   Subject: The insidious abs() function
Hi,

I don't see how the value is treated as signed inside the function abs(). If that was the case it should work like my_abs() does. From my perspective I'm feeding the abs() function with the ( ...
  Topic: The insidious abs() function
gribas

Replies: 9
Views: 17213

PostForum: General CCS C Discussion   Posted: Tue Aug 14, 2012 7:39 am   Subject: The insidious abs() function
Hi,


void main() {
int8 a,b,delta;
a = 1;
b = 2;
delta = abs(a-b);
printf("Delta abs(1-2) = %u \r\n",delta);
}


The r ...
  Topic: word address or byte address?
gribas

Replies: 8
Views: 10639

PostForum: General CCS C Discussion   Posted: Thu Aug 14, 2008 4:05 pm   Subject: word address or byte address?
Sorry, I misunderstood your question.

You're right, the PC is always even, which means it can never point to an address like 0x0001. But that doesn't imply that word addressing is used for all acce ...
  Topic: Conversion of Hex data into char format
gribas

Replies: 4
Views: 5963

PostForum: General CCS C Discussion   Posted: Thu Aug 14, 2008 3:02 pm   Subject: Conversion of Hex data into char format
or if you just want to see the incoming data in hex format you could use a better terminal application, like Terminal. There you can see the character 'A' as 41.

http://braypp.googlepages.com/termi ...
  Topic: word address or byte address?
gribas

Replies: 8
Views: 10639

PostForum: General CCS C Discussion   Posted: Thu Aug 14, 2008 2:43 pm   Subject: word address or byte address?
I think you're mixing things up. Do you understand the difference between:

int16 addr16; // 16 bit variable
int32 addr32; // 32 bit variable
int8* addr8p; // pointer to a byte
int ...
  Topic: Stream as a parameter in a function
gribas

Replies: 1
Views: 3202

PostForum: General CCS C Discussion   Posted: Wed Aug 13, 2008 7:48 am   Subject: Stream as a parameter in a function
I don't think that's possible. The compiler expects a constant for the first parameter of fprintf();

this works, but it's kinda useless:

#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7, ...
  Topic: Static variable become global???
gribas

Replies: 3
Views: 7831

PostForum: General CCS C Discussion   Posted: Thu Mar 20, 2008 6:51 am   Subject: Static variable become global???
Hi Franck26,

The 'static' keyword isolates global variables from different compilation units. It also prevents a local function variable from being initialized twice.

I guess you only have ...
  Topic: PIC18F2620 + GPS: Software rs232 problem (solved)
gribas

Replies: 14
Views: 11582

PostForum: General CCS C Discussion   Posted: Tue Mar 11, 2008 1:12 pm   Subject: PIC18F2620 + GPS: Software rs232 problem (solved)

Should the max232 act that way or may be something wrong if it?


It shouldn't oscillate when nothing is being transmitted.
  Topic: PIC18F2620 + GPS: Software rs232 problem (solved)
gribas

Replies: 14
Views: 11582

PostForum: General CCS C Discussion   Posted: Fri Mar 07, 2008 5:56 am   Subject: PIC18F2620 + GPS: Software rs232 problem (solved)
Here's an interrupt driven version.


#include <18F2620.h>
#device adc=8

#FUSES NOWDT, WDT128, HS, NOPROTECT, NOIESO, NOBROWNOUT, BORV21, NOPUT, NOCPD,\
NOSTVREN,NOLV ...
  Topic: PIC18F2620 + GPS: Software rs232 problem (solved)
gribas

Replies: 14
Views: 11582

PostForum: General CCS C Discussion   Posted: Fri Mar 07, 2008 5:28 am   Subject: PIC18F2620 + GPS: Software rs232 problem (solved)
Try this to check the connection:


#include <18F2620.h>
#device adc=8

#FUSES NOWDT, WDT128, HS, NOPROTECT, NOIESO, NOBROWNOUT, BORV21, NOPUT, NOCPD,\
NOSTVREN,NOLVP,N ...
  Topic: PIC18F2620 + GPS: Software rs232 problem (solved)
gribas

Replies: 14
Views: 11582

PostForum: General CCS C Discussion   Posted: Thu Mar 06, 2008 2:19 pm   Subject: PIC18F2620 + GPS: Software rs232 problem (solved)
I think that even if he had other interrupts they would have been disabled because he's reading from inside an interrupt routine.

What drives the external interrupt? How do you know how many byte ...
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group