Old analog guy needs help with PIC16F57


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    I'm not using ICSP. I made up an adapter cable to go directly from the programmer to the IC on a bread board.

    I'm then disconnecting the program cable and testing the IC with an external power supply.

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


    Did you find this post helpful? Yes | No

    Default

    Have you tried the read-back yet?
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    Join Date
    Jan 2009
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Yes, same exact results as above.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Strange. I would try another resonator or crystal.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  5. #5
    Join Date
    Jan 2009
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    What code did you use?

  6. #6
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Code:
    @ device  pic16F57, hs_osc, wdt_off, protect_off
    
    DEFINE OSC 20
    
    Time VAR BYTE
    
    TRISB = 0  ' all outputs
    Time = 10
    
    Main:
        PORTB = 0
        PAUSE Time
        PORTB = 255
        PAUSE Time
        Time=Time+10
        IF Time >= 250 THEN Time = 10
        GOTO Main
        
        END
    Source and .hex attached.

    Note: You can't disable /MCLR on this one, so make sure you have the external pull-up.
    Attached Files Attached Files
    Last edited by Bruce; - 2nd March 2009 at 16:14. Reason: /MCLR pull-up
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  7. #7
    Join Date
    Jan 2009
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    OK, when I open your code with the programmer the configuration reads:

    Code:
    0000- 000a
    After I install it on the IC, then read it, this is what I get:

    Code:
    0000- 0ffa
    I have no idea if this means anything or not.

Similar Threads

  1. pic18f analog comparator problem
    By david.silaghi in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th May 2009, 09:38
  2. 16F88 Analog In
    By Mugelpower in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 25th March 2008, 08:30
  3. Selection of analog ports
    By enauman in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th December 2006, 03:56
  4. Many Analog Inputs
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 10th July 2006, 08:15
  5. analog inputs on 16F716
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th October 2005, 04:07

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