12F675 code sample


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Vermont
    Posts
    373


    Did you find this post helpful? Yes | No

    Default

    Be careful using the internal oscillator and the MCLR pin as an input. We just discussed this on another thread. You will not be able to reprogram it if you do.

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    > Be careful using the internal oscillator and the MCLR pin as an input. We just discussed this on another thread. You will not be able to reprogram it if you do.

    There is NO PROBLEM with this combination - it's used all the time - in fact it's my preferred choice for this PIC. There is no correlation internally within the PIC between your OSCILLATOR choice and your MCLR choice. Simply drop it into your programmer and away you go with whatever settings you desire.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    And now... it also depend of how good your device programmer is. An crapy Programming sequence timing and signal will ruine your life.

    <img src="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=878&stc=1&d=1148149000 ">

    As many here use free solution, there's many chance that it do some bugs. But i do understand why some choose these solution as PIC programming is not their main job or they simply can't afford the price of a good programmer.

    I heard that some have fix some bugs when using a driver as in the ICSP guide of MicroChip... i can't say... http://ww1.microchip.com/downloads/e...Doc/30277d.pdf
    Attached Images Attached Images  
    Last edited by mister_e; - 21st May 2006 at 19:21.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    marad73's Avatar
    marad73 Guest


    Did you find this post helpful? Yes | No

    Talking Thanks all!

    Steve, thanks for all your help - really appreciated.
    One more thing I've got to do is:
    When the reset (mclr) is pulled low, (pushbutton) this thing goes into a reset routine, which I can write with no problem. This routine must reset (or stop) the wdt cycle, turn on a couple of outputs in sequence and run the ADs each time until they are equal. Then, it has to engage the wdt again and go to sleep for 2 minutes or so. (outputs actually running motors until ADs are equal)
    Without pushing mclr putton, it needs to then wake up from sleep every 2 minutes, run the ADs, then turn on the outputs, recheck ADs until equal, then go to sleep again for another 2 minutes.
    These two functions are baffling to me because I find no info about how to use the wdt or mclr to reset as above, in the manual at all. If you can help with some sample code to do this, or tell me where to find it, that will be REALLY appreciated.
    Thanks all!
    Ron
    PS This thing, times 2, is for an azimuth drive for my telescope-in case you are curious! As mentioned before, it operates most of the night, totally off of sunlight it gets during the day.
    PPS I understand seeing stars better than PIC code!!!

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Section 9.6 watch dog timer, have to be your friend now. Set the right prescaller in OPTION register and use the TO bit of STATUS.

    This should be something good enough to start.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  2. How much code space do PBP statements use.
    By Darrel Taylor in forum Code Examples
    Replies: 5
    Last Post: - 13th February 2009, 21:31
  3. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  4. 18F8722 sample code
    By George in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th June 2008, 13:42
  5. LANC code 12F675
    By MikeDD in forum General
    Replies: 4
    Last Post: - 9th May 2008, 05:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts