Addressing ports via offset using lookup command


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Addressing ports via offset using lookup command

    thanks guys ,
    darrel i did not think to treat them as contiguous when they are not , but by changing the start port solves that issue

    the extra if then ,else commands , may cause some delays in the timing ill have to see the output it creates to check it

    cheers sheldon

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: Addressing ports via offset using lookup command

    Quote Originally Posted by longpole001 View Post
    the extra if then ,else commands , may cause some delays in the timing ill have to see the output it creates to check it
    Ha! That's funny.

    By using a PORT offset to begin with, it's doing "Array" operations that will take more time than a simple BYTE comparison and subtraction.

    The comparison takes 4 cycles if true, 5 if false.
    The subtraction takes 4 cycles if >= 40.

    The array operation takes ... 30 instruction cycles.
    DT

Similar Threads

  1. PicBasic Lookup command
    By queenidog in forum mel PIC BASIC
    Replies: 15
    Last Post: - 18th June 2016, 20:54
  2. 10bit ADC with offset on 16F88
    By Amoque in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st April 2012, 15:11
  3. DS1820 Negative Numbers and OffSet
    By gadelhas in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 23rd April 2011, 21:53
  4. dt int timer1 ignores offset value
    By DDDvvv in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 15th June 2010, 09:53
  5. Offset to variable howto ?
    By RFsolution in forum mel PIC BASIC Pro
    Replies: 18
    Last Post: - 3rd October 2008, 09:36

Members who have read this thread : 1

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