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

Intro help needed

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
AndyEllas



Joined: 30 Sep 2007
Posts: 3

View user's profile Send private message

Intro help needed
PostPosted: Mon Oct 01, 2007 11:28 am     Reply with quote

Hey all,

Im new to PIC programming and am having some trouble getting down the basics. I have read everything I could stand on the web, and it seems straight forward, but Im having some start up problems. I have the MPLAB IDE and the C18 plugin (I'm assuming that the C18 plugin will let me code in C instead of assembly and compile it?). I need help defining each of my pins on my PIC16f690. I thought that since MPLAB let me set up a project and select the PIC that these would already be referenced, but now Im not so sure. I think If I can figure out how to declare the pins (so that I can refer to them), and can get started on coding. Also, is there a list of PIC coding commands in C, I think I am only finding all the assembly opcodes on the PIC data sheets. Don't hesitate to call me an idiot, I am really trying my best, and I will suffer criticism if it will help me learn Smile. Am I going about this all wrong? Any help would be most appreciated.

Andy
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 11:31 am     Reply with quote

Quote:
I have the MPLAB IDE and the C18 plugin

You're on the CCS compiler forum.

You actually want to be on the C18 forum:
http://forum.microchip.com/tt.aspx?forumid=3
AndyEllas



Joined: 30 Sep 2007
Posts: 3

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 11:36 am     Reply with quote

Is CCS free? Maybe I should be using it:) (thanks for the pointer)
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 11:40 am     Reply with quote

No. There is a demo, but it's time limited and it only supports 3 devices,
and it only supports 2K of ROM. So the free student edition of C18 is a
much better deal.
AndyEllas



Joined: 30 Sep 2007
Posts: 3

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 11:42 am     Reply with quote

Well thanks for your help.
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 1:46 pm     Reply with quote

Andy,

I'm not sure of the size/scope of your planned work. But, look at the supported devices(free version) and see if they are worthy. I would highly recommend the CCS compiler (in its older form, 3.xxx). The support available here (if you're willing to make a little effort) is amazing. Even if the free version isn't suitable, the command line compilers along with UltraEdit make a great, and inexpensive, development environment.

Good luck,

John
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 1:50 pm     Reply with quote

My comments applied only to a comparison of the demo/ student edition.

I just noticed this:
Quote:
I need help defining each of my pins on my PIC16f690.

C18 doesn't support the 16F690. It's for the 18F-series PICs.
jecottrell



Joined: 16 Jan 2005
Posts: 559
Location: Tucson, AZ

View user's profile Send private message

PostPosted: Mon Oct 01, 2007 1:58 pm     Reply with quote

I didn't read your post as closely as I should have, either. If you provide some background on what it is you are trying to achieve, why, what you have available, etc. The suggestions offered here will be more than enough to get you started. The pros here are literally capable of providing an advanced education if you show some ambition. They can be the mentor that one needs to get up and running.
Gerhard



Joined: 30 Aug 2007
Posts: 144
Location: South Africa

View user's profile Send private message Send e-mail

PostPosted: Mon Oct 01, 2007 2:54 pm     Reply with quote

Here's some help from a newby to get you started.

1.Open mplab
2.Choose project->project wizzard
2.1. Pick the correct pic
2.2. Active toolsuite : CCS C Compiler
2.3. choose a project name.
2.4. Skip adding files, You can do it later.
2.5. Finish

3. Click on configure->Configure bits
-oscilator : HS if external > 4mhz
: XT if external < 4mhz
-watchdog timer:off
-power up timer: off
-brown out : off
master clear enable : off
low voltage: enable
the rest doesn't really matter for starters.

clik on file-> new and save it in you project folder
Right click on source files at the left corner and add the just saved file

Type in the following code:
#include <16f628.h>
void main()
{
while(1);
}
save it by clicking on the green disc in the middle of the page. and then compile it.

you should get a message that says "warning 203 ..........
loaded C: \picte\test.cof.
build suceeded: Mon oct 1 10:46 2007.

then you know all the software is installed corectly and the program will compile if you start programing without errors.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group