Setting up Timer Module


Results 1 to 13 of 13

Threaded View

  1. #7


    Did you find this post helpful? Yes | No

    Default

    Madbass1,

    Try this I modified your code.

    DEFINE OSC 4

    TRISIO =%000000 'All outputs
    ANSEL = 0 'ALL I/O digital
    CMCON0 = 7 'comparator off
    OSCCON =$60 'set internal osc to 4mhz

    LED_HIGH VAR BYTE
    LED_LOW VAR BYTE

    BEGIN:

    HPWM 1, 127, 325 'GPIO.2 output 325hz

    FOR LED_HIGH = 0 TO 10 'Turn ON LED for 1 Second
    HIGH GPIO.5
    PAUSE 100
    NEXT

    for LED_LOW = 0 to 10 'Turn OFF LED for 1 Second
    LOW GPIO.5
    PAUSE 100
    Next

    GOTO BEGIN
    Last edited by mark_s; - 15th December 2010 at 18: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