Help with simple program


Closed Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    I do not know if your Configs are correct but you have additional problems ...

    On the 877A

    High 0

    sets PortB Pin 0 high, not PortC, Pin 0. See manual section 4.11 and then implement Melanie's suggested fix above for this.

    Good Luck
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    To get you started, here's a set of Configs for the 876A (you can easilly change this for 877A) to be used with the MELABS default PM Assembler (not Microchips MPASM)...

    Code:
    	@ DEVICE pic16F876A, HS_OSC		' System Clock Options	
    	@ DEVICE pic16F876A, WDT_ON		' Watchdog Timer
    	@ DEVICE pic16F876A, PWRT_ON		' Power-On Timer
    	@ DEVICE pic16F876A, BOD_ON		' Brown-Out Detect
    	@ DEVICE pic16F876A, LVP_OFF		' Low-Voltage Programming
    	@ DEVICE pic16F876A, CPD_OFF		' Data Memory Code Protect
    						' Set to CPD_ON for Release Copy
    	@ DEVICE pic16F876A, PROTECT_OFF	' Program Code Protection
    						' Set to PROTECT_ON for Release
    	@ DEVICE pic16F876A, WRT_OFF		' Flash Memory Word Enable
    Now call me old-fashioned, but I don't use Microcode Studio... and I would compile my program from a Windows DOS box with the command line...

    PBPW -p16F876A myprogram -v

    If your program is small, you can also use...

    PBP -p16F876A myprogram -v

    but once it's complexity exceeds a certain limit, you will get "Out of Memory" errors when you compile, and you'll have to use PBPW rather than just PBP.

Similar Threads

  1. Simple Blink program doesnt work.
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 1st March 2009, 21:30
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 09:26
  3. simple counting program - please help!!
    By john meiers in forum mel PIC BASIC
    Replies: 3
    Last Post: - 20th February 2006, 14:17
  4. Simple RS232 Program
    By BlackNoir in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 8th January 2006, 01:57
  5. Simple Interrupt Program
    By eoasap in forum General
    Replies: 5
    Last Post: - 28th October 2005, 17:22

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