Maker Pro
Maker Pro

Astable Multivibrator with PIC microcontroller

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.
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
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.
 
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
 
Top