Problem with ports help plz


Results 1 to 34 of 34

Threaded View

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


    Did you find this post helpful? Yes | No

    Default E Beer, is there anything it can't do ?

    HiYa wbubel,
    PortA = %01000000 means portA.6 is going high when port is made an output, so if it crosses that place in space time while the PIC is initializing you will see PortA.6 output high. You want to set PortA.6 as zero and do it before you set the tris register to input or output so when it becomes an output or input the latch register is set in a known state, setting it as 1 does not enable pullups or anything like that, so you should have:
    Code:
    PortA = %00000000 ' set port latches low
    TrisA  = %01000000 ' make RA6 input
    You ever watched an old mechanical slot machine? Figure your registers are going like that until the pic boots and settles into the default mode, usualy 11111111, then it follows your code.
    Last edited by Archangel; - 31st July 2009 at 02:21.
    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.

Similar Threads

  1. sleep problem help plz >>>.
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 16th November 2009, 08:21
  2. Replies: 6
    Last Post: - 10th January 2008, 10:38
  3. ESC problem plz help
    By al000y in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 21st January 2007, 10:21
  4. Problem reading multiple ADC ports
    By jswayze in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 4th November 2004, 16:46
  5. Problem with intensity.. plz help
    By Srigopal007 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 7th October 2004, 17:25

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