PDA

View Full Version : LED Bug


Pacetech
09-23-04, 12:58 PM
IsoMax V0.61

Whenever I test an LED to see if its on

REDLED ON?

If its off, then this turns the LED on.

If I check to see if its OFF

REDLED OFF?

if it is off, it will turn it on.

RMDumse
09-23-04, 04:28 PM
ON? and OFF? assume you want an input, and turn around the data direction register, which makes a weak pull up active on the port, and the LED buffer sees that as a "one" and turns on the LED.

Have you looked into the similar ?ON and ?OFF. These two OO words, check the pin without changing it first from whatever it was configured for to an input. So if you set it to an output with ON or OFF, then ?ON will read what you did to it without changing it.

Pacetech
09-23-04, 04:48 PM
My bad.