Menu

PulseOut

Help
JB
2024-10-19
2024-11-04
  • JB

    JB - 2024-10-19

    Hello everyone,

    simple question, about PulseOut syntax

    Syntax : PulseOut pin, time units
    "The PulseOut command will set the specified pin high"

    what about the Pin is already high
    does the PulseOut will set the pin low and return to high

    and can the time units be in fraction of us (1 / 0.5 / 0.2 )

    looking to use this with a PIC18F06Q41 @ 64Mhz to get a pulse of ~ 0.625ns (Low and High)

    Thanks to all.

     

    Last edit: JB 2024-10-19
  • Anobium

    Anobium - 2024-10-19

    Test the state then,
    If high.. use PulseOutInv. If low.. use PulseOut.

     
  • JB

    JB - 2024-10-19

    Thanks

     
  • William Roth

    William Roth - 2024-11-03

    PulseOut is a macro with a minimum time val of 1 microsecond. However, to get what you need ASM can be inserted into the following code as shown below.

    #CHIP 18F46Q71, 64
    wait 100 ms
    Dir PortC.2  OUT
    
    ' ----- Main body of program commences here.
    do
       set PortC.2 on
           nop
           nop
           nop
           nop
           nop
           nop
           nop
           nop
           nop
       set PortC.2 off
           nop
           nop
           nop
           nop
           nop
           nop
           nop
    loop
    

    This will give you 625ns on and 625ns off @ 64Mhz

     
    • JB

      JB - 2024-11-04

      I'll give it a try and post the results,
      Thanks

       
    • JB

      JB - 2024-11-04

      Hi, tested with 18F14K22 64Mhz (still wait for 18F46Q71)

      worked fine nice signal ~65ns

      Thanks

       
  • JB

    JB - 2024-11-04
     

    Last edit: JB 2024-11-04

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.