Author |
Message |
Topic: how to printf a floating number in the format of 00.00 ? |
John_Lintern
Replies: 2
Views: 5526
|
Forum: General CCS C Discussion Posted: Tue Nov 29, 2005 5:13 am Subject: how to printf a floating number in the format of 00.00 ? |
How can I force the floating variables to be displayed in the format of say 00.00 for example ?
I am trying to send some variables down the RS232, some of which are integers and some of which are f ... |
Topic: How to load 6 variables into an array, but in order of size? |
John_Lintern
Replies: 1
Views: 4507
|
Forum: General CCS C Discussion Posted: Tue Nov 15, 2005 9:35 am Subject: How to load 6 variables into an array, but in order of size? |
I have written some code which calculates six int16 values to be loaded into CCP1.
Say for example, my code calculates the following values...
A_RisingEdge=12500;
C_FallingEdge=31250;
B_Ris ... |
Topic: How to output 0�,120� & 240� phase shift from squarewave |
John_Lintern
Replies: 2
Views: 4832
|
Forum: General CCS C Discussion Posted: Tue Nov 15, 2005 9:15 am Subject: How to output 0�,120� & 240� phase shift from squarewave |
Thanks Mark,
I have written code to calculate the CCP1 interrupts for the rising and falling edges on each phase.
Using a period which gives a Timer1 measurement of 37,500 (60ms period) and a de ... |
Topic: How to output 0�,120� & 240� phase shift from squarewave |
John_Lintern
Replies: 2
Views: 4832
|
Forum: General CCS C Discussion Posted: Tue Nov 15, 2005 6:06 am Subject: How to output 0�,120� & 240� phase shift from squarewave |
Please help.... I'm so near yet so far !!
I have a squarewave input of a variable frequency from 15Hz to 30Hz.
I want 3 outputs to fire the gates of 3 triacs.
These outputs need to be phase s ... |
Topic: How to program PIC16F877A through rs232 |
John_Lintern
Replies: 9
Views: 24715
|
Forum: General CCS C Discussion Posted: Tue Oct 25, 2005 4:20 am Subject: How to program PIC16F877A through rs232 |
I copied and pasted your code into my version of CCS and it compiled without any errors.
So it must be something to do with your version or installation of CCS ?
Are you able to get an update of ... |
Topic: How to program PIC16F877A through rs232 |
John_Lintern
Replies: 9
Views: 24715
|
Forum: General CCS C Discussion Posted: Mon Oct 24, 2005 2:12 am Subject: How to program PIC16F877A through rs232 |
jump_to_isr is a function.
for some reason when you are compiling your code the function is not defined or recognised by the compiler.
what version of compiler are you using ?
in CCS go to 'H ... |
Topic: How to program PIC16F877A through rs232 |
John_Lintern
Replies: 9
Views: 24715
|
Forum: General CCS C Discussion Posted: Thu Oct 20, 2005 3:04 am Subject: How to program PIC16F877A through rs232 |
I have recently used the bootloader that comes with the examples for the CCS compiler called "ex_bootloader.c"
Have you got this example ?
By pulling a pin low when you reset the PIC, the bootlo ... |
Topic: write_eeprom & read_eeprom does not work on PIC18F452? |
John_Lintern
Replies: 3
Views: 6263
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2005 5:59 am Subject: write_eeprom & read_eeprom does not work on PIC18F452? |
Ive just found out.... I can read the eeprom but not write to it.
So its as if its protected ?
But I have set the config for it not to be write protected using the statement....
#FUSES NOWRTD ... |
Topic: write_eeprom & read_eeprom does not work on PIC18F452? |
John_Lintern
Replies: 3
Views: 6263
|
Forum: General CCS C Discussion Posted: Thu Sep 08, 2005 5:47 am Subject: write_eeprom & read_eeprom does not work on PIC18F452? |
I am emulating a PIC18F452 on an ICE2000 (using the PCM18XH2 processor module).
However, the commands write_eeprom & read_eeprom do not to work ?
When I use a breakpoint on the statement...
... |
Topic: How to use output_bit or output_high with a variable |
John_Lintern
Replies: 9
Views: 27026
|
Forum: General CCS C Discussion Posted: Wed Sep 07, 2005 8:03 am Subject: How to use output_bit or output_high with a variable |
I am trying to use the 'pin' parameter as a variable in the command output_bit.
e.g output_bit (pin, value)
I want the 'pin' parameter to be a variable so that the output bit depends on the val ... |
Topic: ex_bootloader - problem using interrupts in application prog |
John_Lintern
Replies: 22
Views: 23864
|
Forum: General CCS C Discussion Posted: Tue Sep 06, 2005 9:12 am Subject: ex_bootloader - problem using interrupts in application prog |
I have blown a PIC18F452 with the ex_bootloader.c example program supplied with CCS.
This works fine and I have successfully downloaded a simple application program via the RS232 which flashes an L ... |
Topic: Bootloader or In Circuit Serial Programming (ICSP) ? |
John_Lintern
Replies: 3
Views: 4832
|
Forum: General CCS C Discussion Posted: Thu Aug 25, 2005 2:56 am Subject: Bootloader or In Circuit Serial Programming (ICSP) ? |
I am using a PIC16F877A which I need to reprogram whilst the PIC remains in circuit.
Which would be the best method to use, the bootloader method or the ICSP method ?
I want to connect my circui ... |
Topic: How can I store and use an array in EEPROM ? |
John_Lintern
Replies: 4
Views: 6304
|
Forum: General CCS C Discussion Posted: Tue May 24, 2005 8:05 am Subject: How can I store and use an array in EEPROM ? |
Store the arrays in ROM.
Copy an array into RAM buffer and pass a pointer to your function.
Thanks Mark,
I'm trying to do what you suggested.
I've now stored all my arrays of data in ROM (pr ... |
Topic: How can I store and use an array in EEPROM ? |
John_Lintern
Replies: 4
Views: 6304
|
Forum: General CCS C Discussion Posted: Tue May 24, 2005 5:47 am Subject: How can I store and use an array in EEPROM ? |
I've been using arrays which I have been storing RAM.
Below is an example of how I initialised my arrays in RAM...
int ShiftSchedCold_1to2[2][4] = {{20,20,52,52} ... |
Topic: Not enough RAM for a 368byte PIC, but ok for a 192byte PIC ? |
John_Lintern
Replies: 2
Views: 5545
|
Forum: General CCS C Discussion Posted: Fri May 13, 2005 7:01 am Subject: Not enough RAM for a 368byte PIC, but ok for a 192byte PIC ? |
I am using,
- a PIC16F874A which has 192 bytes of RAM
- a PIC16F877A which has 368 bytes of RAM
The PIC16F877A is the same as the PIC16F874A but has twice the amount of ROM and EEPROM and almos ... |
|