Aliasing a port with arbitrary I/O pins?


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2008
    Posts
    6

    Default Aliasing a port with arbitrary I/O pins?

    I am using a 16F676 which has only two 6bit ports.
    I would like to have an 8bit port, but I am unable to Alias one.

    I am trying to do something like:

    OUTPORT.0 = PORTA.0
    OUTPORT.1 = PORTC.0

    but I will get compilation errors. I am using Microcode Studio.

    Is there anyway to get an 8bit alias that represents 8 I/O pins so that I can do something like:

    OUTPORT = %11101101

    Any ideas? Or will I just have to make a byte variable and create a routine to assign its values to output pins (and then run it every time I change the variable)?

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Apr 2008
    Posts
    6


    Did you find this post helpful? Yes | No

    Default

    So the short version, for anyone who finds this thread on a search, is that I do indeed have to just create a routine to assign the outputs.

    However, if you follow the link provided by Sayzer, you can find some simple and efficient routines to accomplish it.

    Thanks Sayzer!

Similar Threads

  1. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  2. Microcontroller with 2 way paging application problem
    By oneohthree in forum mel PIC BASIC Pro
    Replies: 30
    Last Post: - 20th April 2007, 17:27
  3. STATUS re-curtain W
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 15:21
  4. PIC PORT 'special' pins
    By barkerben in forum General
    Replies: 1
    Last Post: - 18th January 2005, 21:40
  5. PIC12F629, useing all I/O pins
    By Jcee324 in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 7th December 2004, 11:05

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