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

New to C with PIC

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







New to C with PIC
PostPosted: Sun Jul 23, 2006 4:35 am     Reply with quote

Hi, everyone.
Here is another newbie Smile
Anyway I know how to use C but it is quite different to use with PIC
Well, I have PIC C compiler and would like to use it.
I tried to turn on LED with it using 16F627 but I guess I need some tutorial of how to start using C for PIC
Could anyone direct me where and how I can start?
Cheers
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

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

PostPosted: Sun Jul 23, 2006 9:09 am     Reply with quote

I would suggest getting a demo board such as the PICDEM-2 from Microchip, and then write simple programs to toggle the LED(s), use I2C to read a temperature sensor, use PWM to sound a piezoelectric buzzer, use RS232 to do printf to Hyperterminal, read/write an external eeprom, etc.

A good beginner's book is "Embedded C Programming and the Microchip PIC" by Barnett, Cox and O'Cull.

I prefer the simple programs and demo board approach myself though.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Sun Jul 23, 2006 10:30 am     Reply with quote

You can also study the examples that come with the compiler.

I take a different approach though. To me, its how do I turn on and off and LED with a PIC. This involves some electrical knowledge and knowledge about microcontrollers. Information about the PIC can be found in its datasheet. Now is when I would say, how do I do this with C. Its the reverse of the approach that you are taking. I could do the same goal with basic, pascal, C, assembly. But I first need to know how to physically do it.
rkim01
Guest







PostPosted: Sun Jul 23, 2006 5:02 pm     Reply with quote

Mark wrote:
You can also study the examples that come with the compiler.



where is the examples in compiler? Cos i have PIC C compiler and I can't find any though.. Basically I need some kind of tutorial or examples that I can take through. Thanks.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

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

PostPosted: Sun Jul 23, 2006 7:27 pm     Reply with quote

In the folder called "Examples"
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