signal integrity


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    There is one questionable thing about this, when I have a led at the output to test the pwm. i see like a flickering. the reason why I think this is the case. is because the correct pause sequence is not there. Can you please help with a better solution
    remove the capacitor around your 20MHZ crystal an post the answer.

    I was wondering how do I control the pwm for this. lets say I have a button .. and while I pressed the button the PWM will increase
    refer to this section
    Code:
        ' Let's see how many time we have come here
        ' -----------------------------------------
        '
    	if PWMIncStep<600 then
    		PWMIncStep=PWMIncStep + 1  ' not enough, come again and do 
    		                           ' one more PWM increment step.
    	else
            pwmincstep = 0  ' enough is enough, pass go and claim 200$
                            ' Also, since you're there redo the ramp-up
                            '
            toggle timerled ' toggle status LED
    	endif
    the easyest solution is to add a simple IF THEN statement

    Code:
        ' Let's see how many time we have come here
        ' -----------------------------------------
        '
    	if PWMIncStep<600 then
                If PushButton  then   	' If pushbutton is pressed    
                   PWMIncStep=PWMIncStep + 1  ' do the PWM
                endif 
    	else
            pwmincstep = 0  ' enough is enough, pass go and claim 200$
                            ' Also, since you're there redo the ramp-up
                            '
            toggle timerled ' toggle status LED
    	endif
    Last edited by mister_e; - 25th January 2005 at 01:26.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

Similar Threads

  1. Replies: 24
    Last Post: - 1st December 2009, 08:01
  2. Measuring p-p of a 1.5v to 12v ac signal?
    By sccoupe in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th October 2009, 16:22
  3. Decoding an incoming infrared signal: need advice
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 9th May 2008, 16:28
  4. PIC16F684 + LCD to use the 256bytes of EEPROM - HELP
    By xnihilo in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 7th March 2008, 14:19
  5. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36

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