Menu

software pwm out

Help
fisyon
2016-06-12
2016-06-13
  • fisyon

    fisyon - 2016-06-12

    hi
    i am using pic16f877a @ 20Mhz with lcd io4 configuration.
    i tried following lines which is hanged at pwmout command:

    #define pwm_out1 portc.0 'software pwmout pin 15
    dir pwm_out1 Out
    
    main:
        M1Fw
    goto main
    
    sub M1Fw    'pin15
        do
            cls
            if  testvalue <= 255 then   testvalue += 1 else  testvalue= 0
            pwmout 1,  testvalue, 100
            print  testvalue
            wait 1 ms
        loop
    end sub
    

    initialising works flawless but it look like the line "print testvalue" never reached.

    I don't know what i am missing...

     

    Last edit: fisyon 2016-06-12
  • kent_twt4

    kent_twt4 - 2016-06-13

    Take a look at Help, else can't be on the same line of an If..Then.

     
  • fisyon

    fisyon - 2016-06-13

    wow!
    how silly i am, thank you, it works

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.