View previous topic :: View next topic |
Author |
Message |
sokrates
Joined: 14 Mar 2007 Posts: 12
|
Port specification in CCS V.4023 |
Posted: Thu Mar 15, 2007 3:17 pm |
|
|
Hello,
I asked this in an earlier thread but I could not get any answers to this.
PIC Wizard of CCS V.4023 has an I/O specification tab, which presumably makes it easier to configure input, output, analog etc.. selections.
However, for the changes I make, I do not find any corresponding code in my program.
I also checked the header files for traces of I/O selection, but I couldn't find anything.
Do I have to specify them explicitly ? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Mar 15, 2007 3:29 pm |
|
|
Post a list of your i/o configuration. |
|
|
sokrates
Joined: 14 Mar 2007 Posts: 12
|
RE: |
Posted: Thu Mar 15, 2007 3:38 pm |
|
|
I think you don't understand my problem.
PIC Wizard has an I/O pins section.
and I choose my selections from the list,
the "Code" tab, just next to it, shows the
corresponding changes made in the code.
However, there are no codes regarding these
connections whatsoever !
When I finish up the work in PIC wizard,
these changes do not occur in my code.
------------------------------------------
Also, my simulation program ( proteus )
crashes immediately I load my .hex file
Have any suggestions ?
I appreciate your helps
thanks
[/img] |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Thu Mar 15, 2007 3:43 pm |
|
|
I don't have the CCS IDE, so I can't help with the Wizard.
All I can do is give advice about code. |
|
|
newguy
Joined: 24 Jun 2004 Posts: 1907
|
|
Posted: Thu Mar 15, 2007 3:48 pm |
|
|
That particular feature didn't work in the 3.xxx version(s) as well. I should qualify that: I tried using it a very long time ago and found that no code was actually created to set the port(s) as I had specified in the wizard. Since then I've never bothered with it. |
|
|
Martin Berriman
Joined: 08 Dec 2005 Posts: 66 Location: UK
|
|
Posted: Thu Mar 15, 2007 4:12 pm |
|
|
It seems to work for me in 4.029 (for a 16F690) - what PIC are you configuring for and I will check with that. |
|
|
rnielsen
Joined: 23 Sep 2003 Posts: 852 Location: Utah
|
|
Posted: Thu Mar 15, 2007 5:01 pm |
|
|
You can use the tris() command to make each pin an input or output. You need to use the tris() if you want to use fast_io. If you want to use standard_io you can simply let the compiler take care of the pin configurations. When you specify an input() command the compiler will set the pin up to be an input. When you use an output() command the compiler will set the pin up as an ouput. It takes more instructions to use standard_io and is slightly slower but it's much easier.
Ronald |
|
|
|