All About Circuits Forum  

Go Back   All About Circuits Forum > Software, Microcomputing, and Communications Forums > Embedded Systems and Microcontrollers


Embedded Systems and Microcontrollers Discussion forum for projects and working with embedded systems and microcontrollers (FPGAs, PICs, AVRs). Get help with hardware issues and embedded programming.

Reply   Post New Thread
Thread Tools Display Modes
Old 06-12-2008, 03:58 PM
Man_in_UK Man_in_UK is offline
Senior Member
Join Date: May 2008
Posts: 116
Default PIC12f683 example code

Can anyone point me in the direct of, or supply me with some very simple code for one of these ?

Any samples or projects will do.

I have not programmed in a long time and it would help a lot to see how others have set up ports etc. Rather than ask someone to write my program I want to try and work it out myself.

Reply With Quote
Old 06-12-2008, 08:44 PM
RiJoRI RiJoRI is offline
Senior Member
Join Date: Aug 2007
Location: Long Island,NY (GMT-5)
Posts: 536

Do you have uChip's free MPLAB IDE? check It comes with a tutorial, or so they claim.

PICs are somewhat different from the "normal" chips like the 8051, 68HCxxx, Z80, etc.

Reply With Quote
Old 06-13-2008, 03:15 AM
SgtWookie's Avatar
SgtWookie SgtWookie is offline
Expert Member
Join Date: Jul 2007
Location: In the vast midwest of the USA; CST
Posts: 22,043

The PICkit 1 comes with a PIC12F675 already programmed with sample code (that needed some work to make all 12 LED's flash, but I digress..)

There are a number of sample programs provided on the CDs that comes with the PICkit 1; a mixture of C and assembler.

Basically, evaluation of what programs will work with which uC's are up to you to decide; you need to be aware of the capabilities of your particular uC. I have not looked at the datasheet for yours.
General info:
If you have a question, please start a thread/topic. I do not provide gratis assistance via PM nor E-mail, as that would violate the intent of this Board, which is sharing knowledge ... and deprives you of other knowledgeable input.
Reply With Quote
Old 06-13-2008, 09:41 AM
nanovate nanovate is offline
Senior Member
Join Date: May 2007
Location: USA
Posts: 665

Here is a link that might be useful:

Different compilers have different ways to configure the chips so if you use a diff compiler then look at it's documentation carefully.
Reply With Quote
Old 06-13-2008, 06:26 PM
Man_in_UK Man_in_UK is offline
Senior Member
Join Date: May 2008
Posts: 116

Thanks for your suggestions.

I think I will move to the 675 as I can get the starter board and start proding about straight away.

Even in the sourcecode section of the mchip website there is nothing written to drop straight into a 12f series. I guess the space saving over an 8 pin package compared to a 16 is such a non-event everyone goes for the big version(I call it big, we know its not).

If you got anything on paper for a 12f675 please send it this way.
Reply With Quote
Reply   Post New Thread


Related Site Pages
Section Title
Textbook Microprocessor programming : Principles Of Digital Computing
Textbook Fundamentals of SPICE programming : Using The spice Circuit Simulation Program

Similar Threads
Thread Thread Starter Forum Replies Last Post
Matlab Code for the Extraction of Coupling matrix from S-parameters(.s2p) faisaldj Programmer's Corner 3 06-30-2009 12:29 PM
How to jump back to an original state? - PIC programming draeberg Embedded Systems and Microcontrollers 7 05-05-2008 05:09 PM
help in converting asm code to c code? alkid Programmer's Corner 4 11-07-2007 10:56 PM
Verilog - Code Posted - Please Help !! dash82 Programmer's Corner 0 10-23-2007 07:16 AM
C code to machine code question Joey_K Programmer's Corner 4 12-16-2006 11:02 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:50 PM.

User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.