Author |
Message |
Topic: Pointer? issue (previous identifier must be a pointer) |
bwgames
Replies: 2
Views: 4213
|
Forum: General CCS C Discussion Posted: Wed Sep 05, 2007 7:15 am Subject: Pointer? issue (previous identifier must be a pointer) |
To be used to access an array, rx_char, needs to be a char*, not a char (it automatically is this type, if the declaration is of an array). What is the actual declaration line, for 'rx_char'...
Bes ... |
Topic: Pointer? issue (previous identifier must be a pointer) |
bwgames
Replies: 2
Views: 4213
|
Forum: General CCS C Discussion Posted: Wed Sep 05, 2007 4:47 am Subject: Pointer? issue (previous identifier must be a pointer) |
Using CCS 4.053.
*** Error 66 Line 251(51,52): Previous identifier must be a pointer
if((manualrx>0)&&(manualrx<4)) { rx_char[manualrx-1] = b0_ ... |
Topic: Counter problems |
bwgames
Replies: 1
Views: 3448
|
Forum: General CCS C Discussion Posted: Wed Sep 06, 2006 2:33 am Subject: Counter problems |
I have the below code to read from an EEPROM and output several lines at once (rather than having to read the EEPROM for each line which slows it down), yet I don't get any output apart from:
&quo ... |
Topic: memcpy |
bwgames
Replies: 3
Views: 4787
|
Forum: General CCS C Discussion Posted: Mon Sep 04, 2006 8:09 am Subject: memcpy |
Wouldn't it be easier to use the internal EEPROM? CCS provide commands and examples (EXT_INTEE.C) for this.
e.g. (not checked and it only works if your ID is 8bytes maximum.)
char ID;
char rea ... |
Topic: USB & RS232 Question |
bwgames
Replies: 6
Views: 7063
|
Forum: General CCS C Discussion Posted: Mon Sep 04, 2006 8:08 am Subject: USB & RS232 Question |
Oops sorry, you're quite right, only noticed the NAND gate (74HC00).
Although it may be worth looking at something like a SPDT analog switch (part number escapes me at the moment) in which case you ... |
Topic: USB & RS232 Question |
bwgames
Replies: 6
Views: 7063
|
Forum: General CCS C Discussion Posted: Mon Sep 04, 2006 3:56 am Subject: USB & RS232 Question |
Another way, and the way I use, is to use a analog switch for the RX line. This has the advantage of simply requiring power connections, one wire to PIC, and two wires to the USB/serial connectors. |
Topic: ICSP (ICD2) and running programs - Problem |
bwgames
Replies: 1
Views: 7096
|
Forum: General CCS C Discussion Posted: Thu Aug 31, 2006 4:11 am Subject: ICSP (ICD2) and running programs - Problem |
I'm having a very strange problem with my ICSP and program.
My program uses hardware and software RS232; when it powers on, it initialises variables etc and outputs "Running..." to the so ... |
Topic: Multiple PIC communication |
bwgames
Replies: 34
Views: 34226
|
Forum: General CCS C Discussion Posted: Sun Aug 27, 2006 8:51 am Subject: Multiple PIC communication |
Thanks for your feedback, it is *very* helpful.
Just looked at CAN bus and it seems that only messages of 8bytes can be transmitted?
http://www.ccsinfo.com/product_info.php?products_id=CANbuskit ... |
Topic: Multiple PIC communication |
bwgames
Replies: 34
Views: 34226
|
Forum: General CCS C Discussion Posted: Fri Aug 25, 2006 10:06 am Subject: Multiple PIC communication |
Thanks very much for your replies, you've both helped clear it up for me.
So, RS-485 is basically RS-232 but with the ability for more than one device? I can use fprintf etc with it?
Thats bril ... |
Topic: Multiple PIC communication |
bwgames
Replies: 34
Views: 34226
|
Forum: General CCS C Discussion Posted: Fri Aug 25, 2006 8:46 am Subject: Multiple PIC communication |
Hiya,
(Using 18F452s, but this can be changed if need be, with CCS 3.249 all at 40Mhz)
I'm looking at interfacing 4/5 PICs together, one master and the rest are slaves, but I need the slaves to ... |
Topic: delay_ms using floats |
bwgames
Replies: 9
Views: 10915
|
Forum: General CCS C Discussion Posted: Wed Aug 23, 2006 8:32 am Subject: delay_ms using floats |
Line 1160(15,20): Floating point numbers not supported for this operation
I don�t know what are you trying to do using float, but I guess that you misunderstand the use of float and int32.
... |
Topic: delay_ms using floats |
bwgames
Replies: 9
Views: 10915
|
Forum: General CCS C Discussion Posted: Wed Aug 23, 2006 6:23 am Subject: delay_ms using floats |
Cheers, I tried implementing that, but I got
Line 1160(15,20): Floating point numbers not supported for this operation
If I do (int32) typecasting, will it round it up to the nearest integer?
... |
Topic: delay_ms using floats |
bwgames
Replies: 9
Views: 10915
|
Forum: General CCS C Discussion Posted: Wed Aug 23, 2006 5:21 am Subject: delay_ms using floats |
I have an int32 which contains a sample frequency in Hz.
I want to convert this to the corresponding delay time.
This works fine, by doing:
//sample_num, delay and sample_speed are all define ... |
Topic: delay_ms using floats |
bwgames
Replies: 9
Views: 10915
|
Forum: General CCS C Discussion Posted: Wed Aug 23, 2006 4:00 am Subject: delay_ms using floats |
Does delay_ms support using floats?
e.g. I have a variable, delay, which has the value 3.999999E+01 (from fprintf,"%f,delay).
I then use delay_ms(delay);.
Should this work? I seem to be ... |
Topic: rs232 problem |
bwgames
Replies: 5
Views: 7364
|
Forum: General CCS C Discussion Posted: Tue Aug 22, 2006 5:52 am Subject: rs232 problem |
I am using very similar components (easy radio and PIC18F452).
Something like below should do the job much more simply?
while(1)
{
char c[8];
char d;
for(i=0;i ... |
|