Direct Port Manipulation PBP3 Pro silver edition


+ Reply to Thread
Results 1 to 9 of 9

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,615


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Direct Port Manipulation PBP3 Pro silver edition

    LATB is a register within the PIC, not a PBP command. Exactly the same as TRISA, CMCON, WPUA, ANSELA, ADCON and a few hundred more that you will not find in the PBP manual but rather in the datasheet for the specific PIC you're using - again because they are not PBP commands but registers in the PIC that you can read/write.

    LATB.0 = 1 is the syntax used to set bit 0 of the LATB register to '1'.

    Not all PICs have a LAT registers. On those who don't you need use the PORT register instead.

    NOP is the assembly instruction "No Operation" which "wastes" one instruction cycle. @ is the inline assembly directive used to tell PBP that the rest of the line is in fact assembly and not PBP commands.

  2. #2
    Join Date
    Jan 2022
    Posts
    46


    Did you find this post helpful? Yes | No

    Default Re: Direct Port Manipulation PBP3 Pro silver edition

    Quote Originally Posted by HenrikOlsson View Post
    LATB is a register within the PIC, not a PBP command. Exactly the same as TRISA, CMCON, WPUA, ANSELA, ADCON and a few hundred more that you will not find in the PBP manual but rather in the datasheet for the specific PIC you're using - again because they are not PBP commands but registers in the PIC that you can read/write.

    LATB.0 = 1 is the syntax used to set bit 0 of the LATB register to '1'.

    Not all PICs have a LAT registers. On those who don't you need use the PORT register instead.

    NOP is the assembly instruction "No Operation" which "wastes" one instruction cycle. @ is the inline assembly directive used to tell PBP that the rest of the line is in fact assembly and not PBP commands.


    Thanks so much HenrikOlsson for all this,
    just read about (LAT register (output latch)) in datasheet, and found the NOP but was puzzle about the @. you did clarify all this.

Similar Threads

  1. 16F1827 ADC Direct manipulation not working
    By Ioannis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 5th June 2013, 22:16
  2. Replies: 3
    Last Post: - 25th February 2011, 02:11
  3. Port bit manipulation useing variables
    By shawn in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st November 2010, 04:41
  4. Port Manipulation
    By rwskinner in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 5th March 2008, 04:30
  5. Serial Port Complete 2nd Edition
    By Bruce in forum Serial
    Replies: 4
    Last Post: - 8th November 2007, 15:28

Members who have read this thread : 12

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

Tags for this Thread

Posting Permissions

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