Welcome into PIC world


Closed Thread
Results 1 to 25 of 25

Hybrid View

  1. #1
    Join Date
    Apr 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Hi joe

    Hi

    I tried with a new bread board from radioshack. same issue.
    i checked with multimeter the power from the pullup resistor to ground is giving 1.24 volts and from VDD it is 5.08. is there any way to blame this 16f84A but i am wondering if i take off the VSS then the led is constantly ligting up and the power is 0.79. i am planning to order another pic16f84a and try. i already tried with 2 pics. Is there any known institutes in Newjersey. brother if you are residing in USA, i can send it to you by post. i am trying this for the past 4 weeks to fix this... any suggestions...........Hmmmmmm

  2. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    When you program it with your melabs programmer, can you check the fuse settings that are shown in the programmer. I believe there is a window you can open that shows you fuse settings. Can you make sure these are set correctly. The default settings that are in picbasic should do just fine. The file it is picking these up from is in c:/pbp/16f84a.inc

    You could post a screen shot of these fuse settings from your melabs programmer. What we are looking for is this window:


    The meat of the 16f84a.inc file should read something like:
    Code:
            __config _XT_OSC & _WDT_ON & _CP_OFF
    xt osc should be right, but you might want to turn your watch dog timer off.

    I would have to see if I even have a 16f84a, but you might post your hex file and I am sure someone will load it to a 16f84a and see if they get life from it.
    Attached Images Attached Images  

  3. #3
    Join Date
    Apr 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Hi Here is the code what i am using and the attachment has the configuration.

    @ DEVICE pic16F84A
    define OSC 4
    TrisB = %00000000

    loop:
    High PORTB.0 ' Turn on LED connected to PORTB.0
    Pause 1000 ' Delay for .5 seconds

    Low PORTB.0 ' Turn off LED connected to PORTB.0
    Pause 1000 ' Delay for .5 seconds

    Goto loop ' Go back to loop and blink LED forever
    End

    and the hex

    0000- 2828 018f 008e 30ff 078e 1c03 078f 1c03
    0008- 2823 3003 008d 30df 200f 2803 018d 3ee8
    0010- 008c 098d 30fc 1c03 2818 078c 1803 2815
    0018- 078c 0064 0f8d 2815 180c 281e 1c8c 2822
    0020- 0000 2822 0008 1383 1303 1283 0064 0008
    0028- 1683 0186 1283 1406 1683 1006 1283 3003
    0030- 008f 30e8 2002 1006 1683 1006 1283 3003
    0038- 008f 30e8 2002 282b 0063 283c
    Attached Images Attached Images  

  4. #4
    Join Date
    Apr 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default

    Hi for your reference here is the code listed in C:\pbp\PBP244\16F84A.INC file,

    NOLIST
    ifdef PM_USED
    LIST
    include 'M16F8x.INC' ; PM header
    device pic16F84A, xt_osc, wdt_on, pwrt_on, protect_off
    XALL
    NOLIST
    else
    LIST
    LIST p = 16F84A, r = dec, w = -302
    INCLUDE "P16F84A.INC" ; MPASM Header
    __config _XT_OSC & _WDT_ON & _PWRTE_ON & _CP_OFF
    NOLIST
    endif
    LIST

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


    Did you find this post helpful? Yes | No

    Default

    Hi Syed,
    Your code works. I compiled with MPASM assembler and got this hex:
    Code:
    :020000040000FA
    :1000000028288F018E00FF308E07031C8F07031CEA
    :10001000232803308D00DF300F2003288D01E83EB8
    :100020008C008D09FC30031C18288C070318152838
    :100030008C0764008D0F15280C181E288C1C222894
    :1000400000002228080083130313831264000800B1
    :10005000831686018312061483160610831203305A
    :100060008F00E8300220061083160610831203303A
    :0C0070008F00E83002202B2863003C28A1
    :02400E00FD3F74
    :00000001FF
    You are NOT using ICD compile are you? Cause it won't work for you, To compile just press the F9 key.
    Last edited by Archangel; - 29th April 2009 at 02:20.
    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.

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


    Did you find this post helpful? Yes | No

    Default Wow edit goes away fast

    Ok I think you have not selected the correct chip in Micro Code Studio, and that is why your hex is different. Look at the tool bar and find the selection box and select the PIC you are using, then press F9 to compile. You will need to inspect this box before you compile each time because sometimes it changes without your help.
    EDIT: Well . . .I just looked at the attachment and you do have the correct chip selected . . .hmmmm interesting.
    <br>EDIT2: Had a second look at the attachment and saw it was MEPROG not MCS, so what I said before the edit stands, In MCS make sure the appropriate PIC is selected and recompile.
    Last edited by Archangel; - 29th April 2009 at 03:33.
    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.

  7. #7
    Join Date
    Apr 2009
    Posts
    11


    Did you find this post helpful? Yes | No

    Default Hi Joe

    Here is how i did it

    I selected 16F84A from the drop down in MCS and F9 to compile one it is compiled without any errors then i press F11 to program it , once pressing F11 it compiles again and opens up Melabs Programmer window, here i made disabled WatchDog and Powe up time disabled.

    One selected the Pic16F84A from the drop down i click on "Program".

    Thats how i did.................


    If you guys have VNC i can share my desktop Joe.

Similar Threads

  1. SMS via pic
    By kenandere in forum GSM
    Replies: 15
    Last Post: - 10th March 2010, 10:00
  2. Replies: 67
    Last Post: - 8th December 2009, 02:27
  3. HSERIN & Interupts (aka controlling PIC programs from a remote PC)
    By HankMcSpank in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th June 2009, 14:46
  4. pic to pic ir link versus wired link : help please anyone
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 30th May 2008, 21:01
  5. Serial Pic to Pic using HSER
    By Chadhammer in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 11th March 2005, 23:14

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