1-wire read ROM with 12F675


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Put all these at the beginning of your code.

    Code:
    @ DEVICE pic12F675, INTRC_OSC_NOCLKOUT 
    @ DEVICE pic12F675, WDT_ON
    @ DEVICE pic12F675, PWRT_ON
    @ DEVICE pic12F675, MCLR_OFF
    @ DEVICE pic12F675, BOD_OFF
    @ DEVICE pic12F675, CPD_OFF
    @ DEVICE pic12F675, PROTECT_OFF
    
    
    DEFINE OSCCAL_1K    1   ' osc calibration
    
    CMCON = 7               ' Disable comparators.
    VRCON.7 = 0             ' Disable voltage reference module ; no current.
    TRISIO = %000000        ' All output except for GP3.
    ADCON0.0 = 0            ' Turn off ADC module.
    ANSEL = 0               ' Digital I/O.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Oct 2007
    Posts
    2


    Did you find this post helpful? Yes | No

    Default

    I added:

    CMCON = 7 ' Disable comparators.
    VRCON.7 = 0 ' Disable voltage reference module ; no current.
    TRISIO = %000000 ' All output except for GP3.
    ADCON0.0 = 0 ' Turn off ADC module.

    ... and everything is working properly. THANKS !

    Fabien

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Variable in array
    By Gusse in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd February 2009, 19:46
  3. Serout2/serin2 Pbp Problem
    By SOMRU in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 11th December 2006, 19:55
  4. DS1820 headache
    By Calco in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 12th August 2004, 00:28
  5. New member
    By jmgelba in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 28th February 2004, 22:44

Members who have read this thread : 1

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