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 15 matches
CCS Forum Index
Author Message
  Topic: memory initialization
edmundopt

Replies: 4
Views: 6059

PostForum: General CCS C Discussion   Posted: Sat Jan 07, 2012 4:38 pm   Subject: memory initialization
thank you, the #ZERO_RAM works like a charm Smile

That was the source of many weird behaviour, because previous values were inside the variables, sometimes all went ok, othertimes complete erratic beh ...
  Topic: memory initialization
edmundopt

Replies: 4
Views: 6059

PostForum: General CCS C Discussion   Posted: Sat Jan 07, 2012 1:34 pm   Subject: memory initialization
Hello all

A question, when declared an array inside main, such as

unsigned int8 spi_buffer[16];

is it normal that, when printing it's contents for the first time, values different fr ...
  Topic: pic18f slave pic16f master SPI vsim
edmundopt

Replies: 4
Views: 9046

PostForum: General CCS C Discussion   Posted: Thu Dec 22, 2011 4:15 am   Subject: pic18f slave pic16f master SPI vsim
Thank you Ttelmah, I will try it in the real life. I think the code is ok, although I had problems with breadboards testing spi, and some pins and wires too thin and so on.

I searched the forum, sp ...
  Topic: pic18f slave pic16f master SPI vsim
edmundopt

Replies: 4
Views: 9046

PostForum: General CCS C Discussion   Posted: Wed Dec 21, 2011 7:29 pm   Subject: pic18f slave pic16f master SPI vsim
Using ccs v4.124

First of all, are there any known problems using Proteus to VSIM spi functions ?

If not, please look at the code:

Master:

#include <16F877A.H>

#fuses HS, NOWDT, N ...
  Topic: CCS compiler 4.124 warning
edmundopt

Replies: 3
Views: 7351

PostForum: General CCS C Discussion   Posted: Wed Dec 21, 2011 9:20 am   Subject: CCS compiler 4.124 warning
Thank you, I will go for the add global to variable name, it's the best option and a smart one, allways learning Smile
Considering the PIC18f, more global variables, or more variables only mean more RAM ...
  Topic: CCS compiler 4.124 warning
edmundopt

Replies: 3
Views: 7351

PostForum: General CCS C Discussion   Posted: Wed Dec 21, 2011 8:19 am   Subject: CCS compiler 4.124 warning
Hello, I would like to know if there's some code, like #pragma or something that makes the compiler show a warning when a global variable is declared more than once!


#pragma case
#include <16 ...
  Topic: pic18f array 16bit index
edmundopt

Replies: 4
Views: 5907

PostForum: General CCS C Discussion   Posted: Tue Dec 13, 2011 8:28 am   Subject: pic18f array 16bit index
so I've got it wrong, the array has a 16bit index, because 3072>255 but the definition of the pointer must be :


unsigned int8 arr[3072];

(...)

unsigned int8 *arrayPointe ...
  Topic: pic18f array 16bit index
edmundopt

Replies: 4
Views: 5907

PostForum: General CCS C Discussion   Posted: Tue Dec 13, 2011 7:33 am   Subject: pic18f array 16bit index
Hello again

first I wich to know if this method for measuring time is precise using simulation, I think it is, I'm measuring sum_eight() speed on a Pic18f4620 using CCS 4.124!


void sum_eight&# ...
  Topic: PIC18f array and arguments
edmundopt

Replies: 6
Views: 8015

PostForum: General CCS C Discussion   Posted: Sun Dec 11, 2011 11:29 pm   Subject: PIC18f array and arguments
Thank you ckielstra!
After taking a look to the ASM, with your code it has saved a lot of instruction cycles, but looking at your idea, I though what about creating a aux array, so suppose that the ...
  Topic: Setting BOR Enabled
edmundopt

Replies: 6
Views: 7380

PostForum: General CCS C Discussion   Posted: Sat Dec 10, 2011 7:11 pm   Subject: Setting BOR Enabled
maybe use

#fuses BORSEN
  Topic: PIC18f array and arguments
edmundopt

Replies: 6
Views: 8015

PostForum: General CCS C Discussion   Posted: Sat Dec 10, 2011 6:26 pm   Subject: PIC18f array and arguments
Thank you for the reply, I was editing the post because I've forgotten the main question. I'll search for the file, thank you!
  Topic: PIC18f array and arguments
edmundopt

Replies: 6
Views: 8015

PostForum: General CCS C Discussion   Posted: Sat Dec 10, 2011 6:12 pm   Subject: PIC18f array and arguments
Hello again

I'm using pic18f4620 and compiler 4.124, after trying to find the correct way to set the configuration register with CCS language, I found the #FUSE NOIESO, what does it do, I've read ...
  Topic: [solved]PIC18f series Hardware multiply
edmundopt

Replies: 5
Views: 8606

PostForum: General CCS C Discussion   Posted: Thu Dec 08, 2011 5:17 pm   Subject: [solved]PIC18f series Hardware multiply
you are right, really bad example about multiplication, because 256 is out of range for int8, anyway thanks because that was the problem in my code, out of range values!

and yes, something like :
...
  Topic: [solved]PIC18f series Hardware multiply
edmundopt

Replies: 5
Views: 8606

PostForum: General CCS C Discussion   Posted: Thu Dec 08, 2011 4:23 pm   Subject: [solved]PIC18f series Hardware multiply
Thank you, I found out that :

unsigned int8 num_high, num_low;
unsigned int8 factor = 256;
unsigned int16 result;

result = num_high * factor;
result = result + num_low;

uses the MULWF..
...
  Topic: [solved]PIC18f series Hardware multiply
edmundopt

Replies: 5
Views: 8606

PostForum: General CCS C Discussion   Posted: Thu Dec 08, 2011 3:58 pm   Subject: [solved]PIC18f series Hardware multiply
First of all, personaly I do not use CCS, but I'm translating my Microchip C18 to CCS v4.124, my question is, when the IC is included, example:

#include <18F4620.h>

the following code :
...
 
Page 1 of 1
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group