PIC12f683 example code

Discussion in 'Embedded Systems and Microcontrollers' started by Man_in_UK, Jun 12, 2008.

  1. Man_in_UK

    Thread Starter AAC Fanatic!

    May 13, 2008
    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.

  2. RiJoRI

    Well-Known Member

    Aug 15, 2007
    Do you have uChip's free MPLAB IDE? check www.microchip.com. It comes with a tutorial, or so they claim.

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

  3. SgtWookie


    Jul 17, 2007
    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.
  4. nanovate

    Distinguished Member

    May 7, 2007
    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.
  5. Man_in_UK

    Thread Starter AAC Fanatic!

    May 13, 2008
    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.