DT interrupt/pulse generator


Closed Thread
Results 1 to 15 of 15

Hybrid View

  1. #1
    Join Date
    May 2007
    Location
    Suffolk, UK
    Posts
    59


    Did you find this post helpful? Yes | No

    Default Mystery Solved!

    Hi Darrel
    I changed the bit of maths and hey presto the programme instantly came good. It is cycle accurate all the way up. I'm really pleased...so many thanks. Now I'll get back to studying your programme to see how it works. The bit that is confusing is adding the reload value to the timer value - I didn't realise it then subtracted the timer value to the point of reset. You did this using ASM. Presumably this could also be done in PBP?
    Regards Adrian

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Adrian View Post
    I changed the bit of maths and hey presto the programme instantly came good. It is cycle accurate all the way up. I'm really pleased...so many thanks.
    That's Great!
    Didn't think that was it, but now I'm glad it was.
    Thanks for helping me find the problem!

    > You did this using ASM. Presumably this could also be done in PBP?

    It can be done with only PBP statements. But it's difficult to know exactly how many instructions it uses for the reload. You'd have to search the .LST file to figure that out. Then as the program grows, that code may move to a different "Page" and change the timing without you knowing about it. With the ASM version, you always know it takes 8 instructions.

    With 2000 interrupts per second, a difference of 1 count in the load routine translates to an error of 2000 counts per second. Not good for long term timing.
    DT

Similar Threads

  1. PTO Generator
    By b1arrk5 in forum Off Topic
    Replies: 7
    Last Post: - 25th November 2013, 14:25
  2. 2 Beam Optical Pulse Generator
    By WOZZY-2010 in forum Schematics
    Replies: 8
    Last Post: - 6th April 2010, 04:03
  3. DT instant interrupts with mister_e keypad
    By Tomexx in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 26th November 2008, 20:02
  4. Frequency Generator
    By ExYu in forum Off Topic
    Replies: 2
    Last Post: - 22nd January 2008, 18:25
  5. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 02:21

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