One variable made up of another variable


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382

    Default One variable made up of another variable

    Can anyone think of a "sneaky" way of doing the following? I couldn't think of a way so may ending having to head in another direction but I thought I would ask, just in case.

    OUT0 VAR PORTB.1
    OUT1 VAR PORTB.5
    OUT2 VAR PORTC.2
    OUT3 VAR PORTC.6
    OUT4 VAR PORTD.3
    OUT5 VAR PORTD.5

    For Counter=0 to 5
    Out(Counter)
    Next Counter

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Default

    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

  3. #3
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Thumbs up

    That just might do it. Thanks!

  4. #4
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Based on what I'm reading if I line everything up on portb I should be able to to and turn everything on with the following code. In the end I think this may work for what I need.

    for counter = 0 to 7
    PortB.0[Counter]=1
    next Counter
    Last edited by DynamoBen; - 1st September 2007 at 00:49.

Similar Threads

  1. EEPROM Variables (EE_Vars.pbp)
    By Darrel Taylor in forum Code Examples
    Replies: 79
    Last Post: - 26th October 2012, 00:06
  2. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. Help with sound command in 2 programs
    By hyperboarder in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 5th July 2007, 20:36
  4. WORD vs BYTE variable lengths
    By bartman in forum General
    Replies: 0
    Last Post: - 28th November 2005, 21:16
  5. Storing a variable in EEPROM
    By Tissy in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 29th October 2005, 13:53

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