PULSOUT versus toggling a pin


Closed Thread
Results 1 to 10 of 10

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    Russ,
    Using the same idea you can control all you pins at same time. Its not pretty or clever, but it works

    PortB = %00000001 ;pin 0 high 3us
    PortB = %00000001
    PortB = %00000001
    PortB = %00000010 ;pin 0 low, pin 1 high 3us
    PortB = %00000010
    PortB = %00000010
    PortB = %00000100 ;pin 1 low, pin 2 high 3us
    PortB = %00000100
    PortB = %00000100
    PortB = %00000000 ;all pins off

    Loop etc

    Tenaja is your name Don L?

  2. #2
    Join Date
    Sep 2007
    Location
    USA, CA
    Posts
    271


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mark_s View Post
    Russ,
    Using the same idea you can control all you pins at same time. Its not pretty or clever, but it works

    PortB = %00000001 ;pin 0 high 3us
    PortB = %00000001
    PortB = %00000001
    PortB = %00000010 ;pin 0 low, pin 1 high 3us
    PortB = %00000010
    PortB = %00000010
    PortB = %00000100 ;pin 1 low, pin 2 high 3us
    PortB = %00000100
    PortB = %00000100
    PortB = %00000000 ;all pins off

    Loop etc
    Repetitive port settings on 16F (and lower) devices must also take into account the read/modify/write timing. If you place two consecutive settings in a program, you could end up with a random output setting because of the r/m/w delays.

    Tenaja is your name Don L?
    No.

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mark_s View Post

    Tenaja is your name Don L?
    Don L. lives in Arizona, and sells stuff on ebay
    Edit: Oh and he will autograph his books too . . .
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4


    Did you find this post helpful? Yes | No

    Default

    My mistake he goes by "tinaja" not Tenaja. Don Lancaster was a big influence for me in the late 70's and early 80's.

Similar Threads

  1. Is this a K Type sensor?
    By jessey in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 21st November 2009, 13:55
  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. Another RTC, DS1287
    By DavidK in forum Code Examples
    Replies: 0
    Last Post: - 12th December 2006, 17:07
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 20:10
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

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