my boxing timer


Closed Thread
Results 1 to 8 of 8

Thread: my boxing timer

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default 16f628a problem

    My boxing timer has been working fine on a 16f84a. I have changed to a 16f628a and have had a headache ever since. Managed to sort most of the problems out. However both my green and red leds go on at the same time if my round switch is low. works fine when my round switch is high. so i cant switch between rounds. i have looked at the data manual and have found no reason for the porta bits to affect each other like this.
    Does any one have any ideas????

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoops2006 View Post
    My boxing timer has been working fine on a 16f84a. I have changed to a 16f628a and have had a headache ever since. Managed to sort most of the problems out. However both my green and red leds go on at the same time if my round switch is low. works fine when my round switch is high. so i cant switch between rounds. i have looked at the data manual and have found no reason for the porta bits to affect each other like this.
    Does any one have any ideas????
    ANSEL, CMCON, any of those applicable?

  3. #3
    Join Date
    Dec 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default

    To try and fault find i have stuck leds on my outputs porta 0 1 2. And wrote a program to light them one at a time with a 1sec delay. Even this doesnt work. One of the leds doesnt light one stays on at half brightness and the other led does what it should. Can anyone see why this program isnt working.


    @ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT
    ' System Clock Options
    @ DEVICE pic16F628A, WDT_ON
    ' Watchdog Timer
    @ DEVICE pic16F628A, PWRT_ON
    ' Power-On Timer
    @ DEVICE pic16F628A, MCLR_OFF
    ' Master Clear Options (Internal)
    @ DEVICE pic16F628A, BOD_ON
    ' Brown-Out Detect
    @ DEVICE pic16F628A, LVP_OFF
    ' Low-Voltage Programming
    @ DEVICE pic16F628A, CPD_ON
    ' Data Memory Code Protect
    @ DEVICE pic16F628A, PROTECT_ON
    ' Program Code Protection

    cmcon = 7

    DEFINE OSC 4

    TRISB= 00000000 'PORTB=OUTPUT
    TRISA= 00000000 'PORTA=output




    main:
    PORTA.0 = 1
    Pause 1000
    PORTA.0 = 0
    PORTA.1 = 1
    Pause 1000
    PORTA.1 = 0
    PORTA.2 = 1
    Pause 1000
    PORTA.2 = 0
    GoTo main
    End

  4. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hoops2006 View Post
    To try and fault find i have stuck leds on my outputs porta 0 1 2. And wrote a program to light them one at a time with a 1sec delay. Even this doesnt work. One of the leds doesnt light one stays on at half brightness and the other led does what it should. Can anyone see why this program isnt working.

    @ DEVICE pic16F628A, INTRC_OSC_NOCLKOUT
    @ DEVICE pic16F628A, WDT_ON
    @ DEVICE pic16F628A, PWRT_ON
    @ DEVICE pic16F628A, MCLR_OFF
    @ DEVICE pic16F628A, BOD_ON
    @ DEVICE pic16F628A, LVP_OFF
    @ DEVICE pic16F628A, CPD_ON
    @ DEVICE pic16F628A, PROTECT_ON
    DEFINE OSC 4
    cmcon=7:TRISB=0:TRISA= 0
    main:
    PORTA.0 = 1 : Pause 1000 : PORTA.0 = 0 : PORTA.1 = 1 : Pause 1000
    PORTA.1 = 0 : PORTA.2 = 1 : Pause 1000 : PORTA.2 = 0 : GoTo main
    End
    Got a pullup on MCLR? (i know you've got mclr_off)
    Try an external oscillator and switch your clock modes.
    Turn off your watchdog timer.
    Just ideas...

  5. #5
    Join Date
    Dec 2006
    Posts
    18


    Did you find this post helpful? Yes | No

    Default time display

    Finally got my boxing timer completed. Now i want to have a seven segemt display counting down the round and rest time. I have seen the schematics for multiplexing the displays, so no problems there. But as a complete proggraming novice with only one little project under my belt i havent a clue how to code it. Could any of you experience people give me a few pointers. Would be greatly appreciated.

Similar Threads

  1. Elapsed Timer Demo
    By Darrel Taylor in forum Code Examples
    Replies: 111
    Last Post: - 29th October 2012, 18:39
  2. High Resolution Timer & Speed Calculator
    By WOZZY-2010 in forum Code Examples
    Replies: 4
    Last Post: - 7th February 2010, 17:45
  3. Timer + rc5
    By naga in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 19th November 2009, 08:56
  4. Timer interrupt frequency
    By Samoele in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 18th January 2009, 00:49
  5. timer interupt help 16f73
    By EDWARD in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 3rd July 2005, 09:41

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