Define Outputs


Closed Thread
Results 1 to 3 of 3

Thread: Define Outputs

  1. #1
    Join Date
    Mar 2013
    Posts
    2

    Default Define Outputs

    I am curious is there any way to define a variable as a group of output pins.

    such as

    Variable=porta.1 portb.1 portb.3


    is this possible?

    thanks,

  2. #2
    Join Date
    Apr 2007
    Location
    Pennsylvania, USA
    Posts
    158


    Did you find this post helpful? Yes | No

    Default Re: Define Outputs

    Not sure exactly what result you are looking for by combining the ports? Something like this might work.

    Code:
    variable var byte
    variable.bit2 = porta.1 : variable.bit1 = portb.1 : variable.bit0 = portb.3
    Shawn

  3. #3
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,610


    Did you find this post helpful? Yes | No

    Default Re: Define Outputs

    Hi,
    There's no way to redefine the pins and then write them in one go as if they were a true single port, ie they will not be written at the exact same time like they would with something like PortB=123. With that said and with those limitations in mind I think that Darrels VirtualPort routine may do what you want. Have a look at this thread and do a forum search for VirtualPort.

    /Henrik.

Similar Threads

  1. 4 x PWM outputs
    By Scampy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th February 2012, 06:40
  2. 8 pin DIP w/6 outputs ?
    By Sam in forum General
    Replies: 12
    Last Post: - 14th September 2009, 20:15
  3. help with multiple outputs...
    By rickvan in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 25th November 2007, 17:34
  4. Which pic have more outputs?
    By tech in forum General
    Replies: 4
    Last Post: - 1st June 2007, 05:14
  5. Multiplexing PWM pin with other outputs
    By bcd in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 19th September 2006, 11:24

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