16f877a help


Closed Thread
Results 1 to 13 of 13

Thread: 16f877a help

  1. #1
    Join Date
    Jun 2008
    Posts
    4

    Default 16f877a help

    Hello,
    Am new to programming and cant get my 16f877a to do anything. Any help out there?

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oreo View Post
    Hello,
    Am new to programming and cant get my 16f877a to do anything. Any help out there?
    Not without knowing if you're trying to get your 877a to taste like cookies in the oven, fetch a stick, or if you're actually trying to program it....The '877 that is...not the stick.

    http://www.picbasic.co.uk/forum/showthread.php?t=1742
    Last edited by skimask; - 15th June 2008 at 01:01.

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Re-Read Post #2 instead of PM'ing me...
    You'll get a lot more help that way.

  4. #4
    Join Date
    Jun 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    Ok here is the simple code I am trying to run. It compiles but the output doesnt come on

    #include <pic.h>

    __config (PCMDIS & IESODIS & BORDIS & UNPROTECT & MCLRDIS & PWRTEN & WDTDIS & INTIO); //I don’t know what is supposed to go in this, which is the main problem.



    main(){

    PORTA = 0;

    //CMCON0 = 7; //would not compile with these two statements in

    //ANSEL = 0;

    TRISA4 = 0;

    TRISA5 = 0;

    while(1==1){

    RA4 = 1;

    }

    }
    Do I need the config statement or not?
    Last edited by oreo; - 17th June 2008 at 12:56.

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Thumbs down Is this C or PicBasicPro? Hello!!!

    Let's see...
    I don't think the bulk of the above code will compile using MeLabs PICBASIC PRO, like the writing at the top of the page specifies these forums are generally for.
    I could be wrong...
    Please tell me if I'm wrong...
    I don't like to be wrong...
    I don't mind being wrong...
    But I still don't like it...

    I guess you were fetching a stick from the oven...
    Last edited by skimask; - 17th June 2008 at 14:01.

  6. #6
    Join Date
    Jun 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    at least im not a jerk!!

  7. #7
    Join Date
    May 2008
    Posts
    1


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oreo View Post
    at least im not a jerk!!
    you can read picbasic manual and check your syntax is correct? one by one

    like
    -main() in picbasic don't have
    -TRISA4 should be TRISA.4


    try to read picbasic manaual you should start from there.

  8. #8
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oreo View Post
    at least im not a jerk!!
    Maybe...maybe not...
    But my eyes work fine. Have you checked the focus on your monitor lately? Maybe that's why you didn't see the numerous references to PicBasicPro. It could happen...

    And sonicm is 100% right. Every one of those commands/statements/lines is easily converted to something usable with the PicBasicPro compiler...assuming one has the correct reference material and/or knowledge.

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


    Did you find this post helpful? Yes | No

    Default

    A wild guess on my part, but looking at your config statement, I'm guessing that you're
    using the Hi-Tech PIC C compiler?

    Hi-Tech has a web forum. I'm sure if you signup there someone will be happy to help you get
    going, but you definitely will want to review the 877A data sheet.

    You'll need to disable A/D to use some pins as digital I/O, and RA4 is an open-drain type
    output.
    Regards,

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

  10. #10
    Join Date
    Aug 2006
    Location
    Omaha, Nebraska USA
    Posts
    263


    Did you find this post helpful? Yes | No

    Arrow

    Oreo, it's not clear to us what you are using for a compiler, and for programming, and what physical platform you have for your '877A.

    Is your platform just an 877A and a solderless breadboard, or do you have a kit or development board of some sort?

    If you're using PIC BASIC or PIC BASIC PRO and haven't already done so, you might consider getting something like the MELabs X-1 board. It's available assembled or as a kit. One nice thing about packages like this is that they often come with several simple routines already tested, working, and you can use them as starting points to learn to do more.

    The nice thing about starting with simple, known-good programs is that you can start tinkering with them. As soon as something doesn't work, you can stop and look at your code and learn from what didn't work because you know that the core from which you started did work.
    Russ
    N0EVC, xWB6ONT, xWN6ONT

    "Easy to use" is easy to say.

  11. #11
    Join Date
    Jun 2008
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    I appreciate all of the positive comments or suggestions. But as skimask pointed out I started at the wrong forum and completely wasted his/your valuable time. I want to thank Bruce and Russmartin and sonicm , they seemed to want to help.
    I will try and find the correct forum and not waste your time any more. This will be my last post here.

  12. #12
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oreo View Post
    I will try and find the correct forum and not waste your time any more. This will be my last post here.
    Didn't waste any of my time...
    Looks like you wasted your time...
    Might not have wasted any time had a book or two been read a bit beforehand...
    But that's just me...
    I could be wrong...again

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by oreo View Post
    I appreciate all of the positive comments or suggestions. But as skimask pointed out I started at the wrong forum and completely wasted his/your valuable time. I want to thank Bruce and Russmartin and sonicm , they seemed to want to help.
    I will try and find the correct forum and not waste your time any more. This will be my last post here.
    Or you could download the evaluation version from M E Labs and jump right in and get your feet wet and be a <b>valued contributor here . . .
    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.

Similar Threads

  1. 16F877 vs. 16F877A
    By DavyJones in forum General
    Replies: 12
    Last Post: - 11th April 2009, 18:22
  2. help my bluetooth and PIC 16F877A?
    By slimpeng in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th March 2008, 06:52
  3. Read the newbee threads, 16F877A no go.
    By BobbyA in forum mel PIC BASIC Pro
    Replies: 39
    Last Post: - 31st December 2006, 03:09
  4. Clock connection to DS1802 from 16F877A
    By coyotegd in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 3rd January 2006, 18:52
  5. 1st 16F877A program in PICBasic
    By Borisw37 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 19th January 2005, 04:46

Members who have read this thread : 1

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