12f675_fuse_about_to_blow!


Results 1 to 40 of 929

Threaded View

  1. #34
    Join Date
    Feb 2010
    Location
    I live in the UK
    Posts
    562


    Did you find this post helpful? Yes | No

    Default

    I'm truly amazed tonight

    I've managed to get Henriks DIV32 program to run and the accuracy is absolutely spot on! And I mean absolutely spot on!

    I wanted a program that could PAUSE randomly within a period of 1ms to 3000ms.

    Here's part of the code:

    Code:
    main:
    Random X
    Y = X * 1000
    Z = DIV32 21845
    SEROUT2 PORTC.3, 16780, [DEC Z, 13, 10]
    IF Z = 2997 THEN STOP
    IF Z = 2998 THEN STOP
    IF Z = 2999 THEN STOP
    IF Z = 3000 THEN STOP
    IF Z = 3001 THEN STOP
    GOTO main
    To test it I ran it through the Serial Communicator with no pauses to speed the runs up and set up a series of IF_THEN_STOP statements if any of the conditions were met. Sure enough 2997,2998 and 2999ms were within the program range and stopped the program.

    Then for the big one 3000ms, that was also there and stopped the program!

    What about 3001.....Nope, the program runs from 1 to 3000ms absolutely stop on.

    Henrik, mackrackit, thank you both and good night.

    Dave
    Last edited by LEDave; - 10th July 2010 at 00:29.

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