11.07.2015 Views

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

PICBASIC PLUS LITE Manual - Profe Saul

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>PICBASIC</strong> <strong>PLUS</strong> Compiler5.52. PULSOUTSyntax : PULSOUT Pin , Period, { Initial State }Overview :Operators :Example :Generate a pulse on Pin of specified Period. The pulse is generatedby toggling the pin twice, thus the initial state of the pin determinesthe polarity of the pulse. Or alternatively, the initial state may be setby using HIGH-LOW or 1-0 after the Period. Pin is automatically madean output.Pin is a Port.Pin constant that specifies the I/O pin to use.Period can be a constant of user defined variable. See notes.State is an optional constant (0 or 1) or name HIGH - LOW that specifiesthe state of the outgoing pulse.‘ Send a high pulse 1ms long (at 4MHz) to PortB Pin5LOW PORTB.5PULSOUT PORTB.5 , 100‘ Send a high pulse 1ms long (at 4MHz) to PortB Pin5PULSOUT PORTB.5 , 100 , HIGHNotes :See also :The resolution of PULSOUT is dependent upon the oscillator frequency.If a 4MHz oscillator is used, the Period of the generatedpulse will be in 10us increments. If a 20MHz oscillator is used, Periodwill have a 2us resolution. Declaring an XTAL value has no effect onPULSOUT. The resolution always changes with the actual oscillatorspeed.COUNTER , PULSIN102Copyright Crownhill 2001

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!