Read the newbee threads, 16F877A no go.


Closed Thread
Results 1 to 40 of 40

Hybrid View

  1. #1
    BobbyA's Avatar
    BobbyA Guest

    Default Read the newbee threads, 16F877A no go.

    Hi, I have read the threads here dealing with newbees (that's me) getting the PBP compiler (2.46 in my case) running. No fix so far. I tried making smaller programs, down to the Blink.bas in the sample dir. I have even tried the short example code provided in a post here.
    DEFINE OSC 12
    TRISB.2=0 'define PORTB.2 as output
    start:
    Toggle PORTB.2
    PAUSE 1000
    goto start
    I have two of the Momentumfire developement boards (LCD, serial, Keypad, pots, LED numbers, 11.59 MHz), I mention these because both do exactly the same. When I compile to a .hex file (using PM or MPASM 7.1) it appears to go without errors. Then I program the hex file into the part using a Hi-Lo ALL-11
    multiple IC type device programmer. When the 16F877A is placed into the circuit nothing happens.
    I have read the contents of the part back into the programmer's buffer, and compared it to the printed listing of the .hex file. No problems found.
    I copied the original (Dev board exerciser) back into the 16F877A and it runs fine. I can also edit minor changes to this program's hex code in the ALL-11 buffer then rewrite it, this too runs fine. I include this to indicate the programmer is working.

    I was able to compile the blink.bas file for the 18F6520, and using CCS's ICD-40U download and run it (albeit very slowly) in a test PWB that just has a 32 KHz clock osc, and a regulator witha reset pulse. It conplained about a couple configuration bits, but ran.
    After many hours I'm pretty underwhelmed with this so far, niether the PBP manual nor Chuck Hellebuyck's book do a good job of getting someone who doesn't already know it started with the tool and environment.
    Any help or suggestions would be very welcome. If you wish to write my email is: the current year @bobby.net in the form of [email protected] (let the bots figure that one out.)

    Thanks,
    Bobby

  2. #2
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762


    Did you find this post helpful? Yes | No

    Default

    Bobby,

    I guess it is a matter of setting the configuration bits.

    with a 12 MHz crystal you should select HS Oscillator.
    and do you have a 4k7 pullup on the MCLR Pin?

    have a look at this Thread
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  3. #3
    BobbyA's Avatar
    BobbyA Guest


    Did you find this post helpful? Yes | No

    Default Reply on help.

    Hi Ralph, Thanks for taking the time to respond.
    I do have the pull up in, and saw Melanie's post on configuration fuses.

    Her thread wasn't completely clear to me as to where those lines would be entered. The Microcode Studio doesn't provide for switches, nor did the MPASM I tried selecting within Studio.

    I did see another thread on editing the .inc file, and I changed it from xt to hs in two places. Hoping that was what he had in mind.

    From some other posts it appears that the configuration switches end up embedded in the .hex file. I hope this is correcct as it should be easy to read them out of the file resulting from compiling the short example program in the first msg. I just have to find out what the bits (placement) of that line is supposed to read.

    I'm ok with BASIC, but trying to learn PICs and PBP.


    Best Regards,
    Bobby

  4. #4
    BobbyA's Avatar
    BobbyA Guest


    Did you find this post helpful? Yes | No

    Default More on the configuration bits.

    Looking further into the configuration bits only confuses things more. From Melanie's thread on setting them up, I looked at the .inc for entries matching the datasheet's Special Features section. The datasheet calls out many configuration bit switches that are not addressed in the .inc file.
    I'm really hoping these bits are not important to be set or cleared, otherwise it doesn't inspire confidence. I still have little idea on what the configuration bits should be set to. Learning more every day...

    Bobby

  5. #5
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Did you read the whole thread??? I post some info myself too
    here

    So can we assume that something is working now on your side???
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  6. #6
    BobbyA's Avatar
    BobbyA Guest


    Did you find this post helpful? Yes | No

    Default It lives.

    The short test program included in my first email will run now.
    A number of changes were made, including editing the \PBP\xxxxxx.inc file.
    Also turned off the watchdog timer, I may turn it back on to check effect.
    Somewhere along the way I've hosed up the MPASM configuration and now
    will have to get it working again. But hey this is a learning process right ?

    Thank you for the help.
    Bobby

Similar Threads

  1. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 14:46
  2. Cleaning up code
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd December 2009, 07:14
  3. SEROUT WORD variable problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 19th April 2009, 11:20
  4. Q: using MCLR for Input on 12F683
    By picster in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 31st January 2009, 15:25
  5. Changing declared variables names on the fly
    By jessey in forum mel PIC BASIC Pro
    Replies: 15
    Last Post: - 16th December 2006, 06:34

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