Needing help with speeding up paralel port


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2007
    Posts
    12

    Default Needing help with speeding up paralel port

    Hi!

    I'm using PIC16F88 eight digital outputs to drive DAC. Digital output change takes a lot of time as I have to change each of them. Is there any faster solution to change digital outputs in paralel?

    Simplified code:

    adval var byte 'input value
    b0 var adval.0 'first bit of input value
    b1 var adval.1 'second bit of input value
    b2 var adval.2 'third bit of input value
    b3 var adval.3 'etc.
    b4 var adval.4
    b5 var adval.5
    b6 var adval.6
    b7 var adval.7

    .... ' adval gets its value in a loop sequence.

    PORTB.1 = b0 ' PIC digital outputs gets its value
    PORTB.6 = b1
    PORTB.7 = b2
    PORTA.2 = b3
    PORTA.3 = b4
    PORTA.4 = b5
    PORTB.0 = b6
    PORTB.3 = b7

    With 4MHz oscillation the digital outputs set up time for 8 bits takes 32us.

  2. #2
    Join Date
    May 2007
    Posts
    12


    Did you find this post helpful? Yes | No

    Default

    It went now to wrong thread. I'm using PICBASIC PRO. Maybe it can be moved under other topic.

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


    Did you find this post helpful? Yes | No

    Default

    You can "put" a whole byte on a port by doing:
    Code:
    PortB = ADVAL
    So the only thing I can think of is to change your hardware so that it "lines up" bit for bit.

    Or change your oscillator to 20Mhz.

    /Henrik Olsson.

Similar Threads

  1. Why (or how to) make a port array for OW
    By Roy___ in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd February 2009, 23:30
  2. Change On Interrupt, PIC16F884
    By elec_mech in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 14th November 2008, 17:25
  3. port config.
    By tamertokgoz in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th July 2008, 12:25
  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. STATUS re-curtain W
    By zugvogel1 in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 13th February 2005, 15:21

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