+ Reply to Thread
Results 1 to 14 of 14
  1. #1
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Question If you have good working example ..

    Does anyone has source code of good working example for PIC16F84A?
    I need to test my soft and hardware.
    Really appreciate.

  2. #2
    Join Date
    Jul 2006
    Posts
    22

    Default

    Read the PBP docs, this is the "hello world" program, included in the user manual.
    wire a LED on Portb pin like this:



    and compile this lines. . .

    Symbol LED = portb.0
    Trisb=0 ' Make portb as output

    Loop:
    high LED
    Pause 500
    Low LED
    Pause 500
    Goto Loop
    END

  3. #3
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Wink Let's think

    Simple question - simple answer.
    No one tell me that I can use PIC simulator software that can easy to help
    in analyzing program's errors.
    ______________________________
    To Whom who study Taxes.
    Communism is 100% taxes and NO salaries.
    Socialism is 75% taxes and small salaries.
    Capitalism is 25% taxes and salary what you deserve.
    Crime society is 0% taxes, full salary and too much blood.

  4. #4
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    216

    Default Do tell

    No one told me either!
    Help me discover what else I can do with my PBP system besides write program, hope to compile, compiles, doesn't do what I thought it should, stare at program for a long time, try again and again until I realize that programming with intention is not the same as programming with instruction.
    Where is this simulator you speak of? Hmmm?
    Louie

  5. #5
    Join Date
    Sep 2004
    Location
    Mentor, Ohio
    Posts
    347

    Smile

    Good morning,

    There is no simulator for PicBasicPro. There is, however, a simulator for other forms of the PicBasic language.

    If either of you are looking for a quick way to write a program that works the first time then I think you are dreaming. I have been on this for since 2004. I have found that by investing the time in looking at the problems other members have posted I have learned how to program. Does every program work the first time. NO! You make mistakes wiring something up. You forget to Capitalize the DEFINES. You can make many types of mistakes. That's all part of the learning curve. I spent an entire 48 hour weekend just writing, testing,writing,testing code for an RTC handling daylight savings time. I am not a professional programmer. My first really big project was designed to be done in 4 months. It took more than twice that because I had alot of learning to do.

    There are many great people on this forum that are more than willing to help you with your problems. As for a simple program for the 16F84A, start with blinking an LED. There are many examples of how to do this. I beleive one of them is in the manual. We do require that people asking for help to make some effort.

    I personnally have purchased several books, one of which is entitled "Programming PICs in Basic" by Chuck Hellebuyck. This has been like a bible to me. I started with Basic Stamps and worked my way over to PICs.
    It does take a lot of time if you only do this as a hobby. I do most of work on the weekends so I sit back with a cup of coffee and read the posts here. I also read them in the morning before work and then before I retire for the evening. We do have some less than patient people here but their intentions are good.

    Don't get discouraged. In the long run its fun and educational and in some cases it can be financially rewarding. I have sold quite a few of my projects to customers of my alarm business!

    BobK

  6. #6
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Smile About PIC Simulator

    I used Pic IDE Simulator ver 5.33 from www.oshonsoft.com.
    It is free from charge for trial period and you can buy a licence to use during
    your life time with new soft from this company.
    Regards

  7. #7
    fronkensteen's Avatar
    fronkensteen Guest

    Default

    Quote Originally Posted by hardcore View Post
    I used Pic IDE Simulator ver 5.33 from www.oshonsoft.com.
    Nice Simulator!!!

    For another compiler...

    Here's an assignment statement for you.
    See if you can figure it out how it works.

    Code:
    MeLabs PICBASICPRO <> Proton Basic
    or maybe

    Code:
    MeLabs PicBasicPro != Proton Basic
    How about

    Code:
    If MeLabs PicBasicPro = Proton Basic Then
           Pigs = might_fly
    EndIf

  8. #8
    Join Date
    Oct 2004
    Location
    North Norfolk UK
    Posts
    146

    Default

    Methinks there is a language problem

    "Pic Basic Compiler" and it's examples have not translated accurately.

    This forum is for MeLabs Pic Basic Compiler. Maybe mail Vladimir Soso and ask him exactly which compiler he has been developing with.


    HTH


    __

  9. #9
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Lightbulb Problem solved

    Here is conflict beetwen previous installed Pic Basic Compiler and Pic Basic Pro Compiler so MicroCode Studio PLUS read setting of PIC Basic Compiler that previously works with Micro Code Studio that only have one targeting processor PIC16F628.
    Regards

  10. #10
    fronkensteen's Avatar
    fronkensteen Guest

    Default

    Or ask Mr. Sonsivri where he gets his software

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

    Thumbs down

    Hi, All

    IF you want to simulate ( lol ) ...

    no problem using MPLAB and its MPSIM tool !!! Exellent tool to finely tune timings ...BTW.

    no problem nor to use EasyPic Boards from Mikroelektronika ... you can also have very nice developpement satellites ...

    Just compile and transfer your HEX on their Programmer.



    Ah ... yes, you'd want whisles and bells ... small drawings, etc,etc ... even conveyor belt !!!

    No problems then to use National's MULTISIM , ... just give the $$$$$$$$$$$ !!!

    I'd forget PROTEUS ...

    Nothing to simulate ( lol ) PbP produced code ??? ... really ???

    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
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Question Few Qestions

    "ask Mr. Sonsivri where he gets his software"
    Who is he? Never heard of this person.
    "Nothing to simulate ( lol ) PbP produced code ??? ... really ???"
    When compile and program button pressed I quess that .hex file that ready
    to work in PIC produced.AM I Wrong?

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

    Default

    Yes, PBP will take care of making the HEX file.
    Then all you have to do is figure out a way to squirt the hex into the PIC.
    Dave
    Always wear safety glasses while programming.

  14. #14
    Join Date
    Dec 2008
    Location
    New York US
    Posts
    46

    Smile Comments

    Then I load .hex in PIC Simulator and it works.
    You can try too.Some fitures as LCD doesnt works but all instructions you can see step by step.Very useful.
    How to program PIC I know need only time maybe tomorrow because do it after my job.
    Regards

Similar Threads

  1. 16F877A with 20MHz XTAL not working?
    By ustredna in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2011, 15:04
  2. 2x16 lcd not working with pic16f72
    By vu2iia in forum Schematics
    Replies: 4
    Last Post: - 16th February 2011, 14:59
  3. Blink.Bas on 18f45k20 Newbie seeks working example.
    By DiscoEd in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th December 2009, 03:36
  4. Pic 16 F628A not working
    By turkuaz in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 17th March 2009, 12:26
  5. Hserin not working...
    By robert0 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 22nd August 2005, 12:25

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