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.
Bookmarks