Author |
Message |
Topic: Array as function parameter |
RF_Developer
Replies: 10
Views: 21105
|
Forum: General CCS C Discussion Posted: Wed May 30, 2018 5:07 am Subject: Array as function parameter |
Sorry, but wrong.
ROM in CCS does mean to store in ROM. The program memory is a read only memory, so is a ROM. The 'special flash code', is _programming_ code....
Sorry, but that is what I wro ... |
Topic: Array as function parameter |
RF_Developer
Replies: 10
Views: 21105
|
Forum: General CCS C Discussion Posted: Tue May 29, 2018 9:54 am Subject: Array as function parameter |
But I want all arrays to be store in ROM.
That is why they are const type.
Const does not mean "store in ROM". For a start most processors don't have anything like ROM. Const means var ... |
Topic: Speeding up software SPI |
RF_Developer
Replies: 30
Views: 55757
|
Forum: General CCS C Discussion Posted: Thu May 24, 2018 6:55 am Subject: Speeding up software SPI |
Thank you for the input.
Okay :-| Why do you think you need more SPIs? What restriction is stopping you using just one? |
Topic: Speeding up software SPI |
RF_Developer
Replies: 30
Views: 55757
|
Forum: General CCS C Discussion Posted: Thu May 24, 2018 3:28 am Subject: Speeding up software SPI |
Not sure I could get away with that as I am reading an SD card on one and talking to a codec on the other.
Eh? With reasonable systems design, one SPI port should be able to meet your needs.
You ... |
Topic: EX_SISR.C modification |
RF_Developer
Replies: 5
Views: 15229
|
Forum: General CCS C Discussion Posted: Fri May 18, 2018 3:26 am Subject: EX_SISR.C modification |
it seems that the 'bkbhit' can receive any character or numbers
No. bkbhit() returns just true (not zero) or false (zero). It tells you whether there are any characters in the buffer. it does not t ... |
Topic: Modbus & ticker |
RF_Developer
Replies: 19
Views: 54815
|
Forum: General CCS C Discussion Posted: Mon May 14, 2018 9:32 am Subject: Re: Modbus & ticker |
When compiling the code I get following warning: >>> Warning 225 "C:\Program Files (x86)\PICC\Drivers\modbus_phy_layer_rtu.c" Line 25(1,1): Duplicate #define TICKS_PER_SECOND has b ... |
Topic: volatile pointer to volatile data |
RF_Developer
Replies: 6
Views: 17273
|
Forum: General CCS C Discussion Posted: Mon May 14, 2018 4:37 am Subject: Re: volatile pointer to volatile data |
It seems that CCS cannot create a volatile pointer to volatile data as in:
volatile int8 * volatile p;
I think this is correct standard C code, but the compiler doesn't like this. I want to ... |
Topic: 32bit SPI transfers using PIC16F1513? |
RF_Developer
Replies: 14
Views: 29084
|
Forum: General CCS C Discussion Posted: Thu May 03, 2018 9:18 am Subject: 32bit SPI transfers using PIC16F1513? |
With many SPI devices, for example memories, there is no fixed transfer length as there can be with things like ADCs and DACs. Also with multiple devices on one SPI port it's not so easy to deal with ... |
Topic: Sorting Algorithms |
RF_Developer
Replies: 19
Views: 38053
|
Forum: General CCS C Discussion Posted: Thu May 03, 2018 4:45 am Subject: Sorting Algorithms |
Thats why most of the stuff I've seen give you both swap and comparison performance values.
An important point is that "swaps" and "comparisons" are very implementation dependa ... |
Topic: WDT in PIC18 it's not working |
RF_Developer
Replies: 2
Views: 9006
|
Forum: General CCS C Discussion Posted: Fri Apr 06, 2018 4:12 am Subject: WDT in PIC18 it's not working |
If you are having to turn the watchdog on and off then you've got a big design/architecture problem. If you use the watchdog at all, and most people who are using it/having trouble using it on PICs do ... |
Topic: SPI1 doesn't work in PIC18F47J13-TQFP. |
RF_Developer
Replies: 17
Views: 35702
|
Forum: General CCS C Discussion Posted: Tue Apr 03, 2018 8:34 am Subject: SPI1 doesn't work in PIC18F47J13-TQFP. |
Hmm, if I'm reading them right, all the 'scope readings show Voh of no more than 2.5V, which would barely be satisfactory at 3.3V Vcc, and totally unacceptable at 5V. If they are a indication of the t ... |
Topic: MCLR_FROM_RUN |
RF_Developer
Replies: 14
Views: 27255
|
Forum: General CCS C Discussion Posted: Thu Mar 29, 2018 6:39 am Subject: MCLR_FROM_RUN |
Putting parts under PICs just ain't 'right' to me though.....
I'm "only" in my mid to late fifties... With DIP/DIL I totally agree. putting parts under them is often not great. WIth S ... |
Topic: MCLR_FROM_RUN |
RF_Developer
Replies: 14
Views: 27255
|
Forum: General CCS C Discussion Posted: Thu Mar 29, 2018 5:07 am Subject: MCLR_FROM_RUN |
A does allow 'bad' energy to enter the PIC.
B allows the capacitor to absorb the 'bad' energy BEFORE it enters the PIC.
That's the old way of thinking about it. These days its generally much more ... |
Topic: int to float conv. |
RF_Developer
Replies: 14
Views: 29211
|
Forum: General CCS C Discussion Posted: Wed Mar 14, 2018 7:54 am Subject: int to float conv. |
I know how hard and slow are floating point value for microcontrollers, but in my current project I have to communicate with PC Software that accept only float or double IEEE754 value over modbus prot ... |
Topic: int to float conv. |
RF_Developer
Replies: 14
Views: 29211
|
Forum: General CCS C Discussion Posted: Wed Mar 14, 2018 6:41 am Subject: int to float conv. |
This equation will do the job float_val=0.01*I32val;
There is little problem with rounding, from (int32)123456 get (float) 1234.55 but for now it's OK.
You can never precisely divide or multi ... |
|