Replicating Encoder Chip Output With PICBASIC


Results 1 to 4 of 4

Threaded View

  1. #4
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Code:
    RF VAR word : c VAR byte : b VAR byte : output_TX VAR PORTD.5
    output output_tx
    Main: RF=$7f2 : Output_TX = 0 : For c = 1 To 4 : PulsOut Output_TX, 35
     For b = 0 To 11
              If RF.0[b] = 0 Then
                   PauseUs 330 : PulsOut Output_TX, 66    '660uS pulse
              Else
                   PauseUs 660 : PulsOut Output_TX, 33    '330uS pulse
              EndIf
         Next b : Pause 40 : Next C : Sleep 2 : GoTo Main
    Might help to put the variable that you are NEXTing in your NEXT statements...and set the pin that you are using to an output before you use it.
    (The high colonic master strikes again!)
    Last edited by skimask; - 12th May 2008 at 17:36.

Similar Threads

  1. Quadrature encoder and ASM Interrupts. questions..
    By godfodder in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 17th March 2013, 14:45
  2. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  3. HSEROUT Newbie question/problem
    By Mark Scotford in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 11th July 2006, 14:44
  4. analog output values in picbasic
    By taos in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 16th March 2006, 07:16
  5. encoder wowes
    By wallaby in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 6th December 2005, 21:56

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts