Connect with us

Astable Multivibrator with PIC microcontroller

Discussion in 'Microcontrollers, Programming and IoT' started by abuhafss, Feb 8, 2014.

Scroll to continue with content
  1. abuhafss

    abuhafss

    344
    10
    Aug 3, 2010
    Hi

    I have recently started learning PIC programing.
    So far made 2-3 programs, playing with LEDs.
    Before proceeding further for astable multivibrators, I have a question:

    For a high frequency (say 1KHz) astable vibrator, is there any specific keyword to have the required output or we have to manually set the ON period+OFF period to define one cycle and then repeat it? If there is some specific keyword, please let me know.

    Thanks.

    p.'s. I am using PIC Basic.
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,291
    2,731
    Jan 21, 2010
    An astable multivibrator is a circuit made with 2 transistors and assorted other components.

    What you're talking about is generating a pulse train.

    Also 1kHz is not high frequency.

    I'd be looking at the HPWM command.
     
  3. richardb

    richardb

    48
    0
    Dec 21, 2013
    Which pic basic are you using ?
    With swordfish
    if you didn't want to do anything else you do something as simple as

    Code:
    TRISB.0 = 0
    
    dim led as portb.0
    while true
       led = not led
       delayms(1)
    wend
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-