Old analog guy needs help with PIC16F57


Closed Thread
Results 1 to 32 of 32

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    The 16F57 is laid out really funky with Vdd on pin #2, Vss on pin #4, Vpp, pgmdata, pgmclock, etc all in odd places, so there's probably not any ZIF adapter compatible with this one.

    Wire it for in-circuit like shown here: http://melabs.com/support/icsp.htm
    Regards,

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

  2. #2
    Join Date
    Jan 2009
    Posts
    22


    Did you find this post helpful? Yes | No

    Default

    Thanks again Bruce!

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Quote Originally Posted by Bruce View Post
    The 16F57 is laid out really funky with Vdd on pin #2, Vss on pin #4, Vpp, pgmdata, pgmclock, etc all in odd places, so there's probably not any ZIF adapter compatible with this one.

    Wire it for in-circuit like shown here: http://melabs.com/support/icsp.htm
    Hi Bruce ...

    Microchip AC 162049 Universal adapter CAN do it ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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


    Did you find this post helpful? Yes | No

    Default

    Hi Alain,

    Yep. That would do it, but it might be easier and a lot cheaper to just wire his PIC for in-circuit directly to his MeLabs serial programmer..;o}
    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 Resonator

    OK, I made up an adapter cable and programmed the IC. I can't get it to run and I suspect the resonator or the way that I have the resonator setup. I read the data sheet and I'm thoroughly confused. I'm using Murata CSTLS20M0X53-B0 20 MHZ resonators. Is this an OK resonator and if so, how should it be connected?

    ~ Dave

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


    Did you find this post helpful? Yes | No

    Default

    3-pin resonators normally have built-in caps. The center pin goes to ground. The remaining two pins go to the PIC external osc pins. For 20MHz you'll want HS_OSC.

    It's a lot easier for folks here to help if you show all your code & config settings.
    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

    Sorry ... here's the code:

    Code:
    @ device  pic16F57, hs_osc, wdt_off, protect_off
    
    main:
    
    high porta.0
    high porta.1
    high porta.2
    high porta.3
    high porta.4
    high porta.6
    high porta.7
    high portb.0
    high portb.1
    high portb.2
    high portb.3
    high portb.4
    high portb.5
    high portb.6
    high portb.7
    
    pause 2000
    
    low porta.0
    low porta.1
    low porta.2
    low porta.3
    low porta.4
    low porta.6
    low porta.7
    low portb.0
    low portb.1
    low portb.2
    low portb.3
    low portb.4
    low portb.5
    low portb.6
    low portb.7
    
    pause 2000
    
    goto main

  8. #8
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default Warning warning :-)

    It is not really recommended to modify bits like that quickly after each other. There is something called READ-MODIFY-WRITE problem and that could be what you are having. I also notice that you have not set the TRIS register for the port (telling the port to be input or putput) but that should be taken care with high and low but I rather do it myself.

    Try to blink with just one LED och with the entire PORT i.e

    main:
    TRISB=0
    here:
    PORTB=0
    Pause 2000
    PORTB=255
    pause 2000
    goto here

    end

    Save the A port for later since it is usually the port that has most Analog stuff that can also be causing problems.


    And most important: Don't give up!! It is quite normal to have some problems getting started.
    Last edited by Jumper; - 28th February 2009 at 05:52.

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