Don't know what's wrong!


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Hello PICante,
    The 628A has analog comparator inputs, so unless you are using them turn them off with
    CMCON = 7
    then read the post on config fuses
    try:
    Code:
    @ DEVICE pic16F628A, HS_OSC ' Change HS to XT for 4mhz
    
    @ DEVICE pic16F628A, WDT_ON
    ' Watchdog Timer
    
    @ DEVICE pic16F628A, PWRT_ON
    ' Power-On Timer
    
    @ DEVICE pic16F628A, MCLR_ON 
    ' Master Clear Options (Internal)
    
    @ DEVICE pic16F628A, BOD_OFF
    ' Brown-Out Detect
    
    @ DEVICE pic16F628A, LVP_OFF
    ' Low-Voltage Programming
    
    @ DEVICE pic16F628A, CPD_OFF
    ' Data Memory Code Protect
    ' Set to CPD_OFF for Development Copy
    ' Set to CPD_ON for Release Copy
    
    @ DEVICE pic16F628A, PROTECT_OFF
    
    DEFINE OSC 20 ' for 20 mhz, change to fit your OSC speed
    that code should setup your configs if using the default compiler, MAPSM uses different configs.

    Welcome back skimask
    Last edited by Archangel; - 19th December 2007 at 22:15.
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Joe S. View Post
    Hello PICante,
    The 628A has analog comparator inputs, so unless you are using them turn them off with
    CMCON = 7
    But not on PortB.0...(that was my first thought too).
    Everything else still applies in full...if not more...

  3. #3
    Join Date
    Dec 2007
    Location
    Sweden
    Posts
    73


    Did you find this post helpful? Yes | No

    Cool

    Thanks all of you!

    I have some reading to do (obviously) and I get back on this matter if I don’t figure it out myself!
    One 180 page datasheet and then some … phuuuu.

    Thanks again :-)

    Merry Christmas!

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Stop whining

    I am looking at the data sheet for the 18F4550 over the holiday.

    428 pages!

    Merry Christmas to you too.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. LCD Showes Some Wrong Letters
    By sbobowski in forum General
    Replies: 2
    Last Post: - 23rd September 2008, 20:15
  2. Anyone know whats wrong with this code
    By Bonxy in forum Serial
    Replies: 10
    Last Post: - 9th March 2007, 17:29
  3. ADCIN - AD settings are wrong
    By teverett in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 4th December 2006, 17:32
  4. What am I doing wrong?
    By mankan in forum General
    Replies: 1
    Last Post: - 23rd June 2006, 20:03
  5. HDD IDE ATA 2 interface problems. code wrong?
    By rastan in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th March 2005, 17:01

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