Why (or how to) make a port array for OW


Results 1 to 9 of 9

Threaded View

  1. #3
    Join Date
    Feb 2009
    Location
    Stockholm / Moscow
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    Tnx for reply Bruce !
    I'v tried what You just said, but no success.
    the leds dont light up when i change it to "high portc.0[portnr]" instead of "portc.0 = 1"
    With or without a Tris statement.


    The 18B20 code is Yours from start (part 3 Ds1820&4 lines LCD) and what im try to do is a loop where i adress the port so i dont need 8 identical read parts.

    I have it working direct adressing on the read parts and then a common calculate part but it's not a effective coding i guess and im curius why it does'nt work.

    This work:
    Start_Convert:
    OWOUT porta.0, 1, [$CC, $44]' Skip ROM search & do temp conversion

    This does not:
    for portnr = 0 to 7
    Start_Convert:
    OWOUT porta.0[portnr], 1, [$CC, $44]' Skip ROM search & do temp conversion
    ( I can read the portnr on the LCD but not light leds or OW commands)


    Brgds Roy
    Last edited by Roy___; - 21st February 2009 at 23:17. Reason: Typos

Similar Threads

  1. Simple Array Demo
    By Archangel in forum Code Examples
    Replies: 5
    Last Post: - 15th February 2010, 04:46
  2. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  3. array and port
    By piombazzo in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th November 2008, 20:58
  4. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  5. pins in arrays?
    By scorpion in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 17th September 2005, 08:18

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