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 9 matches
CCS Forum Index
Author Message
  Topic: Problems with dynamic memory in CCS (calloc and malloc)
plateau

Replies: 3
Views: 7193

PostForum: General CCS C Discussion   Posted: Thu Jan 24, 2013 6:08 am   Subject: Problems with dynamic memory in CCS (calloc and malloc)
The code looks OK. You are taking into account the trailing zero that C strings require?

I would seriously recommend avoiding dynamic memory on microcontrollers. PICs don't have enough memory to ma ...
  Topic: Problems with dynamic memory in CCS (calloc and malloc)
plateau

Replies: 3
Views: 7193

PostForum: General CCS C Discussion   Posted: Wed Jan 23, 2013 5:04 pm   Subject: Problems with dynamic memory in CCS (calloc and malloc)
HiHo, friends, are you all fine?

After so much problems in handling the interrupts, I've decided to use the KBHIT approach ( char* leStringEEPROM(int8 low, int8 high){
//char* texto ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Wed Jan 23, 2013 4:58 pm   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
HiHo, friends, are you all fine?

After so much problems in handling the interrupts, I've decided to use the KBHIT approach. Now, everything is ok but I have a doubt about dynamic memory use.

In ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sun Jan 20, 2013 11:15 am   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
kbhit -> bkbhit
getc -> bgetc

Modify the sisr code to use fgetc, where it uses getc

Best Wishes

Ok dok, Sir! I'm going to lunch and I'll make these change later.

In my case, how can ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sun Jan 20, 2013 10:47 am   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
Do you know how much data you have to handle?

Like Ttelmah says EX_SISR.C shows how to implement a serial input buffer.

When I get stuck with comms I get a PC to play at being one end of the sys ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sun Jan 20, 2013 8:27 am   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
Look at ex_sisr.c
The delays don't particularly matter, provided you remember that as written, you only have 2mSec of buffering on this UART. Most GPS's once they are started, keep sending their data ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sun Jan 20, 2013 8:10 am   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
What is not working?

Can you tell where it's stuck?

Try removing most of the functions, deal with the most important ones first. I.e. simplify what you're doing.

Mike

Hello, Mike.

After ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sun Jan 20, 2013 5:39 am   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
The command to get a character from a stream, is fgetc, not getc.
getc defaults to getting from the last RS232 defined. So your interrupt hangs waiting for a character on the second stream.....

Be ...
  Topic: [SOLVED]Problems to handle RS232 interrupts in CCS
plateau

Replies: 12
Views: 19753

PostForum: General CCS C Discussion   Posted: Sat Jan 19, 2013 9:51 pm   Subject: [SOLVED]Problems to handle RS232 interrupts in CCS
Hiho, folks, is everybody ok?

I'm making a Track System using a GSM and GPS module, both controlled by a PIC18F4680. At the moment, I'm facing a big problem to handle the data that come through USA ...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group