About olympic timer..


Closed Thread
Results 1 to 5 of 5
  1. #1
    Eng4444's Avatar
    Eng4444 Guest

    Question About olympic timer..

    first, am i obliged to write:

    "
    @ DEVICE pic16F876, XT_OSC ' System Clock Options
    @ DEVICE pic16F876, WDT_ON ' Watchdog Timer
    @ DEVICE pic16F876, PWRT_ON ' Power-On Timer
    @ DEVICE pic16F876, BOD_ON ' Brown-Out Detect
    @ DEVICE pic16F876, LVP_OFF ' Low-Voltage Programming
    @ DEVICE pic16F876, CPD_OFF ' Data Memory Code Protect
    @ DEVICE pic16F876, PROTECT_OFF
    ' Program Code Protection
    @ DEVICE pic16F876, WRT_OFF ' Flash Memory Word Enable

    "

    or i can set them from icprog?

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


    Did you find this post helpful? Yes | No

    Default

    No, you're not obliged to include the DEVICE Configuration Settings. You can set those manually within your programmer if it is capable of doing that.

  3. #3
    Eng4444's Avatar
    Eng4444 Guest


    Did you find this post helpful? Yes | No

    Question And about 16F876A

    should i change something concerning using this PIC? or i just download the program as it is in it?

    i'm working on it right now and will give news soon..

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


    Did you find this post helpful? Yes | No

    Default

    If your copy the HARDWARE and the SOFTWARE and you do so EXACTLY, WITHOUT CHANGES in either, then it WILL WORK as advertised.

    The PIC16F876A is DIFFERENT to the normal PIC16F876. From memory it has COMPARATORS and a VOLTAGE REFERENCE that need to be disabled. Please download the Datasheet from the Microchip Website to see how to accomplish this.

    I reitterate, copy the OLYMPIC TIMER example EXACTLY, without any change or deviation (not even with a simple 'A' on the end of the chip is allowed) and it will work.

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


    Did you find this post helpful? Yes | No

    Default

    Since, thankfully, I'm about to go out and enjoy myself for the rest of the day (at the Bedfordshire School of Falconry in case anyone wanted to know), and I don't want to see you struggle with your 16F876A, I will tell you that you should add...
    Code:
    	CMCON=%00000111		' Disable Comparators
    	CVRCON=%00000000	' Disable Reference Module
    Insert these two lines after the OPTION_REG.7=0 statement in the Initialise Processor Section. Actually, thinking about it, the Olympic Timer doesn't use PORTA, so technically you don't need the above two lines to make it work.

    But you will need to add an 'A' to the end of the processor designation in each of the eight lines in the PIC Defines section...

    Code:
    	@ DEVICE pic16F876A, XT_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
    	@ DEVICE pic16F876A, PROTECT_OFF ' Program Code Protection
    	@ DEVICE pic16F876A, WRT_OFF ' Flash Memory Word Enable
    It will compile with the command line (assuming you've called your file olympic.bas)...

    PBPW -p16P876A olympic -v

    If it doesn't compile, check your program. The -v will cause the compiler to point to your problem.

    If it compiles but doesn't work, then you've done something wrong... check all your connections, Xtal/Resonator, MCLR pin, Hardware, Supply voltages. Not all LCD's like to have the Contrast pin connected to Vss... if yours is one of those, ensure you have a suitable Contrast connection (see LCDOUT in PICBasic Manual for an example schematic).

    Have a nice day.

Similar Threads

  1. Olympic timer Scroll Text
    By Patrick in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th December 2006, 13:03
  2. Melanie's Olympic Timer
    By nedtron in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th January 2006, 14:41
  3. Olympic Timer MPH readout
    By Macgman2000 in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 19th August 2005, 17:56
  4. Help with scroll text in Melanie Olympic Timer
    By jorge in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th November 2004, 14:52
  5. Melanie Olympic Timer -> Banner....scroll text...
    By jorge in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 8th November 2004, 22:11

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