I/O Salad indeed ...
More to try
1)Turn the Comparators OFF to get PORTA to work as intended
2) You set all of PORTA inputs here but make them outputs in your code
3)
Code:
TRISB = %11000000 'portb.6 and .7 out puts all others in put
You got the comment backwards (0=output, 1 = Input)
4)Remember RA4 is open drain so it needs a pullup on your real circuit
5)
Oh, and it it were me, I would start with this and make this work with the Simulator
Code:
TRISB=1
MAIN:
IF PORTB.0 = 1 then
PORTB.1=1
ELSE
PORTB.1=0
ENDIF
GOTO MAIN
Post back after you try some of these
Paul Borgmeier
Salt Lake City, UT
USA
__________________
Bookmarks