Maker Pro
Maker Pro

Astable Multivibrator with PIC microcontroller

abuhafss

Aug 3, 2010
348
Joined
Aug 3, 2010
Messages
348
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
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
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.
 

richardb

Dec 21, 2013
48
Joined
Dec 21, 2013
Messages
48
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