Time Out ?


Closed Thread
Results 1 to 13 of 13

Thread: Time Out ?

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I did not think about the external OSC change, good catch.

    For some reason I was thinking that you did not want to clear anything in the ASM routine...
    I do not see what it would hurt to clear all of PORTA in the ASM, "clrf PORTA". When the code gets to SERIN2 it will still input.

    Now it works and holds the output on while transmitting but when I release the button most of the time there is a delay of several seconds before the output goes off.
    That I am not sure about. Maybe there is something in the TX code causing things to drag?

    Maybe post both the TX and RX and someone will be able to spot the problem.
    Dave
    Always wear safety glasses while programming.

  2. #2


    Did you find this post helpful? Yes | No

    Default Timer???

    Am Using the correct timer, I am using an external 4mHz oscilliator on RA6 and RA7, I've just noticed that on the original code Bruce has the PIC is a 12F635. T1CON: TIMER1 CONTROL REGISTER bit 7 is set to 0 and that Timer counts when the gate is low, I don't have a gate, so how am I counting?


    By the way I am using a 16F628A.
    Thanks

  3. #3
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Neither on is counting.
    On the 635, T1CON bit 6 is 0 in Bruce's code. Bit 6 being 0 just turns on the timer, no gate.
    Dave
    Always wear safety glasses while programming.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply, So as it is in the previous post it seems to work, but I just was looking over the datasheets of both the PIC's this past weekend. I was just curious how it works, I am still struggling to understand the timers. I shall keep reading because it is not clear to me what makes it "tick" to jump out and continue.


    Thanks again for the many replies.
    '73

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I shall keep reading because it is not clear to me what makes it "tick" to jump out and continue.
    Yup, they can be confusing at times. You may have this part figured out but we will start someplace.

    Once the timer is setup it will run in the background as if there is a second chip. This second process can be looked at as an alarm clock. When the alarm goes off, timer overflows, it will interrupt the main process.

    At this time we turn the alarm off, disable the timer, and do whatever... get up go about our day....

    Then the alarm is set again...
    Dave
    Always wear safety glasses while programming.

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