Author |
Message |
Topic: convert int to char |
apcaye
Replies: 17
Views: 39728
|
Forum: General CCS C Discussion Posted: Mon Mar 29, 2010 6:06 am Subject: convert int to char |
I don't know if I understood your question correctly, Simbo, but my suggestion is to call "kbd_getc()" three times to get three digits. Call the macro "toint(c)" on each digit and ... |
Topic: Global variables with multiple compilation units |
apcaye
Replies: 16
Views: 30106
|
Forum: General CCS C Discussion Posted: Fri Jun 19, 2009 6:53 am Subject: Global variables with multiple compilation units |
You're welcome, Otto. In case no other user helps you, I would recommend you send an e-mail to CCS technical support. They usually answer quickly, in the same day when possible. You can attach your pr ... |
Topic: Global variables with multiple compilation units |
apcaye
Replies: 16
Views: 30106
|
Forum: General CCS C Discussion Posted: Wed Jun 17, 2009 11:40 am Subject: Global variables with multiple compilation units |
Hi Guest,
I don't believe anybody is going to give you an example, because multiple-unit projects are usually complex and they involve company privacy. I would suggest that you try to do it yoursel ... |
Topic: Compiler problems - Access violation |
apcaye
Replies: 3
Views: 5319
|
Forum: General CCS C Discussion Posted: Tue Jun 09, 2009 6:54 am Subject: Compiler problems - Access violation |
To fix the first problem, I would suggest you to delete your current project workspace file and create a new one, using the Project Wizard if you are using MPLAB IDE. Check that all your project sourc ... |
Topic: Global variables with multiple compilation units |
apcaye
Replies: 16
Views: 30106
|
Forum: General CCS C Discussion Posted: Tue Jun 09, 2009 6:27 am Subject: Global variables with multiple compilation units |
I also have multiple-unit projects and I have to organize my projects differently from the standard C because of the particularities of CCS compiler. I have indeed to #include .c files in the main pro ... |
Topic: Strange behavior in MPLAB IDE compiling |
apcaye
Replies: 12
Views: 17316
|
Forum: General CCS C Discussion Posted: Mon Jun 01, 2009 8:53 am Subject: Strange behavior in MPLAB IDE compiling |
I tried that, PCM programmer, thank you very much. I built a new project in a new directory, using the Project Wizard. This time I have good news: I could finally compile my project successfully and s ... |
Topic: Comparator interruption for 16F877A [solved] |
apcaye
Replies: 23
Views: 22821
|
Forum: General CCS C Discussion Posted: Mon Jun 01, 2009 6:19 am Subject: Comparator interruption for 16F877A [solved] |
You're welcome, Salenko. Agreed, the simulators are not always right, although I have to say that the MPLAB simulator use to work very well, it never disappointed me.
Adriano. |
Topic: Strange behavior in MPLAB IDE compiling |
apcaye
Replies: 12
Views: 17316
|
Forum: General CCS C Discussion Posted: Fri May 29, 2009 2:46 pm Subject: Strange behavior in MPLAB IDE compiling |
Thanks, PCM programmer. I have checked that I don't have the PIC16F628A.h file in my project directory. The only place where it is located is the path C:\Program Files\PICC\Devices.
I have install ... |
Topic: Global variables with multiple compilation units |
apcaye
Replies: 16
Views: 30106
|
Forum: General CCS C Discussion Posted: Fri May 29, 2009 7:25 am Subject: Global variables with multiple compilation units |
Are you using MPLAB IDE? You have to include only main.c in the Source Files section (Project window). In CCS compiler, you have to concentrate everything in the main source code file. I wouldn't use ... |
Topic: Avionic SW |
apcaye
Replies: 1
Views: 2871
|
Forum: General CCS C Discussion Posted: Fri May 29, 2009 7:05 am Subject: Avionic SW |
Why not? There are many microcontrollers and compilers that are suitable to a determined application. You can even download a trial version from CCS or other compilers and choose the one that best sui ... |
Topic: I am confused......... |
apcaye
Replies: 4
Views: 4662
|
Forum: General CCS C Discussion Posted: Thu May 28, 2009 10:31 am Subject: I am confused......... |
Totally agreed, Ttelmah. I was trying to help Lion in a previous thread with the same problem as this one, but now I don't feel motivated to continue supporting him/her.
Adriano. |
Topic: Comparator interruption for 16F877A [solved] |
apcaye
Replies: 23
Views: 22821
|
Forum: General CCS C Discussion Posted: Thu May 28, 2009 9:06 am Subject: Comparator interruption for 16F877A [solved] |
You're right, you should see your code working in the simulation before flashing it to the micro controller. And what about the TRIS register, have you checked if the comparator input pins are really ... |
Topic: Comparator interruption for 16F877A [solved] |
apcaye
Replies: 23
Views: 22821
|
Forum: General CCS C Discussion Posted: Wed May 27, 2009 2:20 pm Subject: Comparator interruption for 16F877A [solved] |
If you set CMIF flag and the interrupt routine is called, it's because the comparator interrupt is enabled indeed. There is nothing else to be configured related to that. I ask you then: do you have i ... |
Topic: Strange behavior in MPLAB IDE compiling |
apcaye
Replies: 12
Views: 17316
|
Forum: General CCS C Discussion Posted: Wed May 27, 2009 1:14 pm Subject: Strange behavior in MPLAB IDE compiling |
Thanks, Ttelmah. I recognize that calling a function from inside an interrupt routine is not good programming practice, but this same routine has already worked for me in another project. Inside the i ... |
Topic: Comparator interruption for 16F877A [solved] |
apcaye
Replies: 23
Views: 22821
|
Forum: General CCS C Discussion Posted: Wed May 27, 2009 12:21 pm Subject: Comparator interruption for 16F877A [solved] |
Just a detail, Salenko: the bit you should set is in the PIE2 register, not in the PIR2. So, the instruction that enable the comparator interrupt should be:
bit_set(PIE2,6);
Just change one let ... |
|