Cant get it to work


Closed Thread
Results 1 to 24 of 24

Hybrid View

  1. #1
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    According to the datasheet ( http://ww1.microchip.com/downloads/e...doc/39598e.pdf ) pin 4 is MCLR - from the schematic it seems you have pin 3 (RA4) pulled high via a resistor.

    You also don't show any timing crystal, so assume you are using the internal osc

    The PIC16F818/819 devices include an internal
    oscillator block which generates two different clock
    signals; either can be used as the system’s clock
    source. This can eliminate the need for external
    oscillator circuits on the OSC1 and/or OSC2 pins.
    The main output (INTOSC) is an 8 MHz clock source
    which can be used to directly drive the system clock. It
    also drives the INTOSC postscaler which can provide a
    range of clock frequencies from 125 kHz to 4 M
    Therefore you might need to configure the PIC for internal OSC

    FOSC2:FOSC0: Oscillator Selection bits
    111 = EXTRC oscillator; CLKO function on RA6/OSC2/CLKO pin
    110 = EXTRC oscillator; port I/O function on RA6/OSC2/CLKO pin
    101 = INTRC oscillator; CLKO function on RA6/OSC2/CLKO pin and port I/O function on
    RA7/OSC1/CLKI pin

    or
    100 = INTRC oscillator; port I/O function on both RA6/OSC2/CLKO pin and RA7/OSC1/CLKI pin
    011 = EXTCLK; port I/O function on RA6/OSC2/CLKO pin
    010 = HS oscillator
    001 = XT oscillator
    000 = LP oscillator

    Hope that helps

  2. #2
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    Yeah, thats just an error in my schematic diagram. I have the resistor on pin 4 not pin 3. Im prety sure my problem is somewhere in the config fuses. Its been a while since Ive played with any of this but Ive writen a bunch of far more complex programs than this and have had them work. If only I could find the code maybe I would see what I am missing.

  3. #3
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I have the resistor on pin 4 not pin 3.
    That is fine, but from your schematic the resistor (hope 10 KOhms) is connected to Vss, which is a pulldown not a pullup. Connect the resistor to Vdd.

    In your schematic you are showing Vdd as ground! Remember that Vdd is + 5 Volts and Vss is ground.

    Al.
    Last edited by aratti; - 7th April 2010 at 23:09.
    All progress began with an idea

  4. #4
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    Yeah, just my mistake trying to draw up a quick schematic. I fixed it though and its now hooked up as the new schematic shows. And yes, now using port B.4 now (pin 7) only because it makes the circuit on the breadboard cleaner. was going to try and take pictures of it but my camera sucks... and it still is not working at all. I am stumped. I guess its possible that I have a bunch of bad chips so I guess I will order more and see if that helps at all. I still think its a fuse thing some how though, even though I have it set to internal osc.

    Does anyone know if there is a better programer software out there than IC-prog (preferably freebe) that works with JDM programmers?

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


    Did you find this post helpful? Yes | No

    Default

    I still think its a fuse thing some how though, even though I have it set to internal osc.
    Then show us how you have the *.inc file setup or how you are doing it in code space.

    Please do not say you are setting them with icprog...
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default

    I guess its possible that I have a bunch of bad chips
    Expecially if you have powered them with reverse supply.

    You show 1K resistor in series with leds. This is too much!

    Let's make the resistor calculation together:
    It is safe enough to assume 1.7 voltage drop for non-high-brightness red led, so 5 volts - 1.7 volts (led drop) = 3.3 volts

    10 miliamps is the normal forward current for a standard led so:

    3.3/0.01 = 330 Ohms

    With 1K you will have a very weak led since: 3.3/1000= 0.00333 = 3.3 milliAmps
    just 1/3 of the current required.

    Al.
    Last edited by aratti; - 8th April 2010 at 00:46.
    All progress began with an idea

  7. #7
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Assuming you have wired everything correctly, and not as per your original sketch then it could be that either your JDM programmer isn't programmingn the PICS or IC-Prog is not setting the config correctly.

    The only other program I know that might work and is free is Win-Pic 800 ( http://www.winpic800.com//index.php?...d=18&Itemid=64 )

  8. #8
    Join Date
    May 2004
    Posts
    81


    Did you find this post helpful? Yes | No

    Default

    Hmm. let me double check this:

    Yes I am using 1K. The "Power" LED seems to do just fine with the 1K but I see what your saying about the pic not having a whole lot of current. Just for gits and shiggles I removed the resistor all together comming from the pic and not so much as a blown LED... just a whole lot of nothing...

    However....

    Then show us how you have the *.inc file setup or how you are doing it in code space.

    Please do not say you are setting them with icprog...


    Actually, yes.. that is exactly how I am setting the fuses. Is that wrong?


    Assuming you have wired everything correctly, and not as per your original sketch then it could be that either your JDM programmer isn't programmingn the PICS or IC-Prog is not setting the config correctly.
    That was my original assumtion as well. I have done all kinds of little "tests" though (writing data in EEPROM memory and reading it back, etc). I dont *THINK* its the programmer hardware but I would bet my life it isnt either. For all I know its a bunch of bad chips... though I have had no luck with 16F88 chips either and those I have here are brand new in the tube.
    Last edited by bearpawz; - 8th April 2010 at 01:13. Reason: additional response

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by bearpawz View Post
    Actually, yes.. that is exactly how I am setting the fuses. Is that wrong?
    EEEH, not really wrong, just not the best way. Find where you can turn this feature off and read this.
    http://www.picbasic.co.uk/forum/showthread.php?t=543

    PBP by default reads the *.inc file for the chip that is in the PBP directory. You can modify the *.inc to the setting you want or modify it so the configs can be set in code space.
    The difference between the two is a personal preference.
    Dave
    Always wear safety glasses while programming.

  10. #10
    Join Date
    Mar 2009
    Location
    Colorado
    Posts
    378


    Did you find this post helpful? Yes | No

    Default A better programmer

    Quote Originally Posted by bearpawz View Post
    Does anyone know if there is a better programer software out there than IC-prog (preferably freebe) that works with JDM programmers?
    I also use MCS with PBP version 2.6, but I use a PICKIT2 as my programmer rather than the IC-prog. This development configuration lets me compile and program the chip in one step without creating a .hex file and downloading it into the programmer like most configurations. My configuration is reliable and works great. PICKIT2 is worth the $50 just to simplify the development environment. Plus if you then place a 6-pin header on all your board designs, you can connect directly to your final board configuraiton for re-programming in the field.

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


    Did you find this post helpful? Yes | No

    Talking Problem already seen ... ???

    HI, BPWZ

    I can't resist ...

    http://www.picbasic.co.uk/forum/show...95&postcount=6

    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 " !!!
    *****************************************

  12. #12
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    If you have access to another PC then try using the programmer with that. It is a well documented fact that serial ports on a lot (if not most) laptops lack the power that JDM programmers need to generate the programming voltages.

    I can remember having loads of programming issues when I was using a commercial version of this type of programmer with IC-Prog. I've since purchased an EasyPIC board which has a built in programmer and software - which I must say has never let me down.

    If your funds can't stretch to an EasyPIC board, then I too would suggest you look at the picKit2 programmer.

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