Change From C to PBP


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    970


    Did you find this post helpful? Yes | No

    Default Yes

    Yes. For Starters

    Code:
    void test() {     //Generate test signal
      while (1){
        PORTB &= 0xee;  // sends a ground to the SCR gate
        delay_us(56);   // 56 us delay
        PORTB |= 0x11;   // ground off the SCR
        if (PORTB & 0x04) delay_ms(200); //300 rpm
        else delay_ms(8); //7500 RPM
      }
    }
    
    converts to this
    
    Test:
       while 1
          Portb = PortB & $ee
          pauseus 56
          Portb = PortB | $11
          if Portb & 4 then
             pause 200
          else
             pause 8
          endif
       wend
    Jerson
    Last edited by Jerson; - 15th February 2007 at 04:56.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 13:55
  2. PBP IF,THEN help
    By paulcox82 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 27th September 2009, 21:08
  3. Replies: 2
    Last Post: - 8th February 2009, 06:10
  4. Using PICBASIC PRO in MPLAB IDE
    By jblackann in forum General
    Replies: 8
    Last Post: - 4th May 2008, 10:20
  5. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 20:01

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